Overview
Webhooks notify your server in real time when an order changes state, so you can fulfill automatically instead of polling. Anyway sends three order events:| Event | Meaning | Act on it |
|---|---|---|
order.pending | Payment submitted, being verified on-chain | (optional) show pending |
order.paid | Payment settled | Fulfill the order |
order.failed | Payment failed | Release / notify |
1. Add a webhook in the dashboard
Open Developer → Webhooks
In the Anyway dashboard, go to the Developer page and select the
Webhooks tab, then click Add endpoint.

Fill in the endpoint
- Name — a label for your reference (e.g.
Production server). - Endpoint URL — the
https://URL on your server that will receive events. - Events — pick the events you want, or leave them all unselected to receive every event.

2. Receive events in your app
Anyway sends an HTTPPOST with a JSON body to your URL. Acknowledge by
returning any 2xx status quickly (do heavy work asynchronously).
The body uses the Standard Webhooks envelope:
Route on type
Switch on
type (order.paid, …). data.order.status mirrors it.Correlate with merchantReference
merchantReference is the value you set when creating the payment link,
echoed back unchanged. Use it to find the order in your own system.Be idempotent
The same delivery (
webhook-id header) may arrive more than once, and events
can arrive out of order. De-duplicate and drive state off status, not arrival order.3. Verify the signature
Always verify before trusting a payload. Each delivery carries three headers:| Header | Example | Purpose |
|---|---|---|
webhook-id | msg_2abc... | Unique delivery id (idempotency) |
webhook-timestamp | 1717400180 | Unix seconds (reject if stale) |
webhook-signature | v1a,<base64 ed25519 signature> | Signature to check |
{webhook-id}.{webhook-timestamp}.{raw-body}.
Fetch the public key once (it’s the same for all your endpoints — cache it):
whpk_
public key directly:
Delivery & retries
- Acknowledge with any
2xx. Non-2xxand timeouts count as failed. - Timeout: 10 seconds per attempt.
- Retries: up to 12 attempts with exponential backoff (capped at 1 hour); a
Retry-Afterresponse header is honored. After the last attempt the event is dropped. - At-least-once: the same
webhook-idmay be delivered more than once — keep your handler idempotent.
Managing endpoints programmatically
The dashboard is the usual way to manage endpoints, but you can also do it via the API — see the Webhooks API reference forGET/POST/PATCH/DELETE /v1/webhook and the signing-key endpoint.