#Dave_Adapptor-ReactNative
1 messages · Page 1 of 1 (latest)
Hello, there are also similar asks and sorry for the paymentOption returned undefined. It's a known problem. To know which PaymentMethod is used, the best bet would be listen to webhook event on your backend and try to perform logic there: https://stripe.com/docs/payments/accept-a-payment?platform=react-native#react-native-fulfillment
Doesn't look theres a suitable web hook though as we're only taking their card details for later payment (future payments) so I don't think any of those would be fired?
If thats the case then basically we can't use Stripe for our app? Or could I perhaps use an older version of the library i.e. is this only broken in the latest version?
By taking card details for later (future) payments, do you mean you are using SetupIntent?
How does your code look like?
Basically this flow.. https://stripe.com/docs/payments/save-and-reuse
So yes, on the server side we use SetupIntent
customer: customer.id,
});
res.json({
setupIntent: setupIntent.client_secret,
ephemeralKey: ephemeralKey.secret,
customer: customer.id,
publishableKey: process.env.publishable_key
})```
Then on the client call initPaymentSheet followed by presentPaymentSheet
Could we use Card Elements instead? https://stripe.com/docs/payments/save-and-reuse-cards-only
Although that doesn't support Apple pay which might be an issue as well.
Hello @autumn pier normally when you use SetupIntent it would work seamlessly with PaymentSheet, and after the SetupIntent is confirmed you should receive webhook events on backend indicate that the SetupIntent is confirmed correctly.
To the fact that why PaymentOption doesn't receive anything, could you please write to our Support and we can look into it further?
That said I will need to step down for the day, we will continue support you on Support ticket that way we can gather resource and consult with other colleague as well
The event you should receive for successfully confirm a SetupIntent: setup_intent.succeeded
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Inside it you will have the SetupIntent object, which in turn has the Payment Method ID
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Inside PaymentMethod object you should have everything you need to know about that card