# Why does my app need a webhook to know someone paid?

> Because the buyer pays on the payment service’s page, not in your app. The service tells your server when the money goes through, and your app gives access from that message, not from the thank-you page.

Web page: https://buildladder.com/answers/why-payment-webhooks

## What to do

- If you’re writing the code that gives access after a payment: Listen for the paid event. Stripe’s Checkout guide uses checkout.session.completed. Paddle’s docs say to start giving access on transaction.paid. Polar uses order.paid, and Dodo uses payment.succeeded.
- If you’re building on your own computer: The Stripe CLI can forward test webhook events to your computer. Then check that your app responds to the event.
- If the same payment arrives twice: That’s normal. Services resend a webhook when your app doesn’t answer in time, so your code should ignore one it already handled.
- If your site has no server part: A webhook needs code that runs on a server. Ask your AI tool for the smallest option, like a hosting service that runs code for you.

## What you do

- Create the webhook endpoint or notification destination in the payment dashboard.
- Copy its signing secret into your .env file or your host’s settings.
- Make a test payment and check the delivery log in the dashboard.

## What your AI tool does

- Write the webhook route and check each message’s signature with the service’s official library.
- Make the route ignore a message it already handled.
- Explain what the delivery log means if a message fails.

## Prompt to copy

```text
I want my app to know for sure when someone has paid, using a webhook.
Ask me which payment service I use and what should happen after a payment. Check that service’s current docs on webhooks and signature checks first.
Then add a webhook route on my server that checks every message’s signature, does that one thing, and ignores a message it already handled.
Tell me how to test it on my computer and where to create the webhook in the dashboard. I’ll copy the signing secret into my .env file and my host’s settings myself.
```

## Sources

Updated 2026-11-10.

- [Stripe: Fulfill orders](https://docs.stripe.com/checkout/fulfillment)
- [Stripe: Webhooks](https://docs.stripe.com/webhooks)
- [Paddle: Quickstart](https://developer.paddle.com/get-started/quickstart)
- [Paddle: Verify webhook signatures](https://developer.paddle.com/webhooks/about/signature-verification)
- [Paddle: Simulate webhooks](https://developer.paddle.com/webhooks/simulator/test-webhooks)
- [Polar: Webhook events](https://polar.sh/docs/integrate/webhooks/events)
- [Dodo: Webhooks](https://docs.dodopayments.com/developer-resources/webhooks)
