#seth_code
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/1287623738531123284
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Here is a screen shot of the error, this appears after my server sends the clientSecret and applies it to intentCreationCallback on the mobile app:
Hi there can you share with me the payment intent id?
This is how you use FlowController
Yes, this is exactly what I am currently doing. I have tried using customFlow as well, however Apple Pay does not seem to work unless you pass back a payment method that has automatic confirmation.
What's the PaymentIntent ID for the apple pay payment?
The PaymentIntent status is requires_confirmation, you haven't confirmed it
Right, I don't want the payment to be confirmed yet. My application waits for another user to accept a reservation before the payment is confirmed.
The user on the other end has the option to accept/reject a reservation. If they accept, the payment is confirmed. If they reject, it is cancelled.
Ok. Then what's the problem with this apple pay payment?
intentCreationCallback fails when the PaymentIntent is manual confirmation method.
This is required to close the apple pay sheet on the UI
And it discloses to the user that the apple pay payment did not succeed, even though the intent has been created and it is just in the require_confirmation status
The highlighted line always fails, regardless of if customFlow is true or false
Do you see any errors ?
No error is thrown.
However, the payment intent is created and set to status requires_confirmation
if I remove intentCreationCallback, the payment sheet does not dismiss
Can you put some logs to confirm a valid clientSecret is returned?
secret returned: pi_3Q23sZBghRV4WpFM1GwnOwUa_secret_rvAodL2Hz13E18O8Cdn3Bh1NG
id created: pi_3Q23sZBghRV4WpFM1GwnOwUa
Can you share with me a sample project that I can run and reproduce the problem?
Just a React Native project? It would be difficult to send you both client and server code
Sure, it will take me some time to send it
No problem. If you need more time, you can also share the example project to Stripe supporthttps://support.stripe.com/contact/email, tell them you've spoke to the engineer on discord, and they'll forward your ticket to us.
The Stripe SDK requires publishable keys and a merchantIdentifier for apple pay...this is not something that I can easily set up for you. Would it be okay for me to just send a react native component?
It's OK, I can use my publishable key and merchantIdentifier
I cannot send you the project in discord, it seems to be too large.
Or can you upload it to a file sharing service (i.e., Google drive) and DM me the link to download?
Yup, I can do that.
Does this link work? https://drive.google.com/file/d/10JduJ0KFvZ9K6LQfe9Z5fEGPyj3RuwIK/view?usp=sharing
Thanks, let me download it
It's a very basic project with two buttons set up exactly how I have mine. "Select payment", and then "pay with ..." Of course to get it to work you have to enter your publishable key and merchantIdentifier, as well as a customerId and customerEphemeralKeySecret
Thanks for waiting, I run into some compilation error but it's now building.
Of course, good to hear you got it building.
Ok, I got the same issue, let me investigate
Thank you
The PaymentIntent is in an unexpected state. If you pass confirmation_method = manual when creating the PaymentIntent, also pass confirm = true. If server-side confirmation fails, double check you are passing the error back to the client. I saw this error from confirmPaymentSheetPayment
Looks like need to confirm the PaymentIntent when creating it.
Okay. One second, let me set that param to true
But this will confirm the payment immediately, but you requirement is to defer the confirmation until your user accept the reservation
If your user will accept reservation within 7 days, you can consider holding the payment (i.e., set capture_method=manual), and capturing it later https://docs.stripe.com/payments/place-a-hold-on-a-payment-method
Oh I see, yes we do not want the payment to be confirmed right away
I’m not sure that will work for us. I’m currently working on migrating the app to react native from native script, and this functionality I am seeking already exists. Am I completely unable to do what I need?
Do you have a PaymentIntent that works with native script?
I do not have one at the moment, I didn’t build the native script app so I would need to set it up which would take a long time
I believe the behaviour is the same regardless what client you use to confirm the payment
Why does the SDK require the payment to be confirmed immediately? What is the purpose of manual confirmation method if you cannot advance the user past the payment sheet?
The main purpose of manual confirmation is to only allow the paymentIntent to be confirmed from backend using a secret API key, and that's why you need to set confirm=true in backend because the client app (react-native or native script) is unable to confirm it.
Right, but in that case it’s just an automatic confirmation acting as a manual confirmation. If it were truly manual, I’d expect there to be an event to trigger the confirmation (e.g. a user accepts the reservation)
But I guess what I’m hearing is that what I want cannot be done?
Another workaround that you can consider is to use a setup mode PaymentSheet to collect the payment method, pass it to your backend and let it create a PaymentIntent, and confirm it later.
However, since the paymentIntent is confirmed in a later stage, your application still needs to handle 3DS when requested.
Our users have already stored payment methods, and we also use Apple Pay. I think that option won’t allow them to use those?
You can also save a Apple Pay payment method
Is there documentation on the setup mode payment sheet?
It says directly that Apple Pay and Google pay are not supported
I think I will just have to remove Apple Pay from the feature and use the customFlow. Very unfortunate but I don’t think there is another option, unless the issues I am running into can be fixed.
I really don’t get what the purpose of the payment sheet requiring a confirmed payment is. There doesn’t seem to be any logical reason for that, it would be nice to have the option to resolve the payment sheet without charging a card immediately.
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=react-native&type=setup#ios-apple-pay can you use this flow?
This supports Apple Pay and doesn't require you to confirm from client side
Isn’t that what we just tested, and you reproduce Apple Pay not working in this scenario? The credit card works great in this case as long as customFlow is true, but Apple Pay fails because a confirmed payment intent is not passed back.
No, it's different. The earlier flow is https://docs.stripe.com/payments/accept-a-payment-deferred?platform=react-native&type=payment
Okay, I see how it is different. In this case, it is creating a setup intent instead. What is the difference between a setup intent and a payment intent?
SetupIntent allows you to collect a payment method without charging your customer.
That doesn’t feel right to me, because the user already has payment methods saved and ready to use. Would this create a new setup intent every time they make a payment with one of their saved cards or Apple Pay?