X-Pocketsflow-Signature-V2 (5-minute
tolerance), drop duplicate event ids, acknowledge quickly, and route on the
X-Pocketsflow-Event header. Adapt them — add persistence, a job queue, and
real error handling for production. For the mechanics see
Authentication & security and
Consuming webhooks.
Node.js (Express)
Next.js (App Router route handler)
Python (Flask)
PHP
Still verifying the legacy
X-Pocketsflow-Signature (HMAC of the raw body
only)? It keeps working — see
Legacy signature (V1).
Switch to V2 to get replay protection.Testing your endpoint
Send a sample delivery any time withPOST /webhooks/{id}/test — it signs and
delivers a realistic payload for the endpoint’s first subscribed event to that
endpoint only (even if it is disabled), with "test": true in the body, so you
can confirm signature verification and routing end to end before going live.
The response tells you what happened:
POST /delivered-webhooks/{id}/redeliver.
Example repositories
Two complete, runnable examples on GitHub — clone one, drop in your IDs and signing secret, and you have a working checkout embed plus a signature-verifying webhook receiver.Subscriptions example
Embed a subscription checkout and handle
customer.subscription.*,
invoice.*, and payment_intent.* webhooks.One-time products example
Embed a product checkout and handle
order.completed, order.refunded,
and customer.created webhooks.Related topics
- Subscriptions example repo — runnable embed + webhook code
- One-time products example repo — runnable embed + webhook code
- Authentication & security
- Consuming webhooks
- Webhook events