# Make payment webhooks reliable

> A customer pays, the webhook fails or arrives twice, and their account is wrong.

Web page: https://buildladder.com/resources/prompts/webhooks

What you get: Webhooks verified, safe to receive twice, and logged so you can replay a failed one.

Paste it into: Your AI tool, in your project

## Prompt to copy

```text
Review how this project handles webhooks from my payment provider.

Check that the handler verifies the signature using the raw request body, answers quickly and does slow work afterwards, records each event ID so a repeated event does nothing the second time, copes with events arriving out of order, and returns an error only when a retry would help.

List which event types we listen for, and which ones we need and don't handle, such as failed renewals, refunds and cancellations. Fix the gaps. Then show me how to send test events locally with the provider's tool, send the same event twice, and prove the second one changed nothing.
```
