https.onRequest vs onWrite() firebase in nodejs for Stripe

16 views
Skip to first unread message

Nasir

unread,
Feb 21, 2018, 1:26:23 PM2/21/18
to Firebase Google Group
Currently the open sourced cloud function provided by Firebase/Stripe uses onwrite to Firebase database to trigger the charge to Stripe:  


It seems that it would be more direct and faster to just call Stripe using https trigger instead of writing to Firebase local database which syncs/writes to Firebase server database, which then triggers the cloud function call to Stripe. 

Will there be any problems using Https call to trigger Stripe call?  What advantages are there for using onwrite trigger instead of https?

Kato Richardson

unread,
Feb 21, 2018, 1:36:13 PM2/21/18
to Firebase Google Group
Both should work fine and be a valid approach.

DB may prove a bit more robust for error handling and recovery mostly just due to the persistent nature:
  • Audit log of events
  • Ability to reprocess later if Stripe API returns failures
  • Central authority and place to store status (can display status to client in realtime as transaction completes stages)
  • Will need somewhere to track the results received from Stripe (if not a full audit log)
☼, Kato


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/ecc18233-45d8-473d-870e-92ef8537e933%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages