You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to collect user payment using the Stripe SDK in react native, but having some issues with the current flow I am attempting.
Essentially, it goes like this:
Collect payment information from the user using the PaymentSheet. Following the docs line for line here. Everything is working as expected. Payment sheet is shown, can select payment, etc.
Submission on the confirmHandler calls the backend which generates a payment intent that must be confirmed manually. The reason behind this is the basic functionality of the app -- a user submits a request for a service and the service provider must confirm the details before the process is completed. When the service provider completes this step, then the payment intent is set to confirmed (also via my service).
When my backend returns the client secret, I get this error message on the payment sheet:
Here is how I am initializing the sheet:
constopenPaymentSheet=async()=>{if(user){awaitfetchPaymentSheetParams(user).then((response: any)=>{returninitPaymentSheet({merchantDisplayName: "MyApp",customerId: response.id,customerEphemeralKeySecret: response.secret,intentConfiguration: {//sample amount, will be set dynamicallymode: {amount: 1409,currencyCode: 'USD',},confirmHandler: confirmHandler,},returnURL: 'MyAppRedirect',allowsDelayedPaymentMethods: false,applePay: {merchantCountryCode: 'US',},// customFlow: true,});}).then(()=>{returnpresentPaymentSheet();}).catch((error)=>{// log error});};};
The client_secret is processed and applied to the intentCreationCallback. I need a way to just close the sheet, even if the intent is manual. I shouldn't NEED to confirm it on the mobile app? There is little to no documentation on PaymentSheet.FlowController, so I am at a loss there as well.
I see a lot of people suggesting setting "customFlow" to true, which does not accomplish what I need. If I use Apple Pay as the payment method, it still seems to require an payment intent with automatic validation.
Thoughts?
The text was updated successfully, but these errors were encountered:
Hi @skoolaidl the manual confirmation in Stripe context (e.g., confirmation_method="manual") refers to a confirming a PaymentIntent with a secret key from your server. Based on the use case that your described, I believe you should use the auth-and-capture flow by setting capture_method="manual". So that you can still confirm the PaymentIntent with PaymentSheet, and later capture the funds when your service provider completes the details.
Feel free to let me know if you have any other questions.
I am attempting to collect user payment using the Stripe SDK in react native, but having some issues with the current flow I am attempting.
Essentially, it goes like this:
Here is how I am initializing the sheet:
And here is the handler:
The client_secret is processed and applied to the intentCreationCallback. I need a way to just close the sheet, even if the intent is manual. I shouldn't NEED to confirm it on the mobile app? There is little to no documentation on PaymentSheet.FlowController, so I am at a loss there as well.
I see a lot of people suggesting setting "customFlow" to true, which does not accomplish what I need. If I use Apple Pay as the payment method, it still seems to require an payment intent with automatic validation.
Thoughts?
The text was updated successfully, but these errors were encountered: