Webhook Security
When a payment provider notifies your app that "this order was paid," your server has to answer one question before acting on it: did this request actually come from the payment provider, or did someone just POST a convincing-looking JSON body to a guessable URL?
Hands-on demo
Forge a payment webhook
You don't know the real signing secret — try sending a fabricated "payment succeeded" event anyway and see if the endpoint falls for it.
Try it yourself
Try it yourself — run a scenario below, then flip this and replay it to see what changes.
Legitimate Payment Confirmation
The real payment provider notifies the app that an order was paid.
Want this flow explained in detail as it plays?
Incoming webhook
"order_1042 was paid", signed with a secret only the app and the provider share.
Selected hop
Payment provider POSTs an event to /webhooks/payments
The external service that notifies the app when a payment event happens.
The application's backend — enforces business rules and decides what every request is allowed to do.
What happens here
"order_1042 was paid", signed with a secret only the app and the provider share.