X-Pocketsflow-Signature, 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
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, so you
can confirm signature verification and routing end to end before going live.
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