#tomrider_code

1 messages ยท Page 1 of 1 (latest)

neat gobletBOT
#

๐Ÿ‘‹ 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.

civic sinew
#

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?

chilly comet
#

No, I don't get any error. My payment intent just end up with the state requires_payment_method

civic sinew
#

Can you share the payment intent example?

#

pi_12345

chilly comet
#

pi_3QyviQL8ZJR6ve630iEMbmhO

civic sinew
#

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

civic sinew
#

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 ๐Ÿ˜„

chilly comet
#

Ok, I found the problem of missing confirmation token and everything works as expected. Thank you!

I have also two more questions:

  1. 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?
  2. 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).
civic sinew
#

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 the confirm event 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.

chilly comet
#

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!

civic sinew
#

NP!