Stripe provides with webhooks for event such as checkout.session.completed.
Set up webhook
- log into Stripe
- Click developer tab
- Click webhook tab
- following instruction to create a webhook
See Webhook successful or failed event
- log into Stripe and go to webhook tab (see above)
- click a webhook in the list of webhooks
- click one event log in the list of event
- Should see the details of request and response of the event
Test webhook in local server
./ngrok http -host-header=rewrite local.reeyysy.cc:80
- set up webhook using url generated by ngrok
- try to fire an event
- if failed, log into Stripe and find the failed event. Click resend to send event again.
No comments:
Post a Comment