简体   繁体   中英

How to make payments with Stripe on Firebase

Probably there might be other cases containing the same title as mine, but I basically want someone to guide me to accomplish this. I'm currently making an app for my school to allow parents to pay their monthly payment through there, I have a child (usernames/$usernames/$uid/bill/(months to pay)) in the bill I have each month they have to pay with their values, such as "price" , "month" , you get the idea, each user has it's own /bill/ , so how could I somehow link this to Stripe? Thanks.

Can see you tagged the realtime database, here is an example from the google cloud functions using RTDB that shows how to use cloud function triggers to deal with the stripe customer creation, taking payments etc.

Just as a reference if using firestore here is an example

Handling payments is not built into Firebase. But you can build it yourself using Cloud Functions and Stripe's API. For the newer Cloud Firestore database, this process is documented in:

The sample used to be based on Realtime Database, so you can still find the code for that in this branch . The rest of the flow will be the same as above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM