Webhooks
Notifications about invoices, deposits and withdrawals sent to your HTTPS endpoint as flat JSON (camelCase, schema version 2).
Setup
- Open the project settings.
- Go to the «Integrations» section.
- Enter the notification URL and save.
- The system creates a secret for verifying requests.
How it works
- On a significant change of an invoice, deposit or withdrawal, the system saves the object state with a new
revisionand creates an event. - Atomic Pay sends a POST request with a JSON body and a signature in the headers to your URL.
- Your server verifies the signature against the raw body, stores the event and returns a successful response.
- If the server does not respond or returns
5xx,408or429, delivery is retried. - Detect duplicates by
eventUuid. For several events of one entity, process the latestrevision.
Event types
| type | eventType |
|---|---|
invoice | invoice.created, invoice.updated, invoice.partially_paid, invoice.completed, invoice.overpaid, invoice.expired, invoice.cancelled |
deposit | deposit.detected, deposit.confirmed, deposit.reorged, deposit.failed |
payout | payout.requested, payout.queued, payout.broadcasted, payout.confirmed, payout.failed, payout.cancelled |
Common fields
| Field | Description |
|---|---|
schemaVersion | Webhook schema version. |
type | Entity type: invoice, deposit or payout. |
eventType | The event that triggered the webhook. |
eventUuid | Unique event ID. Stays the same on redelivery. |
revision | Entity state version. Increases on changes. |
uuid | Entity or deposit ID. |
projectUuid | Project UUID. |
status | Current entity state. |
isFinal | Whether the state is final. |
occurredAt | Event time, UTC ISO 8601. |
createdAt | Entity creation time, UTC ISO 8601. |
updatedAt | Last change time, UTC ISO 8601. |
uuid identifies the entity or deposit, not the event itself. Use eventUuid to identify the event.
merchantAmount and fees
In webhooks, merchantAmount is calculated before the network fee is deducted. In the HTTP API the field includes the final fees and may be null until they are calculated — do not compare the two directly.
Example: deposit.confirmed
- Identify a deposit by
uuid. Do not usetxidas the only identifier: one transaction can contain several deposits. walletAddressUuididentifies the address andstaticWalletUuidthe static wallet. Do not mix them up.
Example: payout.cancelled
For payout, the serviceFee field is not sent in webhooks.
Delivery
| Your server response | Action |
|---|---|
2xx | Delivered. |
408, 429, 5xx, network errors, timeout, DNS | Delivery is retried. |
Anything else, including 3xx and 409 | Terminal failure, no retry. |
By default there are 10 attempts, after which the event moves to dead_letter. Attempts use exponential backoff with random jitter from 0 to +20%:
There is no fixed delay between attempts. Retries stop after a successful response or after the last attempt.
Handling on your side
- Return
2xxonly after the event is safely stored. - Redelivery of the same
eventUuidmust not credit funds twice — use it for deduplication. - Delivery order is not guaranteed: handle duplicates and out-of-order events.
URL requirements
- HTTPS only.
- Reachable from the internet.
- Not localhost or a private IP.
- No redirects — the service does not follow them.