Skip to content

Payments

Make payment webhooks reliable

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

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
The prompt
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.

Use it

Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in.

More in Payments