sobmortin354
sobmortin354

Reputation: 99

Webhook Requirement for Stripe

I am adding an online payment form to my website using stripe and have seen conflicting information regarding the necessity for creating a webhook. I can understand the need for more long running processes, but in my case I will be using paymentIntents and from this document I can't see any requirement https://stripe.com/docs/payments/paymentintents/lifecycle.

Also, just from some basic testing, when confirming the payment intent I get a "success" status in the response, which suggests I dont need a webhook to listen out for the change in status as payment is completed during that call. Is my understanding of this correct?

EDIT: I am using payment elements.

Upvotes: 0

Views: 54

Answers (1)

soma
soma

Reputation: 2219

If you are using the Payment Element, then you should listen to the webhook event payment_intent.succeeded to handle any post-payments actions. This is explained in this documentation page. In particular:

Listen for these events rather than waiting on a callback from the client. On the client, the customer could close the browser window or quit the app before the callback executes, and malicious clients could manipulate the response.

Upvotes: 2

Related Questions