#nstripe0_api

1 messages ¡ Page 1 of 1 (latest)

rough hawkBOT
#

👋 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/1268431821562056737

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

keen mortar
#

Thanks for waiting!

#

How does SCA / 3DS have to do with webhooks? Webhook is the endpoint which Stripe sends the events to for the changes on your account

#

Can you explain what you would like to achieve in an example?

novel saddle
#

Hi river

As noted in the guide (https://docs.stripe.com/billing/subscriptions/overview#requires-action), when the SCA flow is triggered, the steps to handle that are:

  • Retrieve the client secret for the payment intent and pass it in a call to stripe.ConfirmCardPayment. This displays an authentication modal to your customers, attempts payment, then closes the modal and returns context to your application.
  • Monitor the invoice.paid event on your webhook endpoint to verify that the payment succeeded. Users can leave your application before confirmCardPayment() finishes. Verifying whether the payment succeeded allows you to correctly provision your product.

The last note there indicates we would need to wait for the invoice.paid webhook event to get confirmation that the payment went through.

#

In this described flow, I imagine the customer would need to wait while our application receives the webhook event and provision our product.

Is there a suggested way to handle this? Do applications need to have a long polling mechanism in order to automatically show the user a confirmation that their payment went through?

keen mortar
#

We recommend to check the status of the invoice to confirm the payment. invoice.paid event is one way. Alternatively, you may use Invoice Retrieval request to check its status and ensure that the invoice has paid successfully after confirmCardPayment(). invoice.paid event is still recommended as the user might close the window that your system may not get the response

novel saddle
#

you may use Invoice Retrieval request to check its status

Is that a Stripe JS request?

keen mortar
novel saddle
#

I see. So for that, the front end client would need to make a server side calls that would then make a Stripe API call to check that the Invoice is paid.

And I'm assuming the client may need to issue this request multiple times or long poll for the signal that the invoice has been paid.

While that is occurring... we would display some sort of "Please Wait, Processing Payment" message to the customer? Does that sound right?