#Elena-reactnative
1 messages · Page 1 of 1 (latest)
I want to create something in my database before accepting the payment
Cuz u never know. Suddenly the document in database is not created, and i dont want to charge a user before the thing in database is created
so I first want to check if the creation of data in database is successful, and then take the payment
I believe this is something you could do with separate auth and capture (see https://stripe.com/docs/payments/capture-later). You'd create the Payment Intent with capture_method: manual, and then when your customer has gone through the payment sheet the funds have been authorized but not captured. At that point you could create whatever you need to in the database, and then capture the funds (https://stripe.com/docs/api/payment_intents/capture) once its done
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.