#tomrider_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/1346484121047666690
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- tomrider_code, 4 days ago, 27 messages
hey there
Can you say more about the exact issue you encounter?
I am not able to confirm the payment using confirmation tokens
ie, what does this mean? Do you get errors?
if so, can you share an example PI create+confirm request that errors, and/or the exact error message you encounter if not an API request?
No, I don't get any error. My payment intent just end up with the state requires_payment_method
pi_3QyviQL8ZJR6ve630iEMbmhO
It looks like you did not pass a confirmation_token here and confirm is false, the PI was not confirmed: https://dashboard.stripe.com/test/logs/req_mJ0LCPdhUcD4s8
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
My guess is that your client app did not pass a confirmation token to your server, based on the code snippet you gave in the first message
If you recently added this confirmation token based flow to your checkout page with Payment Element, did you make corresponding changes to your PDP using ECE?
ie, ensure that you're calling stripe.createConfirmationToken in the ECE on('confirm', ...) handler
I've noticed you start and stop typing a few times, don't hesitate to ask if you need any clarification. Don't worry about having a perfect question ๐
Ok, I found the problem of missing confirmation token and everything works as expected. Thank you!
I have also two more questions:
- In the confirmation token flow, the Google Pay/Apple Pay modal disappear immediately after generating the confirmation token. Is it correct behaviour? Should I show the server payment processing status on my own?
- What is the best way to confirm that a payment intent was succeeded on the server side? We normally use Event API (eg.
charge.succeededevent).
Ok, I found the problem of missing confirmation token and everything works as expected. Thank you!
Great, glad that pointer was helpful!
In the confirmation token flow, the Google Pay/Apple Pay modal disappear immediately after generating the confirmation token. Is it correct behaviour? Should I show the server payment processing status on my own?
Yes, that's dismissed by the customer when they complete the UI which triggers theconfirmevent when successful. If you want to show some kind of pending/processing indication during your server confirm sequence yes you'll need to manage that with your own implementation.
What is the best way to confirm that a payment intent was succeeded on the server side? We normally use Event API (eg. charge.succeeded event).
Confirm in what context?
From the server perspective, the create+confirm call is synchronous, so if it succeeds the confirm was successful. If it errors it was not. It might require authentication in some cases, so you should check the status after the request succeeds.
From the client perspective, you can have your server return a success signal (or trigger your authentication handler flow).
From a business perspective yes we recommend webhooks, both charge.succeeded or payment_intent.succeeded are valid, with slightly different contexts.
I want to make sure that the payment has been succeeded before I start fulfil the order. I think the payment_intent.succeeded webhook is the best way in this case.
Thank you!
NP!