# Webhooks Overview

Product: Client Trade API
Guides follow API reference 0.3.0 and event reference 0.2.0.
Canonical page: https://docs.axiym.io/trade-api/webhooks/overview

Webhooks let Axiym notify your service when Client Trade API resources change. Use
webhooks to track client onboarding, deposits, withdrawals, conversions,
address book entries, and posted Axiym account balance movements
without continuously polling every resource.

## How it works

1. **Register an HTTPS endpoint.** Create a subscription with
   `POST /webhooks/subscriptions`. See
   [Registration and Management](/trade-api/webhooks/registration-management).
2. **Receive events.** Axiym sends an HTTP `POST` with a JSON event envelope to
   each active subscription endpoint.
3. **Verify the signature.** Every delivery is signed with Ed25519. Verify it
   before trusting the payload. See
   [Verifying Webhook Signatures](/trade-api/webhooks/verifying-signatures).
4. **Acknowledge delivery.** Return a `2xx` response after your system has
   safely persisted or queued the event.

Webhook subscriptions are endpoint-level. The current API does not expose
per-event subscription filters. An active subscription receives every event
emitted for your partnership, including event types outside this Client Trade API
reference. Ignore unknown event types safely.

## Event catalogue

The Client Trade API emits client, deposit, withdrawal, conversion, address-book-entry, and
Axiym account-movement events. `client.onboarding-finished` is a deprecated
legacy activation event; use `client.activated` for new integrations. Address
book entries retain the `destination.*` event-name prefix used by the contract. See
[Events](/trade-api/webhooks/events) for event names, the shared webhook
envelope, and the fields delivered in `data`.

## Delivery and retries

Axiym treats any `2xx` response as accepted. If the endpoint returns a non-2xx
status or the connection fails, Axiym retries the delivery.

* Up to 4 attempts per event: the initial delivery plus 3 retries.
* Exponential backoff between retries: about 1 second, then 2 seconds, then 4
  seconds.
* After the final attempt, the event is not delivered again automatically.

Webhook delivery is at-least-once. Your receiver must be idempotent and
de-duplicate events by `id`. Do not rely on webhook delivery order as the only
source of state; fetch the resource from the API when you need the latest
authoritative state.

Keep handlers fast. A common pattern is to verify the signature, persist or
enqueue the event, return `2xx`, and process the business logic asynchronously.

## Security

Webhook deliveries include these headers:

| Header        | Description                                         |
| ------------- | --------------------------------------------------- |
| `X-Signature` | Base64 Ed25519 signature of the raw request body.   |
| `X-Key-Id`    | Public key identifier used to verify the signature. |
| `X-Algorithm` | Signature algorithm. Expected value: `Ed25519`.     |

Use `GET /webhooks/public-keys/{publicKeyId}` to retrieve the public key for
the `X-Key-Id` value. Signature verification must use the raw HTTP request body,
before JSON parsing or re-serialization.

**Source IP addresses.** The published contract does not define a source-IP
allowlist. Do not rely on fixed addresses; confirm any network restrictions
with Axiym for your environment.

## Related pages

* [Webhook Registration and Management](/trade-api/webhooks/registration-management)
* [Verifying Webhook Signatures](/trade-api/webhooks/verifying-signatures)
* [Events](/trade-api/webhooks/events)
