#darkknight-_unexpected
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1229446741162590323
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Hello ๐
To be clear, you are following this flow: https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=react-native&type=setup ?
nope
I followed this https://youtu.be/ooFuMx6xsJY?list=PLy1nL-pvL2M6AMi4m_vqIz5SrTTz9L3co and change a bit of the code
Depending on your business needs, you may require your customers provide options up front for you to charge them for your services. This may be the case if you support trial periods, pay per usage or even subscriptions.
In this video, Charles Cruzan and Cecil Phillip get today to showcase how save payment methods for later use in your app with ...
Okay well I'd recommend using the above instead which would allow you to actually check the fingerprint of the PaymentMethod while the PaymentSheet is still open. Otherwise, with your current integration you will need to retrieve the PaymentMethod server-side after the SetupIntent confirmation (after the Payment Sheet actually closes) to check its fingerprint and see if there is already a PaymentMethod attached to that Custome with that same fingerprint and then throw an error if that is the case.
will stick with this
also I have another tiny little question - saving only credit cards and not debit cards
You would check the PaymentMethod's card.funding in that case: https://docs.stripe.com/api/payment_methods/object#payment_method_object-card-funding
ok
what code actually goes between
const stripeHandled = await handleURLCallback(url);
if (stripeHandled) {
// This was a Stripe URL - you can return or add extra handling here as you see fit
} else {
// This was NOT a Stripe URL โ handle as you normally would
}
of the setup return url section - https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=react-native&type=setup#react-native-set-up-return-url
You would indicate where you want to deep link to in that case
I'm not sure I understand what you mean to be honest
If stripeHandled is true then you are already sent back to your app and you could navigate or do whatever you want
If that is false you handle via your own deeplinking that you have set up
actually I don't understand the concept of return url in stripe, I see its being used in many places but actually I don't get what it is
It is the URL that we redirect your customer back to if they are redirected outside your App in order to complete a payment
Some payment method types require authentication in a webview for instance
oh ok. I also just checked with chat gpt. So there wouldn't be any of it if I don't want to redirect them anywhere (such as thank you, or anything else)
Instead an modal or toast notification on my app when the payment sheet closed with success
If you are only going to support payment method types that don't involve a redirect then yes, that works.
Otherwise a returnURL is required
ok