Home > Blockchain >  How do I know if a payment is successfull in stripe
How do I know if a payment is successfull in stripe

Time:10-08

I have integrated the stripe Api in my website to process payments and It is working fine. The only problem is that after the a successfull payment, i don't get any response or an object to know if the payment is successful or not. Stripe does process the payment and everything is fine but the question is how would I know that it is successful after stripe redirects the client to the success url ?

CodePudding user response:

You can implement webhook in your application. After a payment is completed stripe will call webhook/callback of your application with the payment_status and other details. Have a look at documentation here Triggering actions with webhooks

CodePudding user response:

Using webhooks and events is definitely the right way to go. You can listen for successful payments, failed payments, and other event types, then add some server code to take some action based on those events.

There's a mention of webhooks in Stripe's custom payments quickstart guide: https://stripe.com/docs/payments/quickstart#use-webhook

They also have a standalone webhooks guide: https://stripe.com/docs/webhooks/quickstart

  • Related