# Retrieve a Funding Account Source: https://docs.antonpayments.com/api-reference/accounts/get-account GET /v1/accounts/{currency} Return the funding account for a single currency. # Retrieve Deposit Details Source: https://docs.antonpayments.com/api-reference/accounts/get-account-details GET /v1/accounts/{currency}/details Return the banking / deposit details for your funding account in this currency — IBAN/BIC, sort code + account number, routing codes, etc. Share these with the sender to fund your balance. # List Account Transactions Source: https://docs.antonpayments.com/api-reference/accounts/list-account-transactions GET /v1/accounts/{currency}/transactions Cursor-paginated list of transactions for this funding account, newest first: deposits, payout debits, fees and exchanges. Takes the same filters as `GET /v1/transactions`, except `currency`, which the path sets. # List Funding Accounts Source: https://docs.antonpayments.com/api-reference/accounts/list-accounts GET /v1/accounts Return your virtual funding accounts — one per currency Anton has provisioned for you. Used for depositing funds into your merchant balance. # List All Transactions Source: https://docs.antonpayments.com/api-reference/accounts/list-transactions GET /v1/transactions Cursor-paginated list of transactions across every funding account you hold, newest first. Every filter is optional; an unknown value is a 400, never an empty list. > [!NOTE] > > **Filtering is not yet supported on this endpoint.** Only `limit` and > `cursor` are honored — any additional query parameters are silently > ignored. To narrow results by currency, call > [`GET /v1/accounts/{currency}/transactions`](/api-reference/accounts/list-account-transactions). > For other filters (type, time range), filter client-side on the returned > `MerchantTransaction` objects until server-side filtering ships. # Retrieve a Balance Source: https://docs.antonpayments.com/api-reference/balances/get-balance GET /v1/balances/{currency} Return your merchant balance in a single currency. # List Balances Source: https://docs.antonpayments.com/api-reference/balances/list-balances GET /v1/balances Return your merchant balance in every currency you hold. Each balance distinguishes between `available` (usable for new payouts), `pending` (reserved for in-flight payouts), and `total`. # Cancel a Batch Source: https://docs.antonpayments.com/api-reference/batches/cancel-batch POST /v1/batches/{id}/cancel Cancel a batch before processing begins. Valid from `uploaded`, `validating`, `validated`, `validation_failed`, or `confirmed`. Once `processing` begins, use per-payout cancellation instead. # Confirm a Validated Batch Source: https://docs.antonpayments.com/api-reference/batches/confirm-batch POST /v1/batches/{id}/confirm Confirm a batch for processing. The state machine is `uploaded → validating → validated → confirmed → processing → completed|partial|failed`. Only batches in `validated` status may be confirmed; the batch transitions to `confirmed` and then `processing` as payouts are created from valid rows. Confirmation is irrevocable — once a batch is `confirmed`, individual payouts can still be cancelled (`POST /v1/payouts/{id}/cancel`) up until they're submitted to a rail, but the batch itself proceeds. Requires an `Idempotency-Key` header. # Download the Batch Template Source: https://docs.antonpayments.com/api-reference/batches/download-batch-template GET /v1/batches/template Returns a ready-to-fill template with the canonical header row and a handful of example rows. Use this to anchor your batch format — column order and casing matter. # Retrieve a Batch Source: https://docs.antonpayments.com/api-reference/batches/get-batch GET /v1/batches/{id} Return a single batch, including its validation summary (when available). # List Batch Beneficiaries Source: https://docs.antonpayments.com/api-reference/batches/list-batch-beneficiaries GET /v1/batches/{id}/beneficiaries Cursor-paginated list of the beneficiaries this batch auto-created or first referenced (matched by source batch). Merchant-scoped — a batch belonging to another merchant returns 404. # List Batch Validation Errors Source: https://docs.antonpayments.com/api-reference/batches/list-batch-errors GET /v1/batches/{id}/errors Return the row-level validation errors and warnings produced during the `validating` phase. Each error or warning carries the row number and field it applies to so you can point the merchant back to their source file. Validation checks the file itself — format, amounts, methods, credentials, beneficiary resolution and a velocity preview. It does not run sanctions, PEP or watchlist screening and never reports a screening outcome. Each payout a confirmed batch creates follows the normal payout lifecycle and is screened before it can be released. # List Payouts Created from a Batch Source: https://docs.antonpayments.com/api-reference/batches/list-batch-payouts GET /v1/batches/{id}/payouts Cursor-paginated list of payouts created by processing this batch. Row order in the original file is preserved in the response. # List Per-Row Processing Results Source: https://docs.antonpayments.com/api-reference/batches/list-batch-results GET /v1/batches/{id}/results Return the per-row outcome of `processing`. For each original row you get the row number, outcome (`success`, `failed`, `skipped`, `pending`), the created `payout_id` (if any), and a human-readable reason for any non-success outcome. # List Batches Source: https://docs.antonpayments.com/api-reference/batches/list-batches GET /v1/batches Cursor-paginated list of batches for your merchant. Filter by `status` and/or the `created_at` range using `created_after` / `created_before`. Dates are RFC 3339 timestamps. # Upload a Batch Source: https://docs.antonpayments.com/api-reference/batches/upload-batch POST /v1/batches Upload a batch file (CSV or XLSX) containing many payout rows. The file is stored, hashed for duplicate detection, and queued for asynchronous validation. The response returns the batch in `uploaded` status; the status transitions to `validating`, then `validated` (or `validation_failed`) via webhook. After `validated`, review `GET /v1/batches/{id}` and the summary, then call `POST /v1/batches/{id}/confirm` to actually create the payouts. Confirmation expires — see `expires_at` on the batch record. Maximum file size: 32 MB. Maximum rows per batch: check current limits with support. # Archive a Beneficiary Source: https://docs.antonpayments.com/api-reference/beneficiaries/archive-beneficiary POST /v1/beneficiaries/{id}/archive Soft-disables a beneficiary. The record is preserved and can be restored later, but it cannot be used to initiate new payouts while archived. PII remains tokenized and accessible. Requires an `Idempotency-Key` header. # Confirm a Beneficiary Import Source: https://docs.antonpayments.com/api-reference/beneficiaries/confirm-beneficiary-import POST /v1/beneficiaries/import/{importID}/confirm Materializes beneficiaries for every row that passed preview validation. Invalid rows from the preview phase are skipped. Rows that pass preview but fail at create time (duplicate identity, vault failure, etc.) are reported in `errors[]`. The import row is marked `confirmed` once this call completes — even on partial failure. To re-run a subset, edit the source CSV and upload a fresh import. Requires an `Idempotency-Key` header. # Create a Beneficiary Source: https://docs.antonpayments.com/api-reference/beneficiaries/create-beneficiary POST /v1/beneficiaries Create a person (`individual`) or business (`business`) you want to pay. PII submitted in the request body is tokenized in a secure vault on creation — only a display name, country, and opaque token reference are stored in the Anton database. To retrieve the PII you submitted, use `GET /v1/beneficiaries/{id}/pii`. This endpoint requires an `Idempotency-Key` header. Duplicate calls with the same key return the original beneficiary; different bodies with the same key return `409 idempotency_conflict`. # Delete a Beneficiary Source: https://docs.antonpayments.com/api-reference/beneficiaries/delete-beneficiary DELETE /v1/beneficiaries/{id} Soft-deletes a beneficiary. The record is removed from active listings and can no longer be used to initiate new payouts. Historical payouts referencing this beneficiary remain unchanged and accessible. Archiving is typically preferred over deletion — see `POST /v1/beneficiaries/{id}/archive`. Archiving preserves the beneficiary in a disabled state that can be restored later. # Download the Beneficiary Import Template Source: https://docs.antonpayments.com/api-reference/beneficiaries/download-beneficiary-import-template GET /v1/beneficiaries/import/template Returns a ready-to-fill CSV template with the canonical header row and one or two example rows. Use this to anchor your import format — column order and casing matter. # Retrieve a Beneficiary Source: https://docs.antonpayments.com/api-reference/beneficiaries/get-beneficiary GET /v1/beneficiaries/{id} Return a single beneficiary by ID. Returns `404` if the beneficiary does not exist or belongs to a different merchant. # Preview a Bulk Beneficiary Import Source: https://docs.antonpayments.com/api-reference/beneficiaries/import-beneficiaries POST /v1/beneficiaries/import Upload a CSV file of beneficiaries (individual OR business — one type per file). The server parses every row, runs the same validation as `POST /v1/beneficiaries`, and returns per-row results. **No beneficiaries are created at this phase.** After reviewing the per-row errors, call `POST /v1/beneficiaries/import/{import_id}/confirm` to materialize the rows that passed validation. The preview row TTLs after 24 hours. Distinct from the `POST /v1/batches` flow: that endpoint creates beneficiaries + instruments + payouts in one shot. This endpoint creates only beneficiaries — for the merchant-portal beneficiary onboarding surface (ANT-241). Requires an `Idempotency-Key` header. Maximum file size: 8 MB. Only `.csv` is accepted in v1. # List Beneficiaries Source: https://docs.antonpayments.com/api-reference/beneficiaries/list-beneficiaries GET /v1/beneficiaries List beneficiaries scoped to your merchant. Results are cursor-paginated and sorted by creation time descending. # Rescore a Beneficiary Source: https://docs.antonpayments.com/api-reference/beneficiaries/rescore-beneficiary POST /v1/beneficiaries/{id}/rescore Ask the Anton Engine for a fresh Payee-pillar risk evaluation of this beneficiary now, instead of waiting for the next scheduled cadence. Synchronous: on success the response carries the new and previous risk scores (0–1000 integers, higher is ALWAYS worse) and tiers. Not the same as `POST /v1/beneficiaries/{id}/rescreen`, which queues a fresh check of the beneficiary rather than recomputing the risk score. Requires an `Idempotency-Key` header. # Re-screen a Beneficiary Source: https://docs.antonpayments.com/api-reference/beneficiaries/rescreen-beneficiary POST /v1/beneficiaries/{id}/rescreen Queue a fresh check of an active beneficiary. Asynchronous: responds `202` immediately. The beneficiary may become unavailable for payouts (`blocked`, with the `beneficiary.blocked` webhook event); otherwise nothing changes. Both the request and its outcome are audited. Not the same as `POST /v1/beneficiaries/{id}/rescore`, which recomputes the engine risk score. Requires an `Idempotency-Key` header. # Restore a Beneficiary Source: https://docs.antonpayments.com/api-reference/beneficiaries/restore-beneficiary POST /v1/beneficiaries/{id}/restore Restores a previously archived beneficiary to active status. Beneficiaries that cannot be used for payouts (`blocked`) cannot be restored via this endpoint — contact support. Requires an `Idempotency-Key` header. # Update a Beneficiary Source: https://docs.antonpayments.com/api-reference/beneficiaries/update-beneficiary PUT /v1/beneficiaries/{id} Update mutable fields on a beneficiary: `display_name`, `country`, `external_ref`, and `metadata`. PII cannot be updated via this endpoint — use `PUT /v1/beneficiaries/{id}/pii` instead, since PII is tokenized. Fields not present in the request body are left unchanged. # Replace Beneficiary PII Source: https://docs.antonpayments.com/api-reference/beneficiaries/update-beneficiary-pii PUT /v1/beneficiaries/{id}/pii Replaces the PII stored in the secure vault for this beneficiary. The entire PII blob is replaced — partial updates are not supported, because tokens are immutable. Supply the detail block matching the beneficiary's `type` (`individual` or `business`). The `display_name` on the beneficiary record is automatically re-derived from the new PII. **PII is write-only for machine credentials.** Your system is the source of the data, so you can deposit and replace it — but there is no companion GET on this surface: detokenized PII readback exists only in the merchant dashboard, restricted to admin users, with every access recorded in the audit log (PCI DSS 10.2.1). A leaked API credential therefore cannot harvest beneficiary identities. # List Active Corridors Source: https://docs.antonpayments.com/api-reference/corridors/list-corridors GET /v1/corridors Return every active payout corridor on your merchant account. A corridor is a (rail_type, currency, country, method, network) combination Anton can deliver payouts through. Use this to validate a (country, currency, method) combination before attempting `POST /v1/payouts`. Corridors not listed here will return `corridor_not_enabled`. # Errors Source: https://docs.antonpayments.com/api-reference/errors A complete reference for the error envelope, HTTP status codes, and every machine-readable error code returned by the Anton Payments API. Every non-2xx response returned by `/v1/*` carries the same JSON error envelope describing what went wrong. Every error — whether it originates in a handler or in middleware (authentication, permissions, rate limiting, idempotency, request timeouts) — includes a human-readable `message` and a machine-readable `code` your client can branch on. ## Standard error envelope ```json theme={} { "error": { "message": "insufficient funds for this payout", "code": "insufficient_balance" } } ``` | Field | Type | Always present | Description | | - | - | - | - | | `error.message` | string | Yes | Human-readable description. Safe to log; never contains PII. For 5xx errors, this is always the string `internal server error` — the detailed error is recorded server-side and can be correlated via `X-Request-ID`. | | `error.code` | string | Yes | Machine-readable snake\_case identifier. Safe to branch on. Every merchant-facing error returned by the API carries a code; the codes listed in the catalog below are the complete public surface. | | `error.details` | array or object | No | Additional context. Present on validation errors (see below). May be omitted from other error types. | ## Validation error envelope Requests that fail field-level validation return `422 Unprocessable Entity` with a `details` array. Each entry identifies the offending field and what it needs. ```json theme={} { "error": { "message": "validation failed", "code": "validation_error", "details": [ { "field": "source_amount", "message": "must be greater than zero" }, { "field": "dest_currency", "message": "is required" }, { "field": "individual.date_of_birth", "message": "must be exactly 10 characters" } ] } } ``` The `field` is dotted-path notation for nested objects (for example `individual.address.country`). Fix every entry in `details` and retry. ## HTTP status reference | Status | Meaning in the Anton API | | - | - | | `400 Bad Request` | Request body could not be parsed, contained unknown fields, or a URL parameter/path was malformed. | | `401 Unauthorized` | Missing, malformed, expired, or revoked credential. Re-authenticate before retrying. | | `403 Forbidden` | Authenticated but not permitted. Caused by insufficient role permissions, suspended/terminated merchant status, test-key-in-production, MFA enforcement, or a velocity block. | | `404 Not Found` | Resource does not exist under the calling merchant's scope. May also mean the resource exists but belongs to a different merchant — the API never distinguishes the two, to prevent tenant enumeration. | | `409 Conflict` | The resource's current state disallows the requested transition (for example, cancelling a completed payout), or an idempotency key was replayed with a different payload. | | `410 Gone` | The endpoint has been deprecated and removed. Follow the migration note in the response message. | | `413 Payload Too Large` | Request body exceeds the endpoint's limit (1 MB on most routes, 26 MB on document upload routes). | | `422 Unprocessable Entity` | Request was syntactically valid but semantically rejected — validation failure, insufficient balance, or a business-rule refusal. | | `429 Too Many Requests` | Per-merchant rate limit exceeded. Respect `Retry-After`. See [Rate limits](./rate-limits). | | `500 Internal Server Error` | An unexpected server error. Safe to retry with exponential backoff. The detailed error is never exposed to clients — correlate via `X-Request-ID`. | | `501 Not Implemented` | The endpoint exists but is not enabled in this environment due to missing configuration (for example, the engine admin token is not set on this API instance). Not a caller mistake. | | `503 Service Unavailable` | A downstream dependency (rail provider, FX provider, secure vault, identity provider) is degraded or circuit-broken. Retry with backoff. | | `504 Gateway Timeout` | The request exceeded the 25-second handler timeout. Retry; consider whether your payload can be split. | ## The `X-Request-ID` header Every response includes an `X-Request-ID` header. This ID is generated by the API when a request arrives (or echoed from the client when you set one on the request). Include this value when opening a support ticket — Anton retains the server-side log for every request keyed by this ID, and we can trace the failure without asking you to reproduce it. ```http theme={} HTTP/1.1 500 Internal Server Error Content-Type: application/json X-Request-ID: cu1h4o9s4g8p2m6f3v4g {"error":{"message":"internal server error","code":"internal_error"}} ``` ## Error code catalog The following codes are returned via the `code` field of the error envelope. Codes not listed here do not currently exist in the API — the merchant-facing surface has a small, deliberate set. ### Authentication | HTTP | `code` | Typical `error.message` | Cause | Remediation | | - | - | - | - | - | | `401` | `unauthorized` | `missing Authorization header` | No `Authorization` header sent. | Add `Authorization: DPoP ` plus a per-request `DPoP: ` header. See [Authentication](/authentication). | | `401` | `unauthorized` | `invalid Authorization header format` | Header scheme is neither `DPoP` nor `Bearer`. | Use `Authorization: DPoP ` for OAuth, `Bearer ` for portal JWT. | | `401` | `invalid_token` | `invalid or expired token` | OAuth access token signature, expiry, or audience is invalid. | Mint a new token via `POST /oauth/token`. | | `401` | `invalid_dpop_proof` | `invalid DPoP proof` | The `DPoP` header proof failed signature, `htm`, `htu`, `iat`, `jti`, `ath`, or `jkt` verification. | See the troubleshooting matrix on the [Authentication](/authentication) page. | | `401` | `static_api_keys_disabled` | `static API keys are no longer accepted` | An `Authorization: Bearer ak_*` header was sent. | Migrate to OAuth 2.0 + DPoP. See [Authentication](/authentication). | | `401` | `not_authenticated` | `not authenticated` | A handler ran without a resolved merchant or user context. Defense-in-depth check after the auth middleware. | Re-authenticate. The portal should redirect to the login flow. | | `401` | `merchant_context_required` | `merchant context required` | Token validated, but Anton could not resolve a merchant from it. | Re-authenticate; confirm the merchant binding on your portal user. | | `403` | `key_environment_mismatch` | `test tokens are not allowed in production` | A test-environment OAuth token was used against the production or staging API. | Use the right environment: production credentials issue tokens for `api.antonpayments.com`; sandbox credentials for `api.antonpayments.dev`. | | `503` | `oauth_unavailable` | `OAuth authentication is not configured on this instance` | Misconfigured deploy: OAuth signing key not set. Production refuses to start in this state, so this only surfaces in misconfigured non-prod environments. | Contact support. | ### Authorization and access | HTTP | `code` | `error.message` | Cause | Remediation | | - | - | - | - | - | | `403` | `capability_required` | `this endpoint requires the "payouts" account capability` | The merchant account does not hold the capability this endpoint requires — typical for an [AI-compliance-only account](/capabilities) calling a payout-surface endpoint. Effective access is always `scopes ∩ capabilities`, and the capability gate is checked first. | Not retryable. Contact Anton to change the account's capability tier. | | `403` | `insufficient_scope` | `this endpoint requires a credential with the "payouts" scope` | The account holds the capability, but the calling credential was created without the matching scope. | Not retryable with this credential. Use or create a credential carrying the required scope, then retry. See [Capabilities & Scopes](/capabilities). | | `403` | `insufficient_permissions` | `insufficient permissions` | For portal users: the caller's role does not grant the required permission. For API credentials: the credential's scopes do not map to the permission this endpoint requires (e.g. PII readback is never machine-grantable). | Portal: have a user with the right role act, or adjust team roles. API: check your credential's scopes; if the operation is dashboard-only by design, perform it there. | | `403` | `oauth_client_not_accepted` | `this endpoint is only available through the merchant dashboard` | An OAuth+DPoP credential called a dashboard-only endpoint — approval decisions, PII reveal, credential/team management, and similar human-only surfaces reject machine callers outright. | Not retryable with any API credential. Perform the action in the merchant dashboard. | | `403` | `api_key_not_accepted` | `this endpoint is only available through the merchant dashboard` | A legacy static API key called a dashboard-only endpoint. (Static keys are no longer accepted on v1 at all — see `401 static_api_keys_disabled`.) | Migrate to OAuth 2.0 + DPoP; dashboard-only operations remain dashboard-only. | | `403` | `role_forbidden` | various role-specific phrases (e.g. `only admin users can…`, `access denied`) | A handler-level role gate refused the action — admin-only fields, owner-only resources, technical/admin-only branding writes, etc. Distinct from `insufficient_permissions` (which is the middleware-level RBAC gate). | Have a user with the required role take the action. The UI should hide the affected control. | | `403` | `sandbox_only` | `sandbox … is not available in this environment` | A `/v1/merchant/sandbox/*` endpoint was called against production. | Only call sandbox endpoints in the sandbox environment. | | `403` | `merchant_suspended` | `merchant account is suspended` | Merchant account is in the `suspended` state. | Contact Anton support. | | `403` | `merchant_terminated` | `merchant account is terminated` | Merchant account is in the `terminated` state. | Contact Anton support. | | `403` | `merchant_not_active` | `merchant account is not yet active` | Merchant provisioning is still in progress. | Complete onboarding from the merchant dashboard. Contact Anton support if this persists. | | `403` | `merchant_not_found` | `merchant not found` | The authenticated merchant ID could not be resolved. | Re-authenticate; confirm the merchant exists. | ### Validation | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `422` | `validation_error` | One or more fields failed validation. The `details` array carries per-field errors. | Inspect `error.details[]` and fix each entry. | | `400` | `bad_request` | Returned by the idempotency middleware when the request body could not be read. | Retry the request; verify the body is well-formed JSON and under 1 MB. | | `400` | `invalid_request_body` | The request body could not be JSON-decoded — malformed JSON, unknown fields (the decoder rejects them), or wrong content type. | Confirm the body matches the documented schema. | | `400` | `missing_required_field` | An ad-hoc required field was missing — for example, `currency`, `id`, `domain`, or `email`. | Add the missing field. | | `400` | `invalid_email` | Email field is not a valid RFC 5322 address. | Fix the email value. | | `400` | `invalid_country_code` | Country value is not a 2-letter ISO 3166-1 alpha-2 code. | Use a valid country code (e.g. `US`, `GB`). | | `400` | `invalid_file` | Multipart upload was missing the `file` field. | Include a file under the `file` form field. | | `400` | `invalid_file_format` | Batch upload file is not `.csv` or `.xlsx`. | Resave the file in a supported format. | | `400` | `invalid_file_type` | Document or batch upload had an unsupported `Content-Type`. | Re-export the asset in a supported format. | | `400` | `invalid_multipart_form` | The multipart form could not be parsed. | Confirm the request is a properly-encoded `multipart/form-data` body. | | `400` | `invalid_template_format` | `GET /v1/batches/template?format=` was called with anything other than `xlsx` or `csv`. | Use one of the supported template formats. | | `400` | `invalid_url` | `support_url`, `terms_url`, or `privacy_url` is not a valid HTTPS URL. | Use an HTTPS URL. | | `400` | `invalid_display_name` | `display_name` exceeds 100 characters. | Use a shorter / valid display name. | | `400` | `invalid_scope` | `scope` query param on sandbox reset was not one of the allowed values. | Use `balances`, `all`, `delete-all`, or `full-reset`. | | `400` | `file_hash_mismatch` | Client-supplied `file_hash` does not match the server-computed SHA-256. | Recompute the hash on the file as it is being sent and resubmit. | ### Resource not found `404 Not Found` responses always carry a code identifying the missing resource. Anton never distinguishes "does not exist" from "exists but belongs to another merchant" — both return the same `*_not_found` envelope to prevent tenant enumeration. | HTTP | `code` | Returned by | | - | - | - | | `404` | `payout_not_found` | `GET /v1/payouts/{id}`, `GET /v1/payouts/{id}/events` | | `404` | `beneficiary_not_found` | All `/v1/beneficiaries/{id}*` reads/writes; instrument creation under a beneficiary | | `404` | `engine_beneficiary_not_found` | `POST /v1/beneficiaries/{id}/rescore` when the engine has no profile for this beneficiary yet (typically a brand-new beneficiary that has not yet been scored by the engine's background consumer) | | `404` | `instrument_not_found` | `GET/PUT/DELETE /v1/instruments/{id}` | | `404` | `batch_not_found` | All `/v1/batches/{id}*` endpoints | | `404` | `template_not_found` | `GET /v1/batches/template` when the template file is missing on the server | | `404` | `webhook_subscription_not_found` | `/v1/webhooks/{id}*` reads, secret rotation, test, deactivate | | `404` | `webhook_event_not_found` | `GET /v1/webhooks/events/{id}` | | `404` | `merchant_not_found` | Internal resolution of the authenticated merchant (rare — implies a token/session drift). | | `404` | `pricing_plan_not_found` | `POST /v1/pricing/quote` when no plan applies | | `404` | `account_not_found` | `/v1/accounts/{currency}*` | | `404` | `balance_not_found` | `GET /v1/balances/{currency}` | | `404` | `country_not_supported` | `GET /v1/instruments/methods?country=` for unsupported countries | | `404` | `quote_not_found` | `POST /v1/fx/exchange` with a `quote_id` that does not exist or is not owned by the merchant | ### Idempotency | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `400` | `missing_idempotency_key` | The endpoint requires an `Idempotency-Key` header and none was supplied. | Add a unique `Idempotency-Key` header. See [Idempotency](./idempotency). | | `409` | `idempotency_conflict` | An `Idempotency-Key` was reused with a different request payload. | Either retry the original payload with the same key, or use a new key for the new payload. Never mix. | | `409` | `idempotency_in_flight` | A prior request with the same `Idempotency-Key` is still being processed. | Wait briefly and retry with the **same** key — once the first attempt settles, the retry replays its response. | | `503` | `idempotency_unavailable` | The idempotency subsystem is temporarily unavailable. Anton fails closed rather than risk double-processing. | Retry with backoff, same key. | ### Rate limiting | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `429` | `rate_limit_exceeded` | Per-merchant rate limit has been exceeded (1,000 requests/minute on `/v1/*`; tighter limits apply to `/v1/fx/quote`, `/v1/fx/exchange`, and sensitive endpoints). | Honor the `Retry-After` header. Back off with jitter. See [Rate limits](./rate-limits). | ### Payouts | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `422` | `insufficient_balance` | The source balance cannot cover the payout amount plus fees. (Also returned by `POST /v1/fx/exchange` when the sell-side balance is too low.) | Top up the relevant currency balance, or reduce the amount. | | `403` | `velocity_blocked` | The payout was rejected by Anton's real-time risk policy (velocity/thresholds/geo). | Inspect `GET /v1/payouts/{id}/velocity-results` for the triggered rules. A `payout.velocity_blocked` webhook is also dispatched with the reason. | | `422` | `payout_rejected` | Catch-all for payout creation failures that are not validation, balance, or velocity related. | Inspect the message; correct the input or retry. See the `payout_rejected` sub-causes table below for the specific conditions this code covers. | | `422` | `payout_not_cancellable` | The payout's current state does not allow cancellation (already submitted to a rail, completed, `cannot_be_processed`, etc.). | Re-fetch the payout; cancellation is only valid before submission. | | `409` | `payout_on_hold` | The payout is under review (`on_hold: true`) and cannot be cancelled until the review concludes. The response gives no reason. | Wait for the next `payout.*` webhook, then retry if the payout is still cancellable. | #### `payout_rejected` sub-causes `payout_rejected` is a stable, coarse-grained code — your integration should pattern-match on `error.code`, not on `error.message`. Today it rolls up the following conditions in the API response. The `message` string distinguishes them, and the operational runbook (`api/docs/internal/integrations/`) carries the full mapping. Future API revisions may split any of these into a dedicated code; when that happens it will be announced as a breaking change with a minimum 90-day deprecation window on the catch-all. | Sub-cause | When it fires | Remediation | | - | - | - | | Archived or inactive beneficiary | The `beneficiary_id` exists but is `archived` or `inactive`. | Unarchive or activate the beneficiary via the merchant portal, or pick a different beneficiary. | | Archived or inactive instrument | The `instrument_id` is not in `active` status. | Activate or replace the instrument. | | Wrong-currency instrument | The instrument's currency doesn't match the payout's `dest_currency`. | Select an instrument whose currency matches the destination. | | Merchant not active / approved | The merchant is not in `active` status (still onboarding, suspended, etc.). | Complete onboarding or contact support. State-changes to `active` arrive via webhook. | | Invalid corridor | The source / destination currency pair is not enabled on your account. | Call `GET /v1/corridors` to enumerate enabled corridors. Contact support to request a new corridor. | | Pricing service unavailable | Transient backend failure computing the quote for this payout. | Retry with back-off. The same `Idempotency-Key` is safe to reuse once the service recovers. | #### Stable failure codes on payout events A payout that fails **after** creation (during asynchronous rail submission) transitions to `failed` and records a sanitized failure on its event timeline. Read it from `GET /v1/payouts/{id}/events` — the terminal event's `metadata` carries: | Metadata key | Contents | | - | - | | `failure_code` | Stable machine-readable code (table below). Branch on this, not on `reason`. | | `failure_category` | `validation`, `vault`, or `provider` — coarse grouping for dashboards and triage. | | `reason` | Short human-readable message. Safe to log and display; never contains internal error chains. | | `rail_error_code` | Present on provider-originated failures: the canonical rail classification, e.g. `rail_provider_rejected`, `rail_insufficient_funds`, `rail_timeout`. | | `rail_provider`, `rail_provider_code` | Present on provider-originated failures: which provider refused and its native code, where available. | | `failure_code` | Category | Meaning | Remediation | | - | - | - | - | | `beneficiary_not_found` | `validation` | The beneficiary record could not be loaded at submission time. | Verify the beneficiary exists and is active, then create a new payout. | | `vault_unavailable` | `vault` | The credential vault was temporarily unavailable; reserved funds were released. | Transient — create a new payout (fresh `Idempotency-Key`) after a short backoff. | | `detokenization_failed` | `vault` | Payment credentials or beneficiary details could not be retrieved from the vault; reserved funds were released. | Retry later; if persistent, re-create the instrument or contact support with the payout ID. | | `provider_registration_failed` | `provider` | The beneficiary could not be registered with the payment provider. | Check the beneficiary/instrument details for the destination corridor; contact support if they look correct. | | `provider_unavailable` | `provider` | The provider was unreachable, rate-limited, or timed out. | Transient — create a new payout after a backoff. | | `provider_rejected` | `provider` | The provider refused the payment instruction. Terminal for this payout. | Inspect `reason` and `rail_provider_code`; fix the beneficiary/instrument data before re-submitting. | | `insufficient_funds` | `provider` | The provider reported insufficient funds for the instruction. | Reserved funds are released back to your balance. Retry later or contact support. | On every terminal failure the full reserved amount (source + fees) is released back to your available balance, and a `payout.failed` webhook fires. The webhook payload carries the payout resource; fetch the events endpoint for the `failure_code`. ### Intelligence The strict Intelligence request contract returns two codes beyond the standard set. See [Intelligence — Rate Limits and Errors](/guides/intelligence/rate-limits-errors). | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `400` | `unknown_field` | The request contains a field outside the strict contract (unknown fields are rejected, not ignored). | Remove the field; pin to `contract_version: intelligence-public-v1`. | | `400` | `type_mismatch` | A field has the wrong JSON type. | Fix the type. | ### Batches | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `400` | `invalid_cursor` | `GET /v1/batches`, `GET /v1/batches/{id}/payouts`, or `GET /v1/ops/batches` was called with a `cursor` that is malformed or has been tampered with. | Drop the cursor and start from the first page, or use the `next_cursor` returned on the previous page verbatim. | | `400` | `file_hash_mismatch` | Client-supplied `file_hash` multipart field does not match the server-computed SHA-256 of the uploaded file. | Recompute the SHA-256 on the exact bytes being uploaded. | | `409` | `duplicate_file` | A batch file with the same SHA-256 hash is already `uploaded`, `validating`, `validated`, `confirmed`, or `processing` for this merchant. | Wait for the pending batch to finish, or cancel it. Use the `pending_batches` array on a non-error upload response to correlate. | | `409` | `batch_not_validated` | `POST /v1/batches/{id}/confirm` was called before the batch finished validating. | Poll for `validated` status before confirming. | | `409` | `batch_confirmation_expired` | The batch validation result expired before confirm was called. | Re-upload the file and retry. | | `409` | `batch_not_cancellable` | The batch is not in a cancellable state. | Re-fetch the batch; cancellation is only valid in early states. | | `422` | `batch_upload_failed` | Generic upload failure not covered by `duplicate_file` or `invalid_file_format`. | Retry; if persistent, file a support ticket with the `X-Request-ID`. | | `422` | `batch_confirm_failed` | Generic confirmation failure. | Inspect the message and retry. | | `422` | `batch_cancel_failed` | Generic cancellation failure. | Inspect the message and retry. | | `501` | `not_configured` | `GET /v1/batches/{id}/beneficiaries` was called on an API instance where the beneficiary service is not wired into the batch handler. Not a caller mistake. | Environment-level misconfiguration; contact support. Sandbox and production have this enabled. | > [!NOTE] > > Uploads larger than the 32 MB limit currently surface as `400 file_too_large` > (the BodySizeLimit middleware rejects oversize requests before the handler > runs). The catalog entry in the [Payload size](#payload-size) section reflects > the intended long-term shape (`413 file_too_large`); an internal fix is > tracked to align the status. ### Beneficiaries | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `422` | `duplicate_beneficiary` | A beneficiary with the same fingerprint already exists for the merchant. | Reuse the existing beneficiary. | | `422` | `invalid_display_name` | The supplied display name is missing or invalid. | Provide a valid display name. | | `422` | `missing_beneficiary_details` | Neither `individual` nor `business` details were provided. | Include the appropriate detail block for the beneficiary type. | | `422` | `beneficiary_create_failed` | Catch-all for creation failures (vault tokenization, database). The detailed cause is logged server-side. | Retry; share the `X-Request-ID` if persistent. | | `422` | `beneficiary_update_failed` | Generic update failure. | Inspect the message; retry. | | `422` | `beneficiary_pii_update_failed` | PII update in the secure vault failed. | Retry; if persistent, share the `X-Request-ID`. | | `422` | `beneficiary_archive_failed` | Generic archive failure. | Inspect the message; retry. | | `422` | `beneficiary_restore_failed` | Generic restore failure. | Inspect the message; retry. | | `422` | `beneficiary_delete_failed` | Generic delete failure. | Inspect the message; retry. | ### Beneficiary rescore Codes returned only by `POST /v1/beneficiaries/{id}/rescore`. | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `404` | `engine_beneficiary_not_found` | The beneficiary exists under this merchant, but the Anton Engine has not yet seeded a profile for it. Typically seen on brand-new beneficiaries before the first payout. | Wait for the engine's beneficiary-events consumer to write the profile (usually seconds; definitely after the next payout), then retry. | | `409` | `beneficiary_scoring_locked` | The beneficiary is in a terminal scoring state (permanently locked by the engine) and cannot be rescored. | Do not retry. Contact support if a rescore is required. | | `429` | `rescore_rate_limited` | A rescore for this beneficiary completed recently — the engine applies a cooldown to prevent churn. Distinct from `rate_limit_exceeded`, which is the per-merchant request quota. | Honor the `Retry-After` header before retrying. | | `501` | `rescore_not_configured` | Manual rescore is not enabled on this API instance (the engine admin token is not configured). Environment-level configuration issue, not a caller mistake. | Contact support — the environment needs the engine admin token provisioned. | ### Instruments | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `410` | `deprecated_endpoint` | The flat `POST /v1/instruments` route is deprecated. | Use `POST /v1/beneficiaries/{id}/instruments`. | | `422` | `duplicate_instrument` | An instrument with the same fingerprint already exists for the beneficiary. | Reuse the existing instrument. | | `422` | `invalid_credentials` | The instrument credentials (IBAN check digit, account number, routing number) failed validation. | Fix the input. | | `422` | `method_not_supported` | The requested payment method is not supported for the country. | Use a method valid for the destination country. | | `422` | `instrument_create_failed` | Catch-all creation failure (vault tokenization, database). | Retry; share the `X-Request-ID` if persistent. | | `422` | `instrument_update_failed` | Generic update failure. | Inspect the message; retry. | | `422` | `instrument_delete_failed` | Generic delete failure. | Inspect the message; retry. | ### FX | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `400` | `currency_not_supported` | One or both currencies in the quote/exchange request are not supported. | Use a supported corridor. | | `410` | `quote_expired` | The locked quote referenced by `quote_id` has expired. | Generate a new quote and retry. | | `400` | `quote_not_locked` | `POST /v1/fx/exchange` was called with a `quote_id` that points to an indicative (non-lockable) quote. | Use a locked quote — call `POST /v1/fx/quote` first. | | `422` | `no_funding_account` | The merchant has no funding account in the sell currency. | Fund the account first via `/v1/accounts/...`. | | `422` | `no_buy_account` | `POST /v1/fx/exchange` — the merchant has no funding account in the `buy_currency`, so the exchange cannot be credited. Previously surfaced as `500`; now deterministic per ANT-55. | Provision the buy-side account (contact ops) and retry. | | `502` | `fx_rates_unavailable` | The upstream FX rate provider is degraded or unavailable. | Retry with backoff. | | `503` | `locked_rate_unavailable` | The provider returned an indicative rate when a locked rate was requested. | Retry shortly. | | `500` | `fx_execution_failed` | Exchange execution failed in a way that does not map to insufficient balance or a quote issue. The message is sanitized; the real cause is logged with the `X-Request-ID`. | Retry with backoff; share the `X-Request-ID` if persistent. | ### Webhook subscriptions Structured codes returned by `POST /v1/webhooks`: | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `400` | `webhook_url_required` | `url` field was missing or empty. | Send a non-empty `url`. | | `400` | `webhook_url_invalid` | `url` field could not be parsed as a URL. | Send a syntactically valid URL. | | `400` | `webhook_url_not_https` | The `url` field used a non-`https://` scheme. HTTP is rejected in production, staging, and sandbox — it is only permitted against local development APIs. | Use `https://` and a valid TLS certificate. | | `400` | `webhook_url_private_address` | The `url` host is a loopback, RFC1918/ULA private address, link-local address, `.local` / `.internal` hostname, or a cloud metadata endpoint (for example `169.254.169.254`). Anton refuses to register these targets (SSRF and credential-exfiltration defense). | Use a publicly reachable, internet-routable endpoint. | ### Payload size | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `413` | `file_too_large` | Upload exceeds the per-endpoint cap (2 MB for branding assets, 5 MB for user avatars, 25 MB for documents, 32 MB for batches). | Reduce the file size. The message includes the applicable limit. | ### Sandbox-only These codes are returned only by the `/v1/merchant/sandbox/*` routes, which are registered only in sandbox-class environments. Production merchants will never see them. | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `422` | `no_beneficiaries` | `POST /v1/merchant/sandbox/seed-payouts` was called before any beneficiaries existed for the merchant. | Call `/v1/merchant/sandbox/seed-beneficiaries` first. | | `429` | `rate_limited_sandbox_reset` | Sandbox reset is capped at 10 invocations per merchant per hour. | Wait for the counter to reset. | | `429` | `rate_limited_sandbox_seed` | Sandbox seeding is capped at 10 invocations per merchant per hour. | Wait for the counter to reset. | | `503` | `sandbox_seeder_unavailable` | Sandbox account seeder is not configured. | Surface a support ticket; this is an environment misconfiguration. | | `503` | `beneficiary_seeder_unavailable` | Beneficiary seeder is not configured. | Same as above. | | `503` | `payout_seeder_unavailable` | Payout seeder is not configured. | Same as above. | | `500` | `sandbox_reset_failed` | Sandbox reset failed during wipe or reseed. | Retry; share the `X-Request-ID` if persistent. | | `500` | `seed_beneficiaries_failed` | Sample beneficiary seeder failed — unexpected error during tokenization or persistence. Distinct from `duplicate_beneficiary` / `duplicate_instrument` (422), which indicate the seeder already ran. | Retry; share the `X-Request-ID` if persistent. | | `500` | `seed_payouts_failed` | Sample payout seeder failed. | Retry; share the `X-Request-ID` if persistent. | ### Server and infrastructure | HTTP | `code` | Meaning | Remediation | | - | - | - | - | | `500` | `internal_error` | Unexpected server error. `message` is always `internal server error` — the real cause is logged with the `X-Request-ID`. | Retry with exponential backoff. If the failure persists, share the `X-Request-ID` with support. | | `504` | `timeout` | Handler exceeded the 25-second request timeout. | Retry. For large batches or reports, prefer asynchronous endpoints. | ## Retry semantics Not every error is safe to retry. The table below is a safe default — apply stricter rules where your integration's correctness depends on it. | Category | Safe to retry? | Notes | | - | - | - | | `500`, `502`, `503`, `504` | Yes | Use exponential backoff with jitter. Always include the same `Idempotency-Key` on mutating retries so a partially-processed request is not duplicated. | | `429 rate_limit_exceeded` | Yes | Wait at least the `Retry-After` value before the first retry. | | `429 rescore_rate_limited` | Yes | Beneficiary-specific rescore cooldown. Honor `Retry-After`. | | `501 rescore_not_configured` | No | Environment is missing the engine admin token. Contact support. | | `409 beneficiary_scoring_locked` | No | Beneficiary is permanently locked. Retrying will fail identically. | | `404 engine_beneficiary_not_found` | Conditional | Retry only after the engine has seeded a profile (typically after the next payout). | | Transient network errors (connection reset, DNS failure, TLS reset) | Yes | Treat the same as a 5xx. Retry with the same `Idempotency-Key`. | | `400`, `404`, `410`, `413`, `422 validation_error` | No | Fix the request. Retrying will fail identically. | | `401` | No | Re-authenticate first. Do not loop on 401. | | `403 insufficient_permissions`, `403 mfa_enrollment_required`, `403 velocity_blocked` | No | Policy or permission issue. Resolve upstream before retrying. | | `403 capability_required`, `403 insufficient_scope` | No | Account-tier or credential-scope gate. Fails identically until the account capability or credential changes. See [Capabilities & Scopes](/capabilities). | | `409 idempotency_conflict` | No | You sent a new payload under a used key. Generate a new key. | | `409 idempotency_in_flight` | Yes (same key) | The original attempt is still processing. Wait briefly, retry with the same key to replay its response. | | `409` state conflicts (batch, payout, approval) | Conditional | Re-fetch the resource; retry only if the current state actually permits the action. | | `422 insufficient_balance` | No | Top up first. | | `422` beneficiary/instrument service errors (`duplicate_beneficiary`, `invalid_display_name`, `missing_beneficiary_details`, `duplicate_instrument`, `invalid_credentials`, `method_not_supported`, etc.) | No | Fix input, then retry with a fresh idempotency key. | | `422 quote_expired`, `422 fx_rates_unavailable`, `503 locked_rate_unavailable` | Yes (re-quote) | Generate a fresh quote and retry the exchange. | > [!WARNING] > > When retrying a mutating request (`POST`, `PUT`, `PATCH`), always send the > same `Idempotency-Key` you used on the original attempt. Without it, the > server cannot distinguish a retry from a new request, and you risk > double-processing. See [Idempotency](./idempotency). ## Handling errors in code ```javascript Node.js theme={} const res = await fetch("https://api.antonpayments.dev/v1/payouts", { method: "POST", headers: { Authorization: `DPoP ${accessToken}`, DPoP: dpopProof("POST", "https://api.antonpayments.dev/v1/payouts", accessToken), "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify(payout), }); if (!res.ok) { const { error } = await res.json(); const requestId = res.headers.get("X-Request-ID"); switch (error.code) { case "validation_error": // error.details is an array of { field, message } break; case "insufficient_balance": // prompt user to top up break; case "velocity_blocked": // inspect /velocity-results break; case "rate_limit_exceeded": { const retryAfter = Number(res.headers.get("Retry-After") ?? 1); await new Promise((r) => setTimeout(r, retryAfter \* 1000)); break; } case "idempotency_conflict": // generate a new key; do not reuse the old one break; default: if (res.status >= 500) { // retry with backoff; include requestId in logs } } } ``` ```python Python theme={} import time, requests res = requests.post( "https://api.antonpayments.dev/v1/payouts", headers={ # dpop_proof is signed per request and binds this method + URL. # See /authentication for how to generate it. "Authorization": f"DPoP {access_token}", "DPoP": dpop_proof, "Idempotency-Key": idempotency_key, }, json=payout, ) if not res.ok: err = res.json()["error"] request_id = res.headers.get("X-Request-ID") code = err.get("code") if code == "validation_error": for d in err["details"]: print(f"{d['field']}: {d['message']}") elif code == "rate_limit_exceeded": time.sleep(int(res.headers.get("Retry-After", "1"))) elif code == "idempotency_conflict": # generate a new key before retrying pass elif res.status_code >= 500: # exponential backoff; log request_id pass ``` > [!NOTE] > > When contacting Anton support about a failed request, include the > `X-Request-ID` header value from the response. Anton retains a full > server-side trace keyed by that ID and can diagnose without asking you to > reproduce. # Create a Lockable FX Quote Source: https://docs.antonpayments.com/api-reference/fx/create-fx-quote POST /v1/fx/quote Request a lockable exchange rate between two currencies. Quotes have a short expiry window; use the returned `id` on `POST /v1/fx/exchange` to lock the rate before expiry. You must supply **at least one** of `sell_amount` or `buy_amount` — omitting both returns `400 missing_required_field`. (The two are individually optional but not both.) Rate-limited to 30 per minute per IP. # Execute an FX Exchange Source: https://docs.antonpayments.com/api-reference/fx/execute-fx-exchange POST /v1/fx/exchange Exchange a locked quote — debits the sell currency balance and credits the buy currency balance. The quote must still be within its validity window; expired quotes return `quote_expired`. Rate-limited to 10 per minute per IP. Requires `Idempotency-Key`. # Retrieve an Indicative Rate Source: https://docs.antonpayments.com/api-reference/fx/get-indicative-fx-rate GET /v1/fx/rate Non-binding rate between two currencies. Cheaper than a lockable quote; use for display purposes. Rate-limited to 30 per minute per IP. # List FX Exchanges Source: https://docs.antonpayments.com/api-reference/fx/list-fx-exchanges GET /v1/fx/exchanges Cursor-paginated history of executed FX exchanges for your merchant. # Idempotency Source: https://docs.antonpayments.com/api-reference/idempotency Safely retry any mutating request without creating duplicates. Network failures happen. When you call `POST /v1/payouts` and the connection drops before you receive the response, you don't know whether the payout was created. Retrying naively could create a duplicate. **Idempotency keys** solve this. Include a unique key with your request, and Anton guarantees the operation happens at most once — even if you send the same request many times. ## How to use Add the `Idempotency-Key` header to any `POST`, `PUT`, or `PATCH` request: ```bash theme={} curl https://api.antonpayments.dev/v1/payouts \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: payout-inv-1042-2026-04-15" \ -d '{ "beneficiary_id": "ben_cng3q8s6ek9kc5qg1h1g", "amount": "500.00", "currency": "USD", "description": "Invoice #1042" }' ``` If you send the same request with the same key again, Anton returns the original response instead of creating a duplicate. Replayed responses include `X-Idempotent-Replayed: true` so you can tell a replay from a fresh result. ## Required vs. optional Some endpoints require an idempotency key and return `400 missing_idempotency_key` if you omit one — payout creation, beneficiary creation, batch confirmation, webhook subscription creation, authenticated intelligence evaluation creation, and a handful of others. The endpoint documentation lists the requirement explicitly. Endpoints that accept an optional key will still honor it — a good default is to send one on every mutation. ## Key requirements | Rule | Detail | | - | - | | **Unique per operation** | Use a different key for each logically distinct operation. | | **Deterministic** | Use the same key when retrying the same operation. | | **Max length** | 255 characters. | | **Retention** | Keys are remembered for 24 hours, then discarded. | ## Generating good keys The best idempotency keys are deterministic — derived from your own business data — so that a retry after a crash produces the same key without you having to remember whether the request succeeded. ```bash cURL theme={} # Deterministic from your business data curl ... -H "Idempotency-Key: payout-${INVOICE_ID}-${BENEFICIARY_ID}" ``` ```javascript JavaScript theme={} import { createHash, randomUUID } from "node:crypto"; // Deterministic from your data — recommended const key = `payout-${invoiceId}-${beneficiaryId}`; // Hash of the request body — works when no natural key exists const bodyKey = createHash("sha256") .update(JSON.stringify(payoutBody)) .digest("hex"); // UUID — simplest, but requires you to persist it for safe retries const uuidKey = randomUUID(); ``` ```php PHP theme={} // Deterministic from your data — recommended $key = "payout-{$invoiceId}-{$beneficiaryId}"; // Hash of the request body — works when no natural key exists $bodyKey = hash('sha256', json_encode($payoutBody)); // UUID — simplest, but requires you to persist it for safe retries $uuidKey = bin2hex(random_bytes(16)); ``` ```go Go theme={} // Deterministic from your data — recommended key := fmt.Sprintf("payout-%s-%s", invoiceID, beneficiaryID) // Hash of the request body — works when no natural key exists sum := sha256.Sum256(body) bodyKey := hex.EncodeToString(sum[:]) // UUID — simplest, but requires you to persist it for safe retries uuidKey := uuid.NewString() ``` > [!TIP] > > **Prefer deterministic keys.** If your process crashes between sending a request and persisting its response, a deterministic key lets you retry safely without needing to remember whether the request went through. ## Behavior | Scenario | Result | | - | - | | Same key + same body | Original response replayed with `X-Idempotent-Replayed: true`. | | Same key + different body | `409 idempotency_conflict` — Anton refuses to replay a different operation under an existing key. | | Same key while the first attempt is still processing | `409 idempotency_in_flight` — wait briefly and retry with the same key to replay the settled response. | | Different key + same body | Treated as a new request. Creates a new resource. | | No key on a required endpoint | `400 missing_idempotency_key`. | | Idempotency subsystem unavailable | `503 idempotency_unavailable` — Anton fails closed rather than risk double-processing. Retry with backoff, same key. | ## What idempotency does not cover * **`GET` requests** — already safe to retry. * **Soft deletes** (archive/restore, cancel) — repeated calls converge on the same state, so they're naturally idempotent. * **Screening, routing, or rail outcomes** — idempotency guarantees Anton won't *create* the same payout twice. It does not guarantee the same downstream routing or settlement result if you submit two different payouts back-to-back. # Create an Instrument for a Beneficiary Source: https://docs.antonpayments.com/api-reference/instruments/create-instrument-for-beneficiary POST /v1/beneficiaries/{id}/instruments Attach a payment instrument to a beneficiary. The credentials you submit (bank account numbers, wallet addresses, card PANs) are tokenized in Basis Theory on receipt — Anton's core database stores only a token reference, a display-only masked value, and a content fingerprint used for cross-merchant deduplication. The request body shape depends on the `method` — each method has a distinct credential schema. See the [Instruments methods endpoint](#tag/Reference-Data/operation/listPaymentMethods) for the full per-country method catalog. Requires an `Idempotency-Key` header. # Delete an Instrument Source: https://docs.antonpayments.com/api-reference/instruments/delete-instrument DELETE /v1/instruments/{id} Soft-delete an instrument. The instrument is removed from active listings and cannot be used on new payouts. Historical payouts referencing it remain accessible and unchanged. # Retrieve an Instrument Source: https://docs.antonpayments.com/api-reference/instruments/get-instrument GET /v1/instruments/{id} Return a single instrument by ID. # List Countries Available for Instruments Source: https://docs.antonpayments.com/api-reference/instruments/list-instrument-countries GET /v1/instruments/countries Lightweight country list scoped to the countries Anton can deliver payouts to. Use this to populate country dropdowns in an instrument- creation form — paired with `/v1/instruments/methods` to build the full method picker. For the full reference catalog (including IS3 codes and currency lists), use `/v1/countries` instead. # List Payment-Method Schemas Source: https://docs.antonpayments.com/api-reference/instruments/list-instrument-methods GET /v1/instruments/methods Return the per-country method catalog with the exact credential-field schema required for each method. Use this to drive dynamic instrument- creation forms that know which fields to prompt for based on the selected country and method. # List Instruments Source: https://docs.antonpayments.com/api-reference/instruments/list-instruments GET /v1/instruments List payment instruments across all beneficiaries in your merchant scope. Use the `beneficiary_id` filter to narrow to a single beneficiary (or call `GET /v1/beneficiaries/{id}/instruments`, which returns the same result). # List a Beneficiary's Instruments Source: https://docs.antonpayments.com/api-reference/instruments/list-instruments-for-beneficiary GET /v1/beneficiaries/{id}/instruments Return all payment instruments attached to this beneficiary. # Update an Instrument Source: https://docs.antonpayments.com/api-reference/instruments/update-instrument PUT /v1/instruments/{id} Update the mutable fields on an instrument — `label`, `is_default`, and `status`. Credentials cannot be updated; create a new instrument and delete the old one to replace them. # Create an Intelligence Evaluation Source: https://docs.antonpayments.com/api-reference/intelligence/create-evaluation POST /v1/intelligence/evaluations Evaluates payee, instrument, payout, merchant onboarding, or monitoring inputs through Anton Intelligence. The request contract is strict and uses fixed enums so enterprise clients can generate SDKs safely. Direct PII may be supplied over TLS or recovered from a vault token; Anton uses it in memory for the evaluation and persists only redacted decision evidence. **Per-use-case required fields.** Beyond the always-required `use_case` and `entity.type`, each use case imposes additional requirements (a `422 validation_error` otherwise): - `payee_registration` — `entity.name` OR `entity.vault_token_id`. - `merchant_onboarding` — `entity.type` must be `business`, plus `entity.name` OR `entity.vault_token_id`. - `instrument_screening` — an `instrument` block. - `payout_screening` — a `payout` block, plus searchable `entity` or `instrument` data. - `monitoring` — searchable `entity` or `instrument` data. These conditional requirements can't be expressed in the static `required` arrays below, so they are enumerated here. **Dual surface.** With OAuth+DPoP credentials, the evaluation is persisted under YOUR merchant account (retrievable via the scoped reads below) and the `Idempotency-Key` header is REQUIRED. The credential must carry the `intelligence` scope and the account the `intelligence` capability — every Anton account has it, including AI-compliance-only merchants. Vault-token enrichment only accepts tokens owned by the calling merchant. Without credentials, the request runs on the anonymous public TEST surface (where enabled) under a synthetic shared merchant — public evaluations are not tied to your account. **Asynchronous money-movement evaluations.** On the authenticated (OAuth+DPoP) surface, a `payout_screening` evaluation runs the full AI panel and can take up to ~20 seconds, so it is accepted asynchronously: the response is `202 Accepted` with `{evaluation_id, status: "pending"}` and a `Location` header. Poll `GET /v1/intelligence/evaluations/{id}` (which returns the pending state until the evaluation settles), or subscribe to the `intelligence.evaluation.completed` / `intelligence.evaluation.failed` webhook events for push notification. All other use cases — and every call on the anonymous test surface — respond synchronously with `200` and the full evaluation. # Get an Intelligence Evaluation Source: https://docs.antonpayments.com/api-reference/intelligence/get-evaluation GET /v1/intelligence/evaluations/{id} Strictly scoped to the calling surface: authenticated callers can only retrieve evaluations created under their own merchant account; anonymous callers can only retrieve public-test evaluations. A foreign evaluation ID is a 404 — indistinguishable from a nonexistent one. # Get Intelligence Evidence Source: https://docs.antonpayments.com/api-reference/intelligence/get-evidence GET /v1/intelligence/evaluations/{id}/evidence Returns provider-neutral, PII-free evidence and records an audit event. Scoped identically to the evaluation read — your own evaluations only. # List Intelligence Evaluations Source: https://docs.antonpayments.com/api-reference/intelligence/list-evaluations GET /v1/intelligence/evaluations Pages the authenticated merchant's evaluations, newest first. Authenticated-only — there is no anonymous variant. Strictly merchant-scoped: only evaluations created under your account appear. Requires the `intelligence` credential scope and account capability. Every filter is optional; an unknown value is a 400, never an empty list. # Validate an Intelligence Evaluation Source: https://docs.antonpayments.com/api-reference/intelligence/validate-evaluation POST /v1/intelligence/evaluations/validate Validates the strict request contract without creating or persisting an evaluation. Works on both the authenticated and (where enabled) anonymous public surface. # API Reference Source: https://docs.antonpayments.com/api-reference/introduction The Anton Payments merchant API. Versioned, idempotent, cursor-paginated. The Anton API is a REST API over HTTPS. All requests and responses are JSON. All dates are ISO 8601 UTC. All monetary amounts are **decimal strings** — never floats — to avoid rounding errors. ## Base URLs | Environment | Base URL | | - | - | | Production | `https://api.antonpayments.com` | | Sandbox | `https://api.antonpayments.dev` | ## Authentication Every request requires an OAuth 2.0 access token (DPoP-bound) AND a per-request DPoP proof. Static API keys are not accepted on v1. See [Authentication](/authentication) for the full flow, including a copy-paste curl quickstart. ```http theme={} Authorization: DPoP DPoP: ``` Access is additionally governed by **account capabilities** and **credential scopes** (`payouts`, `intelligence`) — effective access is `scopes ∩ capabilities`, and out-of-capability calls fail with `403 capability_required` / `403 insufficient_scope`. See [Capabilities & Scopes](/capabilities). ## Conventions * **Versioning.** All endpoints live under `/v1/`. Breaking changes ship as a new version; `/v1/` remains available for the life of the contract. * **JSON.** Request bodies are `application/json`. Field names are `snake_case`. Unknown fields in requests are rejected with `422`. * **Amounts.** Monetary values are strings: `"1234.56"`, not `1234.56`. Parse them as decimals, not floats. * **Timestamps.** RFC 3339 / ISO 8601 in UTC: `"2026-04-15T13:45:02Z"`. * **Identifiers.** Prefixed opaque strings: `pay_...`, `ben_...`, `mer_...`, `ins_...`, `bat_...`, `wbh_...`. Treat them as opaque — do not parse or compare substrings. * **Errors.** Every error response follows a consistent envelope with a machine-readable `code` and a human-readable `message`. See [Errors](/api-reference/errors). ## Cross-cutting topics > [card] [Idempotency](/api-reference/idempotency) > > Safely retry any mutation with `Idempotency-Key`. > [card] [Pagination](/api-reference/pagination) > > Cursor-based pagination on every list endpoint. > [card] [Rate limits](/api-reference/rate-limits) > > Per-merchant and per-endpoint request ceilings. > [card] [Errors](/api-reference/errors) > > Error envelope, status codes, and remediation. > [card] [Webhook events](/api-reference/webhook-events) > > Every event type and its payload schema. > [card] [Webhook signing](/api-reference/webhook-signing) > > Verify signatures on every incoming delivery. # IP Allowlist Source: https://docs.antonpayments.com/api-reference/ip-allowlist Anton's outbound IP addresses for firewall and security policy configuration. > [!NOTE] > > Placeholder. IPs are being stabilized and will be published here within the week. > > When finalized, this page should include: > > * **Webhook delivery IPs** — the source IPs Anton sends webhook requests from. Add these to your ingress allowlist if your webhook endpoint is firewalled. > * **API ingress CIDR blocks** (if Anton publishes merchant-inbound ranges). > * **Per-environment**: separate IPs for production, sandbox, and staging where applicable. > * **Change policy**: how much notice is given before an IP set changes. ## Production *To be published.* ## Sandbox *To be published.* # Pagination Source: https://docs.antonpayments.com/api-reference/pagination All list endpoints use cursor-based pagination. Every `GET` endpoint that returns a collection paginates with opaque cursors. There are no page numbers, no offsets, no totals — cursors are forward-only pointers into the result set. ## Parameters | Parameter | Type | Default | Max | Description | | - | - | - | - | - | | `limit` | integer | 20 | 100 | Items per page. See [Limit validation](#limit-validation) for how out-of-range values are handled. | | `cursor` | string | — | — | Opaque cursor from a previous response. Omit to start from the beginning. | ### Limit validation Anton currently has two limit-handling paths across list endpoints. Both cap the page at 100 items, but they differ on how an overflow is surfaced: | Behavior | Endpoints | Response to `limit=200` | | - | - | - | | **Strict** | Newer list endpoints (for example, beneficiaries, instruments, webhook subscriptions, webhook events). | `400 invalid_limit` — the request is rejected outright. | | **Silent cap** | Older list endpoints (for example, payouts). | Request succeeds; server silently applies the 100-item ceiling (and falls back to the default of 20 when the input cannot be parsed). | **Guidance for integrators:** treat the strict contract as authoritative. Always request `limit` values in the `1..100` range. Do not rely on the silent-cap behavior — Anton may migrate all endpoints to strict validation in a future release, at which point over-limit requests will uniformly return `400 invalid_limit`. ## Response envelope ```json theme={} { "data": [ { "id": "pay_abc123", "status": "completed", "amount": "500.00" }, { "id": "pay_def456", "status": "processing", "amount": "1200.00" } ], "has_more": true, "next_cursor": "eyJpZCI6InBheV9kZWY0NTYifQ" } ``` | Field | Description | | - | - | | `data` | Array of results for this page. | | `has_more` | `true` if more results exist beyond this page. | | `next_cursor` | Cursor to pass in the next request. Present only when `has_more` is `true`. | The last page omits `next_cursor` and sets `has_more` to `false`: ```json theme={} { "data": [ { "id": "pay_xyz789", "status": "completed", "amount": "300.00" } ], "has_more": false } ``` ## Iterating through pages ```bash cURL theme={} # First page curl "https://api.antonpayments.dev/v1/payouts?limit=100" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" # Subsequent page — pass next_cursor from the prior response as cursor curl "https://api.antonpayments.dev/v1/payouts?limit=100&cursor=eyJpZCI6InBheV9kZWY0NTYifQ" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` ```javascript JavaScript theme={} async function listAllPayouts(apiKey) { const payouts = []; let cursor; while (true) { const url = new URL("https://api.antonpayments.dev/v1/payouts"); url.searchParams.set("limit", "100"); if (cursor) url.searchParams.set("cursor", cursor); const response = await fetch(url, { headers: { Authorization: `DPoP ${accessToken}` }, }); const page = await response.json(); payouts.push(...page.data); if (!page.has_more) break; cursor = page.next_cursor; } return payouts; } ``` ```php PHP theme={} function listAllPayouts(string $apiKey): array { $payouts = []; $cursor = null; while (true) { $query = http_build_query(array_filter([ 'limit' => 100, 'cursor' => $cursor, ])); $ch = curl_init("https://api.antonpayments.dev/v1/payouts?$query"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ["Authorization: DPoP $accessToken"], ]); $page = json_decode(curl_exec($ch), true); curl_close($ch); $payouts = array_merge($payouts, $page['data']); if (!$page['has_more']) break; $cursor = $page['next_cursor']; } return $payouts; } ``` ```go Go theme={} func ListAllPayouts(apiKey string) ([]Payout, error) { var payouts []Payout cursor := "" for { u, _ := url.Parse("https://api.antonpayments.dev/v1/payouts") q := u.Query() q.Set("limit", "100") if cursor != "" { q.Set("cursor", cursor) } u.RawQuery = q.Encode() req, _ := http.NewRequest("GET", u.String(), nil) req.Header.Set("Authorization", "DPoP "+accessToken) resp, err := http.DefaultClient.Do(req) if err != nil { return nil, err } var page struct { Data []Payout `json:"data"` HasMore bool `json:"has_more"` NextCursor string `json:"next_cursor"` } json.NewDecoder(resp.Body).Decode(&page) resp.Body.Close() payouts = append(payouts, page.Data...) if !page.HasMore { break } cursor = page.NextCursor } return payouts, nil } ``` ## Rules > [accordion] Use the maximum page size > > Set `limit=100` to minimize round trips when fetching large result sets. > [accordion] Stop when has\_more is false > > `has_more` is the only correct termination signal. Don't compare `len(data)` to `limit` — the last page may be full. > [accordion] Cursors are opaque > > Treat cursor values as opaque strings. Do not parse, modify, or construct them. Always pass the exact `next_cursor` value returned by the API. > [accordion] Cursors don't expire > > Cursor values remain valid indefinitely. You can store a cursor and resume pagination later — useful for long-running exports. # Cancel a Payout Source: https://docs.antonpayments.com/api-reference/payouts/cancel-payout POST /v1/payouts/{id}/cancel Cancel a payout that has not yet been submitted to a rail. Cancellation is only possible from `created`, `pending_screening`, `pending_approval`, or `approved`. Once a payout reaches `processing` or beyond, it cannot be cancelled via the API — contact support if you need to halt a payout in flight. A payout that is on hold (`on_hold: true` — for example in `manual_review` or `pending_engine_review`) cannot be cancelled until the review concludes; the request returns `409` with code `payout_on_hold`. A payout in `cannot_be_processed` cannot be cancelled via the API. Any debited source funds (source amount, fee, and cross-currency buffer) are released back to the merchant balance on successful cancellation. Requires an `Idempotency-Key` header. # Create a Payout Source: https://docs.antonpayments.com/api-reference/payouts/create-payout POST /v1/payouts Initiate a payout from your merchant balance to a beneficiary's payment instrument. The payout goes through compliance screening, velocity evaluation, and engine risk scoring before being submitted to a rail — see [How Anton Evaluates Payouts](/how-anton-evaluates-payouts) for the full lifecycle. The initial status is `created`. The payout transitions to `pending_screening` within moments and its subsequent state changes are delivered via `payout.*` webhook events. Do not poll. Both `source_amount` and `dest_amount` must be provided along with `fixed_side` (`fixed_source` or `fixed_dest`) indicating which amount is authoritative. The other amount is recomputed on the backend using the current corridor pricing. An FX quote may be locked via `POST /v1/fx/quote` if you need rate certainty before submission. Requires an `Idempotency-Key` header. # Retrieve a Payout Source: https://docs.antonpayments.com/api-reference/payouts/get-payout GET /v1/payouts/{id} Return a single payout by ID. Returns `404` if the payout does not exist or belongs to a different merchant. # List Payout Lifecycle Events Source: https://docs.antonpayments.com/api-reference/payouts/list-payout-events GET /v1/payouts/{id}/events Return every status transition recorded for this payout, oldest first. Use this to reconstruct a payout's timeline for support, accounting, or debugging purposes. Note: the preferred way to react to events in real time is via webhook subscriptions — polling this endpoint wastes rate-limit budget. # List Payouts Source: https://docs.antonpayments.com/api-reference/payouts/list-payouts GET /v1/payouts Cursor-paginated list of payouts for your merchant, sorted by `created_at` descending. # Quote a Fee Source: https://docs.antonpayments.com/api-reference/pricing/create-pricing-quote POST /v1/pricing/quote Preview the fee that would apply for a given source/destination pair and amount. Useful for surfacing fees to your end user before they confirm a payout. **Bindable quotes (v1.0.0).** Every quote response includes a `quote_id` (prefix `pq_`) and an `expires_at` timestamp. You can bind the exact quoted fee to a subsequent payout by passing the `quote_id` on `POST /v1/payouts`. If the quote has expired, been already bound to another payout, or the payout's currencies/amount don't match the quote, the payout create call returns `422 quote_expired` / `422 quote_already_used` / `422 quote_mismatch`. Omit `quote_id` on the payout to let the platform re-price at submission time. # List Merchant Pricing Plans Source: https://docs.antonpayments.com/api-reference/pricing/list-merchant-pricing GET /v1/pricing Return the pricing plans active on your merchant account. Plans are scoped by currency, country, and method — more specific plans take priority. # Rate Limits Source: https://docs.antonpayments.com/api-reference/rate-limits Anton applies per-merchant and per-endpoint request ceilings. Every response carries the headers you need to stay within them. Rate limits protect the platform from accidental and malicious overload. Normal production traffic rarely hits them. When they do trigger, the response headers tell you exactly how long to wait. ## Global limit Every authenticated merchant gets a **base of 1,000 requests per minute**, shared across all `/v1/*` endpoints, enforced on a rolling 60-second window. The limit is **per merchant** (not per IP) — seats and servers behind a shared egress NAT all count against the same quota, but separate merchants never share quotas with each other. ## Merchant rate-limit tiers Merchants can be placed on a higher tier by Anton. The tier applies a multiplier to the base 1,000 rpm ceiling. | Tier | Multiplier | Effective ceiling | | - | - | - | | Default | 1× | 1,000 rpm | | Growth | 2× | 2,000 rpm | | Scale | 5× | 5,000 rpm | | High-volume | 10× | 10,000 rpm | | Enterprise | 20× | 20,000 rpm | Read your current tier from `GET /v1/merchant` — the response includes `rate_limit_multiplier` (1, 2, 5, 10, or 20) and the effective `rate_limit_per_minute`. Promotions take effect immediately on the next request; no rollout is required. ## Endpoint-specific limits Some endpoints are more expensive or more sensitive and carry a tighter ceiling: | Endpoint | Limit | | - | - | | `POST /v1/fx/quote` | 30 / minute per merchant | | `GET /v1/fx/rate` | 30 / minute per merchant | | `POST /v1/fx/exchange` | 10 / minute per merchant | | `/v1/intelligence/*` (authenticated) | 120 / minute per merchant, on top of the global quota | | `/v1/intelligence/*` (anonymous public test surface, where enabled) | 120 / minute per IP | | `POST /v1/webhooks/{id}/test` | Reduced (sensitive operations ceiling) | **Sensitive operations** — webhook test sends and similar one-off verification flows — run under a lower per-merchant ceiling to prevent abuse. Normal integration traffic will not reach it. **Intelligence** runs under a dedicated per-merchant limiter in addition to the global quota, because evaluations fan out to multiple scoring systems per call. The limit applies across all `/v1/intelligence/*` endpoints. Sustained-volume screening integrations can request a raise the same way as the global ceiling. ## Headers on every response | Header | Value | | - | - | | `X-RateLimit-Limit` | Maximum requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests remaining in the current window. | | `X-RateLimit-Reset` | Unix timestamp (seconds) when the current window resets. | When you exceed a limit, Anton returns `429 Too Many Requests` with an additional header: | Header | Value | | - | - | | `Retry-After` | Seconds to wait before retrying. | Response body: ```json theme={} { "error": { "code": "rate_limit_exceeded", "message": "Rate limit exceeded. Retry after 42 seconds." } } ``` ## Handling 429 Treat `429` as transient. Back off for at least the number of seconds in `Retry-After` before retrying. Use jittered exponential backoff when retrying many requests at once — retrying everything at the exact `Retry-After` moment creates a thundering herd that trips the limiter again. ```bash cURL theme={} retry() { local url=$1 for attempt in 1 2 3 4 5; do response=$(curl -sS -D /tmp/hdr -o /tmp/body -w "%{http_code}" "$url" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN") if [ "$response" != "429" ]; then cat /tmp/body return 0 fi retry_after=$(grep -i '^retry-after:' /tmp/hdr | awk '{print $2}' | tr -d '\r') sleep "${retry_after:-1}" done echo "rate limit: retry budget exhausted" >&2 return 1 } ``` ```javascript JavaScript theme={} async function requestWithBackoff(url, init = {}, attempt = 1) { const response = await fetch(url, init); if (response.status !== 429) return response; if (attempt > 5) throw new Error("rate limit: retry budget exhausted"); const retryAfter = Number(response.headers.get("retry-after")) || 1; const jitter = Math.random() * 500; await new Promise((r) => setTimeout(r, retryAfter * 1000 + jitter)); return requestWithBackoff(url, init, attempt + 1); } ``` ```php PHP theme={} function requestWithBackoff(string $url, array $opts, int $attempt = 1): string { $ch = curl_init($url); curl_setopt_array($ch, $opts + [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => true, ]); $raw = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($status !== 429) return $raw; if ($attempt > 5) throw new RuntimeException("rate limit: retry budget exhausted"); preg_match('/retry-after:\s*(\d+)/i', $raw, $m); $wait = ((int)($m[1] ?? 1)) + (mt_rand(0, 500) / 1000); usleep((int)($wait * 1_000_000)); return requestWithBackoff($url, $opts, $attempt + 1); } ``` ```go Go theme={} func DoWithBackoff(req *http.Request) (*http.Response, error) { for attempt := 1; attempt <= 5; attempt++ { resp, err := http.DefaultClient.Do(req) if err != nil { return nil, err } if resp.StatusCode != http.StatusTooManyRequests { return resp, nil } retryAfter, _ := strconv.Atoi(resp.Header.Get("Retry-After")) if retryAfter < 1 { retryAfter = 1 } resp.Body.Close() jitter := time.Duration(rand.Intn(500)) * time.Millisecond time.Sleep(time.Duration(retryAfter)*time.Second + jitter) } return nil, errors.New("rate limit: retry budget exhausted") } ``` ## Requesting a higher limit Merchants with sustained high-volume needs can request a raised global ceiling. Reach out via [help.antonpayments.com](https://help.antonpayments.com) with your use case and expected traffic profile. # List Countries Source: https://docs.antonpayments.com/api-reference/reference-data/list-countries GET /v1/countries Return every destination country Anton can deliver payouts to, along with the currencies each country supports. # List Currencies Source: https://docs.antonpayments.com/api-reference/reference-data/list-currencies GET /v1/currencies Return every currency Anton supports, across fiat, crypto, and stablecoin. Use these codes when building payout or FX requests. # List Payment Methods Source: https://docs.antonpayments.com/api-reference/reference-data/list-payment-methods GET /v1/payment-methods Return the catalog of payment-method descriptors — each row is a credential format (IBAN, UK bank, US bank, IPX proxies, crypto, card, mobile money) with the countries where it's supported. Use this endpoint to drive dynamic instrument-creation UI: pick a country, filter to supported methods, prompt for the right credential fields. # Add a Note Source: https://docs.antonpayments.com/api-reference/reviews/add-note POST /v1/intelligence/reviews/{id}/notes Adds a note to an open review. The text is stored in a vault, separately for your account, and is never returned by the API: your team reads it in the portal, and it appears in the case file your people export. # Export a Case File (PDF) Source: https://docs.antonpayments.com/api-reference/reviews/export-case-file POST /v1/intelligence/reviews/{id}/case-file The review's formal record as a PDF, for your own auditors and regulators. Needs the **Audit Pack** add-on and `reviews.view`. Each call is one export, recorded in your audit log (and once more when the file is rendered, with its size and SHA-256); it does not accept an `Idempotency-Key`. A file exported with an API credential never contains note text or your team members' names. # Export Reviews as CSV Source: https://docs.antonpayments.com/api-reference/reviews/export-reviews-csv POST /v1/intelligence/reviews/exports/csv Your reviews opened in `[from, to)` (at most 366 days, at most 10,000 reviews) as CSV, for your own auditors. Needs the **Audit Pack** add-on and `reviews.view`. Codes, ids and the masked subject only. Each call is one export, recorded in your audit log with the range, row count and a SHA-256 of the file; it does not accept an `Idempotency-Key`. Works for any review your account still holds, whatever its status and whatever other add-ons you hold. # Get a Review Source: https://docs.antonpayments.com/api-reference/reviews/get-review GET /v1/intelligence/reviews/{id} A review with its decisions, approvals, notes and activity. Notes appear as presence only: their text is never returned by the API. Another account's review is a 404. # Get Review Settings Source: https://docs.antonpayments.com/api-reference/reviews/get-review-settings GET /v1/intelligence/reviews/settings Your review settings, read only (change them in the portal; Admin only). `api_clearance_requires_approval` is always `true`: a decision your API credential proposes that clears the subject waits for a person. # List Reviews Source: https://docs.antonpayments.com/api-reference/reviews/list-reviews GET /v1/intelligence/reviews Your team's compliance reviews, newest first. Needs the **Reviews API and Webhooks** add-on (`403 module_not_enabled` otherwise), the `intelligence` scope and `reviews.view`. The API returns the masked subject and your own reference for it — never names, dates of birth, contact details or note text. Anton's own screening of your payouts never appears here. # Record a Decision Source: https://docs.antonpayments.com/api-reference/reviews/record-decision POST /v1/intelligence/reviews/{id}/decisions Records a decision with a reason code (`reviews.decide`). `waiting_on_customer` pauses the due time. A decision your second-approver setting covers waits for a person to approve it in the portal. A decision your **API credential** proposes that clears the subject (`not_a_match`, `no_concern`) **always** waits for a person, whatever the setting (`approval_rule: api_clearance`), and that person must be independent of your API credentials: not the one who created the credential, and not in a role that can create, rotate or revoke credentials (Admin, Technical) — in practice your Compliance role. With no such person on your team the decision is refused (`409 second_approver_unavailable`). Approving, sending back and withdrawing are done by people in the portal. | Review kind | Decisions | |---|---| | `possible_sanctions_match`, `possible_pep_match`, `screening_review` | `waiting_on_customer`, `not_a_match`, `confirmed_match` | | `manual` | `waiting_on_customer`, `no_concern`, `concern_confirmed` | # Resume a Review Source: https://docs.antonpayments.com/api-reference/reviews/resume-review POST /v1/intelligence/reviews/{id}/resume Ends a wait on your customer. The due time moves out by the time spent waiting. # Create a Verification Subject Source: https://docs.antonpayments.com/api-reference/verifications/create-verification-subject POST /v1/verification-subjects Creates a verification subject (a person or a business) and opens its first verification attempt. Anton mints a **hosted verification link** — a one-time identity verification flow where the subject submits their government ID and selfie (person) or business details plus a UBO cascade (business). Identity documents live with the verification provider and Anton's vault; they never touch your systems. **Link delivery.** With `delivery: "email"`, Anton emails the link to the subject and the attempt is created with status `sent`. If the environment cannot deliver email — or you choose `delivery: "manual"` — the status is `created` and YOU deliver the returned `hosted_link` through your own channel. Only trust `sent` as proof an email went out. **`hosted_link` is secret-once.** It appears in this response (and on resend / regenerate / re-verify responses) and is never readable again. Treat it like a credential: it opens a flow that collects your customer's identity documents. Track progress via the `verification.*` webhook events or by polling the subject. Requires the `intelligence` credential scope and account capability. # Verification Stats Source: https://docs.antonpayments.com/api-reference/verifications/get-verification-stats GET /v1/verification-stats Aggregates across the merchant's verification subjects: totals by outcome, pass rate, median completion time, and weekly started counts. Powers the dashboard overview; useful for your own monitoring. # Get a Verification Subject Source: https://docs.antonpayments.com/api-reference/verifications/get-verification-subject GET /v1/verification-subjects/{id} Returns the subject with its **full attempt history** — every verification opened for this person or business, newest first, each with its checks, sanctions-screening block, and (for businesses) the UBO cascade. `hosted_link` is never present on reads. # List Verification Subjects Source: https://docs.antonpayments.com/api-reference/verifications/list-verification-subjects GET /v1/verification-subjects Pages the merchant's verification subjects, newest first. Each row carries a single synthesized latest attempt with the subject's current status; fetch the detail endpoint for the full attempt history. `display_name` is **masked** on every read (`J•••••• D••`). The true name is available only through the dashboard's audited reveal flow — it is never returned on this surface. Requires the `intelligence` credential scope and account capability. # Regenerate a Verification Source: https://docs.antonpayments.com/api-reference/verifications/regenerate-verification POST /v1/verifications/{id}/regenerate **Invalidates the prior link and inquiry** and opens a fresh attempt for the same subject (reason `regenerated`). Use when a link may have been forwarded or exposed — the old flow is dead the moment this returns. Responds `201` with the new attempt and its secret-once `hosted_link`. # Resend an Owner's Link Source: https://docs.antonpayments.com/api-reference/verifications/resend-owner-link POST /v1/verifications/{id}/owners/{uboId}/resend Business verifications cascade to each controlling owner (UBO), who completes an individual KYC flow. This mints a fresh one-time link for a single owner and re-delivers it to the owner's email when one is on file. The link is returned secret-once. # Resend a Verification Link Source: https://docs.antonpayments.com/api-reference/verifications/resend-verification-link POST /v1/verifications/{id}/resend Mints a fresh one-time hosted link for the **same attempt** and re-delivers it to the subject's email when one is on file. Use when the previous link expired unused or never arrived. Fails with `422` on attempts in a terminal state (approved, declined, expired, revoked) — open a new attempt via re-verify instead. # Re-verify a Subject Source: https://docs.antonpayments.com/api-reference/verifications/reverify-subject POST /v1/verification-subjects/{id}/verifications Opens a **new verification attempt** for an existing subject (periodic KYC refresh, or a material change in the subject's details). The prior attempt history is preserved; the subject's current status now tracks the new attempt. The response carries the new attempt with its secret-once `hosted_link`; when the subject has an email on file, Anton also re-delivers the link (status `sent`). # Revoke a Verification Source: https://docs.antonpayments.com/api-reference/verifications/revoke-verification POST /v1/verifications/{id}/revoke Terminally cancels an in-flight attempt and expires its hosted link. The attempt moves to `revoked` and cannot be resumed — open a new attempt via re-verify if the subject should be verified later. Fails with `422` when the attempt is already terminal. # Webhook Events Source: https://docs.antonpayments.com/api-reference/webhook-events Every event Anton emits, grouped by resource, with payload schemas. Webhooks are HTTP POSTs Anton sends to a URL you control when something happens in your account — a payout moves through its lifecycle, a beneficiary is created, an FX exchange settles. Subscribe by calling `POST /v1/webhooks` with the URL and list of event types you want to receive. Deliveries are **at-least-once**. You may occasionally receive the same event twice — deduplicate on the envelope `id`. Events for the same resource are dispatched in the order they occur, but network retries mean they can arrive out of order at your endpoint. Failed deliveries retry with exponential backoff (30 seconds, 2 minutes, 8 minutes, 32 minutes, then hourly up to **5 attempts total**) before being abandoned. Every delivery is HMAC-signed — see [Webhook Signing](/api-reference/webhook-signing) for verification. Respond with any 2xx status within 30 seconds to acknowledge receipt. Webhook subscriptions are available on every account tier, including [AI-compliance-only accounts](/capabilities) — events for surfaces an account cannot reach (for example payout events on a compliance-only account) simply never fire. ## Delivery envelope Every delivery has the same outer shape. `data` holds the resource-specific payload documented below. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8U9V", "type": "payout.completed", "created_at": "2026-04-15T14:30:00Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "status": "completed", "...": "resource-specific fields" } } ``` Each delivery also carries these HTTP headers: | Header | Description | | - | - | | `X-Webhook-ID` | The envelope `id` — use for deduplication. | | `X-Webhook-Event` | The event type, e.g. `payout.completed`. | | `X-Webhook-Timestamp` | Unix seconds at signing time. Used for verification. | | `X-Webhook-Signature` | `v1={hex-hmac-sha256}`. See [Webhook Signing](/api-reference/webhook-signing). | | `User-Agent` | `AntonPayments-Webhook/1.0` | ## Event catalog > [card] [Payout events](#payout-events) > > 11 events covering the full payout lifecycle. > [card] [Beneficiary events](#beneficiary-events) > > Beneficiary create, update, delete, and block. > [card] [Instrument events](#instrument-events) > > Payment instrument create, update, delete. > [card] [Batch events](#batch-events) > > Batch upload, completion, and failure. > [card] [FX events](#fx-events) > > Quote locks and exchange execution. > [card] [Funding events](#funding-events) > > Incoming funds credited to your balance. > [card] [Retired events](#retired-events) > > Event types that are no longer sent. > [card] [Verification events](#verification-events) > > KYC/KYB verification lifecycle, from link delivery to decision. > [card] [Intelligence review events](#intelligence-review-events) > > Your team's compliance reviews, for your own case system. > [card] [Test events](#test-events) > > Fired by the test-delivery endpoint. ## Payout events | Event type | Fires when | | - | - | | `payout.created` | A payout is successfully created via `POST /v1/payouts`. | | `payout.approved` | A pending payout is approved (maker-checker flow). | | `payout.processing` | The payout has been submitted to the underlying rail provider. | | `payout.sent` | The rail has confirmed funds are on the way to the beneficiary. | | `payout.completed` | The rail confirms funds have been delivered. | | `payout.failed` | Rail submission or execution failed terminally. | | `payout.cancelled` | The payout was cancelled before execution. | | `payout.returned` | The rail reported the funds were returned after sending. | | `payout.on_hold` | A payout is on hold. | | `payout.cannot_be_processed` | The payout entered `cannot_be_processed`. Anton is unable to provide further detail. | | `payout.velocity_blocked` | A risk/velocity rule blocked the payout at create time. | | `payout.engine_blocked` | A blocked payout where the Anton engine layer was the primary decider. Fires alongside `payout.velocity_blocked`. | The payload for payout lifecycle events is the payout object. The exact shape depends on the event — `payout.created` includes the initial fields; `payout.sent`, `payout.completed`, and `payout.failed` include rail identifiers and timestamps as they become available. `payout.velocity_blocked` and `payout.engine_blocked` use a compact shape with just `id`, `status`, and `reason`. `payout.on_hold` uses a compact shape with `id`, `merchant_id` and `on_hold`. It carries no reason. > [!NOTE] > > When a real-time risk score is available on the payout (available via the Anton risk engine), the lifecycle event payloads include a `risk` object summarising the score and contributing factors. ### `payout.created` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8U9V", "type": "payout.created", "created_at": "2026-04-15T14:30:00Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "status": "pending_screening", "source_amount": "500.00", "source_currency": "USD", "dest_amount": "458.25", "dest_currency": "EUR", "beneficiary_id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "instrument_id": "ins_01HX8Z9K0M2N3P4Q5R6S7T8UA2", "reference": "Invoice #1042", "created_at": "2026-04-15T14:30:00Z" } } ``` ### `payout.processing`, `payout.sent`, `payout.completed`, `payout.failed`, `payout.returned` These share the same lifecycle payload shape. `rail_provider`, `rail_reference`, `completed_at`, and `failed_at` are populated when the rail reports them. > [!NOTE] > > The `payout.failed` payload carries the payout resource, not the failure detail. To branch on **why** a payout failed, fetch `GET /v1/payouts/{id}/events` — the terminal event's metadata carries a stable `failure_code` (`provider_rejected`, `vault_unavailable`, `insufficient_funds`, …), a `failure_category`, and a sanitized `reason`. See [Errors → Stable failure codes on payout events](/api-reference/errors#stable-failure-codes-on-payout-events). ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8U9W", "type": "payout.completed", "created_at": "2026-04-15T14:45:12Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "status": "completed", "source_amount": "500.00", "source_currency": "USD", "dest_amount": "458.25", "dest_currency": "EUR", "beneficiary_id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "instrument_id": "ins_01HX8Z9K0M2N3P4Q5R6S7T8UA2", "reference": "Invoice #1042", "rail_provider": "partner_bank", "rail_reference": "RAIL-2026-04-15-778812", "created_at": "2026-04-15T14:30:00Z", "updated_at": "2026-04-15T14:45:12Z", "completed_at": "2026-04-15T14:45:12Z" } } ``` ### `payout.on_hold` A payout is on hold. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8U9X", "type": "payout.on_hold", "created_at": "2026-04-15T14:30:03Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "on_hold": true } } ``` ### `payout.cannot_be_processed` Fires when a payout enters the `cannot_be_processed` status. The payload is the payout object. Anton is unable to provide further detail; the payout cannot be cancelled via the API. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UC1", "type": "payout.cannot_be_processed", "created_at": "2026-04-15T15:10:00Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "status": "cannot_be_processed", "source_amount": "500.00", "source_currency": "USD", "dest_amount": "458.25", "dest_currency": "EUR", "beneficiary_id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "updated_at": "2026-04-15T15:10:00Z" } } ``` ### `payout.velocity_blocked` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8U9Y", "type": "payout.velocity_blocked", "created_at": "2026-04-15T14:30:01Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "status": "velocity_blocked", "reason": "payout blocked by risk policy" } } ``` ### `payout.engine_blocked` Fires **alongside** `payout.velocity_blocked` when a payout is blocked and the Anton engine layer was the primary decider. `payout.velocity_blocked` is a legacy catch-all — it fires on every block regardless of which layer made the decision — while `payout.engine_blocked` carries the layer-precise signal for engine-driven blocks only. Both events are emitted during a transition window (target cutover: 2026-Q3); subscribe to `payout.engine_blocked` for engine-specific handling and treat `payout.velocity_blocked` as a back-compat catch-all until you are ready to drop it. The payload matches `payout.velocity_blocked`. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8U9Z", "type": "payout.engine_blocked", "created_at": "2026-04-15T14:30:01Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "status": "velocity_blocked", "reason": "payout blocked by risk policy" } } ``` ### `payout.approved` Fires when a payout transitions to `approved` — either because its checks cleared or a review concluded and released it. Arrives before `payout.processing` for the same payout. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8U9W", "type": "payout.approved", "created_at": "2026-04-15T14:30:05Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "status": "approved", "source_amount": "500.00", "source_currency": "USD", "dest_amount": "458.25", "dest_currency": "EUR", "beneficiary_id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "instrument_id": "ins_01HX8Z9K0M2N3P4Q5R6S7T8UA2", "reference": "Invoice #1042", "created_at": "2026-04-15T14:30:00Z", "updated_at": "2026-04-15T14:30:05Z" } } ``` ### `payout.cancelled` Fires when a payout is cancelled before being submitted to the rail. The payload includes the `previous_status` at the time of cancellation and the `released_amount` that was returned to the merchant's available balance. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8U9V", "type": "payout.cancelled", "created_at": "2026-04-15T14:31:00Z", "data": { "id": "pay_01HX8Z9K0M2N3P4Q5R6S7T8UAB", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "status": "cancelled", "previous_status": "created", "released_amount": "500.00", "source_amount": "500.00", "source_currency": "USD", "dest_amount": "458.25", "dest_currency": "EUR", "beneficiary_id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "instrument_id": "ins_01HX8Z9K0M2N3P4Q5R6S7T8UA2", "reference": "Invoice #1042", "created_at": "2026-04-15T14:30:00Z", "updated_at": "2026-04-15T14:31:00Z" } } ``` ## Beneficiary events | Event type | Fires when | | - | - | | `beneficiary.created` | A beneficiary is created via `POST /v1/beneficiaries`. | | `beneficiary.updated` | A beneficiary is edited, archived, restored, or has its PII updated. | | `beneficiary.deleted` | A beneficiary is deleted. Payload contains only the id. | | `beneficiary.blocked` | A beneficiary can no longer be used for payouts. | The payload's `data` field contains the beneficiary resource. Sensitive fields (BT token references, fingerprints, deletion timestamps) are never included. ### `beneficiary.created` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UB1", "type": "beneficiary.created", "created_at": "2026-04-15T12:00:00Z", "data": { "id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "type": "individual", "status": "active", "display_name": "Jordan Rivera", "country": "DE", "external_ref": "crm-id-8814", "metadata": { "cost_center": "engineering" }, "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z" } } ``` ### `beneficiary.updated`, `beneficiary.blocked` Same shape as `beneficiary.created` with the event type and resource state reflecting the new values. ### `beneficiary.deleted` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UB4", "type": "beneficiary.deleted", "created_at": "2026-04-15T12:30:00Z", "data": { "id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1" } } ``` ## Instrument events | Event type | Fires when | | - | - | | `instrument.created` | An instrument is attached to a beneficiary via `POST /v1/beneficiaries/{id}/instruments`. | | `instrument.updated` | An instrument is edited. | | `instrument.deleted` | An instrument is deleted. Payload contains only the id. | ### `instrument.created` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UC1", "type": "instrument.created", "created_at": "2026-04-15T12:05:00Z", "data": { "id": "ins_01HX8Z9K0M2N3P4Q5R6S7T8UA2", "beneficiary_id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "method": "iban", "currency": "EUR", "country": "DE", "label": "Commerzbank EUR", "display_last4": "0194", "display_bank": "Commerzbank", "masked_account": "DE89 **** **** **** **** 0194", "status": "active", "is_default": true, "created_at": "2026-04-15T12:05:00Z", "updated_at": "2026-04-15T12:05:00Z" } } ``` Credential tokens and fingerprints are never included — raw instrument credentials live only in Anton's secure vault. ### `instrument.updated` Same shape as `instrument.created` with the new values reflected. ### `instrument.deleted` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UC4", "type": "instrument.deleted", "created_at": "2026-04-15T12:45:00Z", "data": { "id": "ins_01HX8Z9K0M2N3P4Q5R6S7T8UA2" } } ``` ## Batch events | Event type | Fires when | | - | - | | `batch.uploaded` | A CSV or XLSX batch file is accepted by `POST /v1/batches`. Fires before validation begins. | | `batch.completed` | A batch finished processing with at least one successful row (includes partial success). | | `batch.failed` | A batch failed terminally — no rows could be processed, or every row failed. | ### `batch.uploaded` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UE2", "type": "batch.uploaded", "created_at": "2026-04-15T15:10:00Z", "data": { "id": "batch_01HX8Z9K0M2N3P4Q5R6S7T8UF1", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "status": "uploaded", "file_name": "payouts-2026-04-15.csv", "file_size": 48221, "format": "csv", "uploaded_at": "2026-04-15T15:10:00Z", "uploaded_by": "usr_01HX8Z9K0M2N3P4Q5R6S7T8UG1" } } ``` ### `batch.completed` Fires when processing finishes with `status` of `completed` (all rows succeeded) or `partial` (some succeeded, some failed). Branch on the payload `status` field to distinguish full from partial success. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UE3", "type": "batch.completed", "created_at": "2026-04-15T15:18:00Z", "data": { "id": "batch_01HX8Z9K0M2N3P4Q5R6S7T8UF1", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "status": "completed", "file_name": "payouts-2026-04-15.csv", "format": "csv", "total_rows": 120, "processed_rows": 120, "valid_rows": 120, "invalid_rows": 0, "skipped_rows": 0, "created_at": "2026-04-15T15:10:00Z", "completed_at": "2026-04-15T15:18:00Z" } } ``` ### `batch.failed` Fires when a batch finishes with `status = failed` — either the file could not be processed at all (download/parse failure, empty file) or every row failed during processing. The payload includes an `errors` array describing the row-level failures when available. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UE4", "type": "batch.failed", "created_at": "2026-04-15T15:18:00Z", "data": { "id": "batch_01HX8Z9K0M2N3P4Q5R6S7T8UF1", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "status": "failed", "file_name": "payouts-2026-04-15.csv", "format": "csv", "total_rows": 120, "processed_rows": 0, "valid_rows": 0, "invalid_rows": 120, "skipped_rows": 0, "created_at": "2026-04-15T15:10:00Z", "completed_at": "2026-04-15T15:18:00Z", "errors": [ { "row": 2, "field": "currency", "message": "unsupported currency: XYZ" } ] } } ``` ## FX events | Event type | Fires when | | - | - | | `fx.quote.created` | An FX quote is locked (binding commitment). Indicative quotes do not fire an event. | | `fx.exchange.created` | An FX exchange is executed and is pending settlement. | | `fx.exchange.completed` | The exchange has settled. | | `fx.exchange.failed` | The exchange failed to settle, or was stuck in pending beyond the retry budget. | ### `fx.quote.created` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UD1", "type": "fx.quote.created", "created_at": "2026-04-15T13:00:00Z", "data": { "id": "fxq_01HX8Z9K0M2N3P4Q5R6S7T8UD2", "sell_currency": "GBP", "buy_currency": "EUR", "sell_amount": "1000.00", "buy_amount": "1173.40", "customer_rate": "1.17340", "locked": true, "expires_at": "2026-04-15T13:05:00Z" } } ``` ### `fx.exchange.created`, `fx.exchange.completed`, `fx.exchange.failed` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UD3", "type": "fx.exchange.completed", "created_at": "2026-04-15T13:01:12Z", "data": { "quote_id": "fxq_01HX8Z9K0M2N3P4Q5R6S7T8UD2", "sell_currency": "GBP", "buy_currency": "EUR", "sell_amount": "1000.00", "buy_amount": "1173.40", "mid_market_rate": "1.17450", "customer_rate": "1.17340", "provider": "partner_bank", "provider_ref": "FX-2026-04-15-41102", "status": "completed" } } ``` A `fx.exchange.failed` event fired by the status-polling worker (for exchanges that get stuck in `pending`) uses a compact payload: ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UD4", "type": "fx.exchange.failed", "created_at": "2026-04-15T13:11:00Z", "data": { "id": "fxe_01HX8Z9K0M2N3P4Q5R6S7T8UD5", "sell_currency": "GBP", "buy_currency": "EUR", "sell_amount": "1000.00", "buy_amount": "1173.40", "status": "failed", "reason": "exchange stuck in pending state" } } ``` ## Funding events ### `funding.credit` Fires when incoming funds are received on a merchant account and credited to the internal balance. The payload carries the masked sender name only — Anton never forwards raw counterparty PII to webhook subscribers. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UF2", "type": "funding.credit", "created_at": "2026-04-15T16:00:00Z", "data": { "id": "opd_01HX8Z9K0M2N3P4Q5R6S7T8UF3", "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "amount": "10000.00", "currency": "USD", "sender_name": "J*** S****", "account_id": "opa_01HX8Z9K0M2N3P4Q5R6S7T8UF4", "reference": "Invoice top-up", "source_provider": "partner_bank", "credited_at": "2026-04-15T16:00:00Z" } } ``` ## Retired events ### `screening.hit` No longer sent. A payout under review shows `on_hold: true` and its current status instead — see [How Anton Evaluates Payouts](/how-anton-evaluates-payouts). The type is still accepted on existing subscriptions, so nothing breaks, but no deliveries arrive. Remove it from your subscriptions when convenient. ## Verification events Emitted by the [Verifications](/guides/verifications) module as a subject moves through a hosted KYC/KYB flow. All six events share one compact payload — the verification attempt ID, its subject, and the status after the transition. Payloads never carry the hosted link, the subject's name, or document content; fetch `GET /v1/verification-subjects/{id}` for the full state. | Event type | Fires when | | - | - | | `verification.link_sent` | Anton delivered the hosted verification link by email — the delivery receipt for `delivery: "email"` flows (also fires on successful resends, including per-owner resends). | | `verification.started` | The subject opened the hosted flow. | | `verification.approved` | The verification decisioned as approved (for businesses: including every controlling owner). | | `verification.declined` | The verification decisioned as declined. | | `verification.review` | The verification was flagged for manual review — either by the identity provider or by Anton's sanctions screening. | | `verification.expired` | The link or inquiry lapsed before completion. | ### `verification.approved` ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UG1", "type": "verification.approved", "created_at": "2026-07-16T14:30:00Z", "data": { "verification_id": "vrf_01HX8Z9K0M2N3P4Q5R6S7T8UG2", "subject_id": "vsub_01HX8Z9K0M2N3P4Q5R6S7T8UG3", "status": "approved" } } ``` `verification.started`, `verification.declined`, `verification.review`, and `verification.expired` share this exact payload shape with their respective `status` values. ### `verification.link_sent` Same shape. The event **type** is the delivery receipt; `status` carries the attempt's current status after the operation — `sent` on first delivery, but e.g. `awaiting_owners` when re-delivering an owner's link on a business verification (which also adds `owner_id`), or `in_progress` when re-delivering to a subject who already opened the flow. Key your delivery-receipt handling on the event type, not on `status`: ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UG4", "type": "verification.link_sent", "created_at": "2026-07-16T14:30:00Z", "data": { "verification_id": "vrf_01HX8Z9K0M2N3P4Q5R6S7T8UG2", "subject_id": "vsub_01HX8Z9K0M2N3P4Q5R6S7T8UG3", "status": "awaiting_owners", "owner_id": "vubo_01HX8Z9K0M2N3P4Q5R6S7T8UG5" } } ``` > [!NOTE] > > `verification.link_sent` fires only when Anton actually delivered the email. Manual-delivery flows (`delivery: "manual"`) and environments without an email path never emit it — the attempt stays `created` and you deliver the returned `hosted_link` yourself. ## Intelligence review events Sent for your team's [Reviews](/guides/intelligence/reviews) while your account has the **Reviews API and Webhooks** add-on, including to `"*"` subscriptions. Every event carries the same compact `data`: ids, codes and your own reference for the subject. It never carries a name (not even the masked one), a date of birth, contact details, note text, a person on your team, anything about Anton's own screening, or anything about another account. Fetch `GET /v1/intelligence/reviews/{id}` for more. | Event type | Fires when | | - | - | | `intelligence.review.opened` | A review opened: from your screening, monitoring or list screening, from your payout rules, or by your team. | | `intelligence.review.decision_proposed` | A decision is waiting for a second approver (`approval_rule` says why). | | `intelligence.review.decided` | A decision took effect: one that needed no approval (including `waiting_on_customer`), or one that was approved (`approved: true`). | | `intelligence.review.reopened` | The review is open again: a decision was sent back or withdrawn, or your customer responded (`reason`). | | `intelligence.review.closed` | The review closed, with its `outcome`. | | `intelligence.review.overdue` | The review passed its due time without a decision. Sent once per due time. | | `intelligence.review.note_added` | A note was added. The note itself is never sent. | ### `intelligence.review.opened` ```json theme={} { "id": "evt_01JB8QK2EXAMPLE0000000001", "type": "intelligence.review.opened", "created_at": "2026-09-25T13:14:00Z", "data": { "review_id": "irv_01JB8QK2EXAMPLE", "number": "RV-0142", "kind": "possible_sanctions_match", "priority": "high", "source": "evaluation", "evaluation_id": "eval_01JB7ZEXAMPLE", "reference": "cust_7731", "status": "open", "due_at": "2026-09-25T21:05:00Z", "actor_type": "system", "occurred_at": "2026-09-25T13:14:00Z" } } ``` ### `intelligence.review.decision_proposed` ```json theme={} { "id": "evt_01JB8QK2EXAMPLE0000000002", "type": "intelligence.review.decision_proposed", "created_at": "2026-09-25T14:51:00Z", "data": { "review_id": "irv_01JB8QK2EXAMPLE", "number": "RV-0142", "kind": "possible_sanctions_match", "priority": "high", "source": "evaluation", "evaluation_id": "eval_01JB7ZEXAMPLE", "reference": "cust_7731", "decision_id": "ird_01JB9AEXAMPLE", "decision": "not_a_match", "reason_code": "dob_differs", "requires_approval": true, "approval_rule": "api_clearance", "actor_type": "api_client", "occurred_at": "2026-09-25T14:51:00Z" } } ``` `intelligence.review.decided` has the same shape with `requires_approval: false` (or `approved: true` when a second approver approved it). ### `intelligence.review.closed` ```json theme={} { "id": "evt_01JB8QK2EXAMPLE0000000003", "type": "intelligence.review.closed", "created_at": "2026-09-25T15:02:00Z", "data": { "review_id": "irv_01JB8QK2EXAMPLE", "number": "RV-0142", "kind": "possible_sanctions_match", "priority": "high", "source": "evaluation", "evaluation_id": "eval_01JB7ZEXAMPLE", "reference": "cust_7731", "status": "closed", "outcome": "not_a_match", "decision_id": "ird_01JB9AEXAMPLE", "actor_type": "user", "occurred_at": "2026-09-25T15:02:00Z" } } ``` `intelligence.review.reopened` carries `status`, `reason` (`sent_back`, `withdrawn` or `customer_responded`) and `due_at`; `intelligence.review.overdue` carries `status` and `due_at`; `intelligence.review.note_added` carries `note_id`. ## Balance events ### `balance.low` Fires when a merchant's available balance drops below a configured low-balance threshold. Thresholds are configured per `(merchant, currency)` pair — one threshold per pair — in the merchant dashboard. The event uses **latching** semantics to prevent spam while the balance oscillates around the threshold: * Fires once when the available balance transitions from at-or-above the threshold to below it. * Does not fire again while the balance remains below the threshold. * Re-arms automatically when the balance recovers to at-or-above the threshold. No recovery event is emitted. * The next dip below the threshold fires again. Delivery is best-effort and runs asynchronously from the balance mutation. A webhook failure never blocks the underlying payout, funding credit, or FX exchange. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UG1", "type": "balance.low", "created_at": "2026-04-15T17:22:00Z", "data": { "merchant_id": "mer_01HX8Z9K0M2N3P4Q5R6S7T8UZZ", "currency": "USD", "balance_amount": "87.42", "threshold_amount": "100.00", "latched_at": "2026-04-15T17:22:00Z" } } ``` ## Test events ### `test` Fired by `POST /v1/webhooks/{id}/test` to help you verify your endpoint is reachable and your signature verification works. The payload is a synthetic example with hard-coded identifiers — do not persist or act on it. ```json theme={} { "id": "evt_01HX8Z9K0M2N3P4Q5R6S7T8UE1", "type": "test", "created_at": "2026-04-15T15:00:00Z", "data": { "test": true, "event_type": "test", "object": "payout", "id": "pay_test000000000000001", "status": "completed", "source_amount": "100.00", "source_currency": "USD", "dest_amount": "85.00", "dest_currency": "EUR", "created_at": "2026-04-15T15:00:00Z" } } ``` ## Subscribing to events Create a subscription with the list of event types you want to receive. The signing `secret` is returned once, at creation time — store it securely. > [!NOTE] > > The `url` must use `https://` and must be publicly reachable from the internet. Anton rejects plaintext `http://` endpoints, loopback addresses, RFC1918 private ranges, `.local` / `.internal` hostnames, and cloud metadata endpoints — these are refused with `webhook_url_not_https` or `webhook_url_private_address`. Plaintext `http://` is only accepted against a local development API. See [Errors → Webhook subscriptions](/api-reference/errors#webhook-subscriptions). ```bash theme={} curl https://api.antonpayments.dev/v1/webhooks \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/webhooks/anton", "events": ["payout.created", "payout.completed", "payout.failed"] }' ``` Inspect past deliveries with `GET /v1/webhooks/events`, `GET /v1/webhooks/events/{id}`, and `GET /v1/webhooks/events/{id}/deliveries`. See [Webhook Signing](/api-reference/webhook-signing) for verification. # Webhook Signing Source: https://docs.antonpayments.com/api-reference/webhook-signing Verify that every webhook delivery genuinely came from Anton. Anton signs every webhook delivery with an HMAC-SHA256 signature derived from your subscription's signing secret. Verifying the signature on your endpoint is the only way to prove a request really came from Anton and not an attacker who discovered your URL. > [!WARNING] > > Treat an unverified webhook the same as an untrusted HTTP request. Do not act on the payload — do not mark payouts as settled, do not release funds, do not update beneficiaries — until the signature has been verified successfully. ## The signature scheme | Property | Value | | - | - | | Algorithm | HMAC-SHA256 | | Encoding | Lowercase hex | | Signed string | `{timestamp}.{body}` — Unix timestamp, a literal dot, and the raw request body | | Header carrying the signature | `X-Webhook-Signature` — one or more comma-separated `v1=` entries | | Header carrying the timestamp | `X-Webhook-Timestamp` (Unix seconds, UTC) | | Secret format | `whsec_` followed by 64 hex characters | Every delivery also carries `X-Webhook-ID` (the event id, useful for deduplication) and `X-Webhook-Event` (the event type). The `User-Agent` is `AntonPayments-Webhook/1.0`. > [!NOTE] > > `X-Webhook-Signature` may contain **more than one** signature, comma-separated — for example `v1=abc…,v1=def…`. This happens during a secret-rotation grace window, when a delivery is signed with both your new and previous secret so you can roll the new secret out without dropping events (see [Rotating secrets](#rotating-secrets)). **Always parse every `v1=` entry and accept the delivery if your computed signature matches any one of them.** Never assume there is exactly one signature. ## Verification steps **1. Read the raw request body** Capture the body as bytes **before** any JSON parsing or framework normalisation. Parsed-and-re-serialised JSON will not byte-match the string Anton signed. **2. Read the timestamp and signature headers** Pull `X-Webhook-Timestamp` and `X-Webhook-Signature` from the request. Split the signature header on commas and strip the `v1=` prefix from each entry — you may receive one signature normally, or two during a rotation grace window. **3. Reject old timestamps** If the timestamp is more than 5 minutes (300 seconds) away from your server's current time, reject the request. This prevents replays of captured deliveries. **4. Compute the expected signature** Concatenate `{timestamp}.{body}`, compute `HMAC-SHA256` over it using your subscription's signing secret, and hex-encode the result. **5. Compare in constant time against each entry** Compare your expected signature to each `v1=` entry using a constant-time comparison (`hmac.compare_digest`, `crypto.timingSafeEqual`, `hash_equals`, `hmac.Equal`) and accept the delivery if it matches **any** of them. Never use `==` — it leaks timing information. **6. Respond 2xx within 30 seconds** Return any 2xx status to acknowledge receipt. Non-2xx responses are retried with exponential backoff up to 5 total attempts. ## Verification code All examples read the raw body, enforce a 5-minute freshness window, and use a constant-time comparison. ```bash verify.sh theme={} #!/usr/bin/env bash # Example: verify a webhook from the command line. In production, do this in # your application code — not in a shell script. SECRET="$WEBHOOK_SECRET" # whsec_... TIMESTAMP="$1" # value of X-Webhook-Timestamp SIG_HEADER="$2" # full X-Webhook-Signature, e.g. v1=abc,v1=def BODY="$(cat)" # raw body piped on stdin NOW=$(date +%s) AGE=$(( NOW - TIMESTAMP )) if [ "$AGE" -gt 300 ] || [ "$AGE" -lt -300 ]; then echo "reject: stale timestamp ($AGE seconds)" >&2 exit 1 fi EXPECTED=$(printf '%s.%s' "$TIMESTAMP" "$BODY" \ | openssl dgst -sha256 -hmac "$SECRET" -hex \ | awk '{print $2}') # The header may carry more than one signature during a rotation window. # Split on commas, strip the v1= prefix from each, and accept if any matches. # openssl offers no constant-time compare; for non-production shells this is # acceptable — do the comparison in your application code where it matters. MATCH=0 IFS=',' read -ra ENTRIES <<< "$SIG_HEADER" for entry in "${ENTRIES[@]}"; do if [ "$EXPECTED" = "${entry#v1=}" ]; then MATCH=1 break fi done if [ "$MATCH" = "1" ]; then echo "ok" else echo "reject: signature mismatch" >&2 exit 1 fi ``` ```javascript verify.js theme={} // Node 18+. Express example — mount express.raw() on the webhook route so // req.body is a Buffer, not a parsed object. import crypto from "node:crypto"; import express from "express"; const app = express(); const SECRET = process.env.WEBHOOK_SECRET; // whsec_... app.post( "/webhooks/anton", express.raw({ type: "application/json" }), (req, res) => { const timestamp = req.header("X-Webhook-Timestamp"); const signatureHeader = req.header("X-Webhook-Signature") || ""; // One or more comma-separated v1= entries (two during a rotation window). const signatures = signatureHeader .split(",") .map((s) => s.trim().replace(/^v1=/, "")) .filter(Boolean); if (!timestamp || signatures.length === 0) { return res.status(400).send("missing signature headers"); } const ageSeconds = Math.abs(Math.floor(Date.now() / 1000) - Number(timestamp)); if (ageSeconds > 300) { return res.status(400).send("stale timestamp"); } const body = req.body; // Buffer — the raw bytes Anton signed const signedString = `${timestamp}.${body.toString("utf8")}`; const expected = crypto .createHmac("sha256", SECRET) .update(signedString) .digest("hex"); const expectedBuf = Buffer.from(expected, "hex"); // Accept if the computed signature matches ANY entry (constant-time). const valid = signatures.some((sig) => { const actualBuf = Buffer.from(sig, "hex"); return ( actualBuf.length === expectedBuf.length && crypto.timingSafeEqual(expectedBuf, actualBuf) ); }); if (!valid) { return res.status(400).send("invalid signature"); } const event = JSON.parse(body.toString("utf8")); // ... handle event ... res.status(200).send(); }, ); ``` ```php verify.php theme={} getContent() or // file_get_contents("php://input"). Don't use $_POST — it will be empty // for JSON payloads and wrong for form-encoded ones. $secret = getenv("WEBHOOK_SECRET"); // whsec_... $body = file_get_contents("php://input"); $timestamp = $_SERVER["HTTP_X_WEBHOOK_TIMESTAMP"] ?? ""; $signatureHeader = $_SERVER["HTTP_X_WEBHOOK_SIGNATURE"] ?? ""; if ($timestamp === "" || $signatureHeader === "") { http_response_code(400); exit("missing signature headers"); } if (abs(time() - (int)$timestamp) > 300) { http_response_code(400); exit("stale timestamp"); } $expected = hash_hmac("sha256", $timestamp . "." . $body, $secret); // The header may carry more than one v1= entry during a rotation window. // Accept if any matches (constant-time via hash_equals). $valid = false; foreach (explode(",", $signatureHeader) as $entry) { $sig = preg_replace("/^v1=/", "", trim($entry)); if (hash_equals($expected, $sig)) { $valid = true; break; } } if (!$valid) { http_response_code(400); exit("invalid signature"); } $event = json_decode($body, true); // ... handle event ... http_response_code(200); ``` ```go verify.go theme={} package main import ( "crypto/hmac" "crypto/sha256" "encoding/hex" "encoding/json" "fmt" "io" "net/http" "os" "strconv" "strings" "time" ) var secret = []byte(os.Getenv("WEBHOOK_SECRET")) // whsec_... func handleWebhook(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(r.Body) if err != nil { http.Error(w, "read body", http.StatusBadRequest) return } timestamp := r.Header.Get("X-Webhook-Timestamp") signatureHeader := r.Header.Get("X-Webhook-Signature") if timestamp == "" || signatureHeader == "" { http.Error(w, "missing signature headers", http.StatusBadRequest) return } ts, err := strconv.ParseInt(timestamp, 10, 64) if err != nil { http.Error(w, "bad timestamp", http.StatusBadRequest) return } if diff := time.Now().Unix() - ts; diff > 300 || diff < -300 { http.Error(w, "stale timestamp", http.StatusBadRequest) return } mac := hmac.New(sha256.New, secret) fmt.Fprintf(mac, "%d.%s", ts, body) expectedBytes := mac.Sum(nil) // The header may carry more than one v1= entry during a rotation window. // Accept if the computed signature matches any of them (constant-time). valid := false for _, entry := range strings.Split(signatureHeader, ",") { sig := strings.TrimPrefix(strings.TrimSpace(entry), "v1=") actualBytes, err := hex.DecodeString(sig) if err == nil && hmac.Equal(expectedBytes, actualBytes) { valid = true break } } if !valid { http.Error(w, "invalid signature", http.StatusBadRequest) return } var event struct { ID string `json:"id"` Type string `json:"type"` CreatedAt string `json:"created_at"` Data json.RawMessage `json:"data"` } if err := json.Unmarshal(body, &event); err != nil { http.Error(w, "bad json", http.StatusBadRequest) return } // ... handle event ... w.WriteHeader(http.StatusOK) } ``` ## Rotating secrets Every subscription has one signing secret. The secret is returned once — in the response to `POST /v1/webhooks` — and never again. Store it in your secrets manager at creation time. > [accordion] Retrieve the current secret > > ```bash theme={} > curl https://api.antonpayments.dev/v1/webhooks/whk_01HX.../secret \ > -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" > ``` > > Response: > > ```json theme={} > { "data": { "secret": "whsec_..." } } > ``` > [accordion] Rotate the secret > > ```bash theme={} > curl https://api.antonpayments.dev/v1/webhooks/whk_01HX.../secret/rotate \ > -X POST \ > -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" > ``` > > Response: > > ```json theme={} > { "data": { "secret": "whsec_..." } } > ``` > > Rotation installs the new secret immediately and opens a **24-hour grace window**. During the window every delivery is signed with **both** your new secret and the previous one — `X-Webhook-Signature` carries two comma-separated `v1=` entries. Your endpoint keeps verifying with the old secret while you roll the new one out, and starts matching the new secret the moment you deploy it. After 24 hours the previous secret stops signing and only the new secret is used. > [!NOTE] > > The grace window only helps if your verifier checks **every** `v1=` entry (see the code samples above) — a verifier that reads only a single signature will reject deliveries during the window. Roll the new secret into your endpoint's configuration within 24 hours of rotating; once deployed, the old secret is no longer needed. > [!WARNING] > > A grace window means the previous secret stays valid for 24 hours. If you are rotating because a secret **leaked**, that window is a liability — rotate with `?immediate=true` (`POST /v1/webhooks/{id}/secret/rotate?immediate=true`) to skip the window and kill the compromised secret at once. In-flight deliveries to an endpoint that hasn't picked up the new secret yet will fail verification and retry, which is the right trade-off for a compromised secret. ## Common pitfalls * **Parsed JSON instead of raw bytes.** Frameworks that parse and re-serialise the body (Express's default `json()` middleware, some ASP.NET pipelines) will break verification — whitespace, key ordering, and number formatting all change. Capture the raw body before parsing. * **Wrong header case.** HTTP headers are case-insensitive, but some frameworks expose them under specific casing. Read `X-Webhook-Signature` / `X-Webhook-Timestamp` via your framework's header API, not by exact-match dictionary lookup. * **Assuming a single signature.** `X-Webhook-Signature` can carry more than one comma-separated `v1=` entry (during a rotation grace window). Split on commas, strip the `v1=` prefix from each entry, and accept if any matches — a parser that reads only the first/whole value will reject valid deliveries mid-rotation. * **Trailing newlines or encoding changes.** A proxy or middleware that appends `\n` or transcodes the body will invalidate the signature. * **Using `==` or `strcmp`.** Byte-by-byte equality checks leak timing information. Always use a constant-time comparison. * **Not enforcing the timestamp window.** Without a freshness check, an attacker who captures one valid delivery can replay it indefinitely. Reject anything older than 5 minutes. * **Replying slowly.** Deliveries time out after 30 seconds. Acknowledge first, process asynchronously. # Create a Webhook Subscription Source: https://docs.antonpayments.com/api-reference/webhooks/create-webhook-subscription POST /v1/webhooks Register an HTTPS endpoint to receive event notifications. Anton POSTs signed JSON deliveries to the URL you supply every time an event from the `events` list fires on your merchant account. **Requirements:** - The URL must use `https://` (enforced outside development environments). - The URL must be publicly reachable — private, loopback, and metadata addresses are rejected. The response includes a `secret` — this is shown **once at creation**. Store it in your secrets manager immediately; Anton cannot recover it later. You can rotate the secret any time via `POST /v1/webhooks/{id}/secret/rotate`. See [Webhook Events](/api-reference/webhook-events) for the event catalog and [Webhook Signing](/api-reference/webhook-signing) for verification. # Deactivate a Subscription Source: https://docs.antonpayments.com/api-reference/webhooks/deactivate-webhook-subscription POST /v1/webhooks/{id}/deactivate Stop delivering events to this subscription without deleting it. The subscription moves to `inactive` and can be reactivated by updating its status (contact support or wait for a re-activation endpoint). # Delete a Webhook Subscription Source: https://docs.antonpayments.com/api-reference/webhooks/delete-webhook-subscription DELETE /v1/webhooks/{id} Permanently delete a subscription. Event history and past delivery records are retained for audit, but no new deliveries will be attempted. Prefer `POST /v1/webhooks/{id}/deactivate` if you may re-enable later. # Retrieve a Webhook Event Source: https://docs.antonpayments.com/api-reference/webhooks/get-webhook-event GET /v1/webhooks/events/{id} # Retrieve the Signing Secret Source: https://docs.antonpayments.com/api-reference/webhooks/get-webhook-secret GET /v1/webhooks/{id}/secret Return the current HMAC signing secret for this subscription. Use this if you lost the secret after creation — the endpoint is audited and rate-limited for safety. # Retrieve a Webhook Subscription Source: https://docs.antonpayments.com/api-reference/webhooks/get-webhook-subscription GET /v1/webhooks/{id} # List Deliveries for an Event Source: https://docs.antonpayments.com/api-reference/webhooks/list-webhook-deliveries GET /v1/webhooks/events/{id}/deliveries Return every attempt Anton made to deliver this event to every subscribed endpoint. Each attempt records the request headers, response status, body, duration, and retry schedule — useful for debugging failing integrations. # List Webhook Events Source: https://docs.antonpayments.com/api-reference/webhooks/list-webhook-events GET /v1/webhooks/events Return the history of webhook events generated on your merchant account. Events persist independently of delivery — you can inspect and replay them via `/deliveries` below. # List Webhook Subscriptions Source: https://docs.antonpayments.com/api-reference/webhooks/list-webhook-subscriptions GET /v1/webhooks Return all webhook subscriptions on your merchant account. # Rotate the Signing Secret Source: https://docs.antonpayments.com/api-reference/webhooks/rotate-webhook-secret POST /v1/webhooks/{id}/secret/rotate Generate a fresh signing secret. By default rotation opens a 24-hour dual-signature grace window: the new secret signs immediately, and the outgoing secret keeps signing as a second `v1=` entry in `X-Webhook-Signature` until `previous_secret_expires_at`. A verifier that matches ANY entry keeps accepting deliveries, so you can deploy the new secret without dropping events. Pass `?immediate=true` to skip the window — the old secret stops verifying at once. Use this when rotating a leaked secret, accepting that deliveries to a not-yet-updated endpoint will fail verification. The new secret is shown **once** in the response. Store it now. # Send a Test Delivery Source: https://docs.antonpayments.com/api-reference/webhooks/test-webhook-subscription POST /v1/webhooks/{id}/test Dispatch a synthetic `test` event to this subscription right now. Useful for verifying signature verification, network reachability, and logging pipelines without waiting for a real event. Rate-limited. # Update a Webhook Subscription Source: https://docs.antonpayments.com/api-reference/webhooks/update-webhook-subscription PATCH /v1/webhooks/{id} Partial update: any of `url`, `events`, `metadata`. Absent fields are left unchanged; a body carrying none of the three is rejected with `400 missing_required_field`. - `url` — validated with the same HTTPS/SSRF rules as creation. - `events` — must be non-empty when present; every entry must be a known event type or the `"*"` wildcard (unknown types fail with `422`, keyed by position). - `metadata` — replaces the whole map (`{}` clears it); no per-key merge. `status` and the signing secret are not patchable — unknown fields are rejected with `400 unknown_field`. Use `POST /v1/webhooks/{id}/deactivate` and `POST /v1/webhooks/{id}/secret/rotate` instead. Requires an `Idempotency-Key` header. # Authentication Source: https://docs.antonpayments.com/authentication Anton authenticates programmatic API calls with OAuth 2.0 client_credentials bound to a DPoP keypair. Static API keys are not accepted on v1. Every authenticated `/v1` request requires both: 1. An **OAuth 2.0 access token** in the `Authorization` header (scheme: `DPoP`, not `Bearer`). 2. A **DPoP proof JWT** in the `DPoP` header — signed fresh per request with a key only your merchant holds. Without DPoP, a leaked access token is full account access. With DPoP, a leaked token alone is inert — the proof cryptographically binds the request to the holder of the matching private key. Anton accepts two credential types on the same `/v1` routes: * **OAuth access tokens** (DPoP-bound) — for server-to-server integrations. * **Portal JWTs** — issued by our identity provider to users signed in to the merchant dashboard. This page covers programmatic OAuth auth. Portal JWT auth is automatic from the dashboard and not something integrators need to wire by hand. ## Glossary | Term | What it is | | - | - | | **`client_id`** | Public identifier you put in the `Authorization: Basic ...` header when minting tokens. Format: `ant_oc__<32hex>`. | | **`client_secret`** | Long-lived secret paired with `client_id`. Format: `ant_ocs__<48hex>`. **Shown ONCE at creation** and never recoverable — store it immediately. | | **DPoP keypair** | EC P-256 (ES256) or Ed25519 (EdDSA) keypair you hold. The public half is registered with Anton when you create your client; the private half stays in your infrastructure. | | **Access token** | Short-lived signed JWT minted by `POST /oauth/token`. 1 hour TTL in production / staging, 8 hours in sandbox. | | **DPoP proof** | A fresh JWT you sign with your DPoP private key on every request. Encodes the HTTP method, URL, an `iat` timestamp, a unique `jti`, and (when sending a token) a hash of the access token. | | **`jkt`** | RFC 7638 SHA-256 thumbprint of your DPoP public JWK. Stored on your client record and stamped into every token's `cnf.jkt` claim. | ## Generating credentials Sign in to the [merchant portal](https://app.antonpayments.com), go to **Settings → API Credentials**, and click **Create credentials**. The portal: 1. Generates an ES256 (P-256) DPoP keypair in your browser using WebCrypto. The private key never leaves your device. 2. Submits the public JWK to Anton. 3. Returns `client_id`, `client_secret`, and the private key in PEM + JWK form — **all three shown once**. Copy them or download the `.pem`. Store the secret + private key in your secrets manager. Pass them to your service via env vars or a secrets mount. Never check them in. Each credential carries a **scope set** (`payouts`, `intelligence`) fixed at creation time. Unless you narrow it, a new credential defaults to your account's full capability set. Scopes are immutable after creation — create a new credential and revoke the old one to change them. Calls outside a credential's scope fail with `403 insufficient_scope`; calls outside your account's capabilities fail with `403 capability_required`. See [Capabilities & Scopes](/capabilities). Sandbox credentials are issued by `app.antonpayments.dev` and only authenticate against `api.antonpayments.dev`. Production credentials similarly only work against `api.antonpayments.com`. ## Token endpoint `POST /oauth/token` exchanges your `(client_id, client_secret)` plus a DPoP proof for an access token. **Request:** * `Content-Type: application/x-www-form-urlencoded` * `Authorization: Basic ` (body fallback also accepted: `client_id` + `client_secret` as form fields) * `DPoP: ` — required, with `htm=POST`, `htu=https://api.antonpayments.dev/oauth/token`, fresh `iat` and `jti`, and **no** `ath` claim. * Body: `grant_type=client_credentials` **Response (200):** ```json theme={} { "access_token": "eyJhbGciOiJFUzI1NiIs...", "token_type": "DPoP", "expires_in": 28800, "scope": "payouts intelligence" } ``` `expires_in` is in seconds. Cache the token until `exp - 60s` then re-mint. There are no refresh tokens — call the endpoint again with your secret. `scope` echoes the credential's grants, space-delimited (RFC 6749 §3.3) — the same values are embedded in the access token's `scope` claim. There is no scope request parameter: tokens always carry exactly the scopes the OAuth client was created with. See [Capabilities & Scopes](/capabilities). **Errors** (RFC 6749 §5.2 envelope): | HTTP | `error` | When | | - | - | - | | 400 | `unsupported_grant_type` | `grant_type` is not `client_credentials`. | | 400 | `invalid_request` | Missing form body, wrong Content-Type, missing DPoP header. | | 400 | `invalid_dpop_proof` | DPoP proof signature/jkt/htm/htu/iat/jti failed verification. | | 401 | `invalid_client` | Unknown `client_id`, wrong `client_secret`, or revoked client. | | 403 | `invalid_client` | Test client used in production, or vice versa. | ## Making authenticated requests Every `/v1` call needs both headers: ```http theme={} Authorization: DPoP DPoP: ``` The proof MUST carry these claims: * `htm` — HTTP method (`POST`, `GET`, etc.) * `htu` — request URL, scheme + host + path only (no query, no fragment) * `iat` — Unix timestamp, must be within ±60 seconds of Anton's clock * `jti` — unique identifier; Anton rejects replays within a 5-minute window * `ath` — base64url(SHA-256(access\_token)) Header (the embedded `jwk` MUST hash to the `jkt` you registered): ```json theme={} { "typ": "dpop+jwt", "alg": "ES256", "jwk": { "kty": "EC", "crv": "P-256", "x": "...", "y": "..." } } ``` ### curl quickstart The script below mints a token and calls `GET /v1/beneficiaries` against sandbox. It shells out to `openssl`, `jq`, and a small Python helper for ECDSA signature conversion — adapt to your language as needed; production clients should use a JOSE library rather than this verbose shell version. ```bash theme={} #!/usr/bin/env bash set -euo pipefail API=https://api.antonpayments.dev CLIENT_ID="${ANTON_CLIENT_ID:?missing}" CLIENT_SECRET="${ANTON_CLIENT_SECRET:?missing}" PRIV_PEM="${ANTON_PRIVATE_KEY_PEM:?path to your PKCS#8 EC private key}" b64url() { openssl base64 -A | tr '+/' '-_' | tr -d '='; } sha256_b64url() { openssl dgst -sha256 -binary | b64url; } # Build a DPoP proof. ath_b64 is empty for the token request. build_proof() { local method="$1" url="$2" ath_b64="${3:-}" # Extract public key (x, y) from the PEM. local raw_hex x_hex y_hex raw_hex=$(openssl ec -in "$PRIV_PEM" -pubout -outform DER 2>/dev/null \ | tail -c 65 | xxd -p -c 999) x_hex=${raw_hex:2:64} y_hex=${raw_hex:66:64} local x y x=$(echo "$x_hex" | xxd -r -p | b64url) y=$(echo "$y_hex" | xxd -r -p | b64url) local header claims header=$(printf '{"typ":"dpop+jwt","alg":"ES256","jwk":{"kty":"EC","crv":"P-256","x":"%s","y":"%s"}}' "$x" "$y" | b64url) if [ -n "$ath_b64" ]; then claims=$(printf '{"jti":"%s","htm":"%s","htu":"%s","iat":%d,"ath":"%s"}' \ "$(uuidgen)" "$method" "$url" "$(date +%s)" "$ath_b64" | b64url) else claims=$(printf '{"jti":"%s","htm":"%s","htu":"%s","iat":%d}' \ "$(uuidgen)" "$method" "$url" "$(date +%s)" | b64url) fi local signing_input="$header.$claims" local sig_der sig_p1363 sig_der=$(printf '%s' "$signing_input" | openssl dgst -sha256 -sign "$PRIV_PEM" -binary) # Convert ASN.1 DER signature to IEEE P1363 (r || s, 64 bytes for P-256). sig_p1363=$(printf '%s' "$sig_der" | python3 -c " import sys from asn1crypto import core data = sys.stdin.buffer.read() seq = core.Sequence.load(data) r = int(seq[0]).to_bytes(32, 'big') s = int(seq[1]).to_bytes(32, 'big') sys.stdout.buffer.write(r + s) " | b64url) printf '%s.%s' "$signing_input" "$sig_p1363" } # 1. Mint a token. TOKEN_PROOF=$(build_proof POST "$API/oauth/token") TOKEN_RESP=$(curl -fsS -X POST "$API/oauth/token" \ -u "$CLIENT_ID:$CLIENT_SECRET" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "DPoP: $TOKEN_PROOF" \ -d "grant_type=client_credentials") ACCESS_TOKEN=$(echo "$TOKEN_RESP" | jq -r .access_token) # 2. Build a per-request proof (this one carries `ath`) and call /v1. ATH=$(printf '%s' "$ACCESS_TOKEN" | sha256_b64url) REQ_URL="$API/v1/beneficiaries" REQ_PROOF=$(build_proof GET "$REQ_URL" "$ATH") curl -fsS "$REQ_URL" \ -H "Authorization: DPoP $ACCESS_TOKEN" \ -H "DPoP: $REQ_PROOF" ``` ## Token caching * Cache an access token until `exp - 60 seconds`. Don't refresh on every call — it's wasted round-trips. * On `401 invalid_token`, force-refresh once (the previous token may have expired between mint and use). * DPoP proofs are **not** cacheable — generate a fresh one for every request. ## Troubleshooting | Error code | Likely cause | Fix | | - | - | - | | `invalid_dpop_proof` (`htm` mismatch) | Proof signed for a different HTTP method | Sign each proof for the actual method you're calling. | | `invalid_dpop_proof` (`htu` mismatch) | Proof signed for a different URL | Use `scheme://host/path` only — strip query and fragment. | | `invalid_dpop_proof` (`iat` skew) | Your clock is more than 60s off | Sync via NTP. | | `invalid_dpop_proof` (`jti` replay) | You sent the same proof twice | Generate a fresh `jti` per request (use a UUID). | | `invalid_dpop_proof` (jkt mismatch) | The DPoP key in the proof header isn't the one you registered | Re-register the keypair, or fix your client to use the registered key. | | `invalid_token` (`ath` mismatch) | The `ath` claim doesn't match SHA-256 of the access token | Recompute `ath = base64url(sha256(access_token))` per request. | | `invalid_token` (expired) | Access token past its `exp` | Mint a new token via `POST /oauth/token`. | | `invalid_client` | Wrong `client_id` / `client_secret` / revoked client | Check secrets; rotate via portal if compromised. | | `key_environment_mismatch` | Test creds against prod (or vice versa) | Use the right pair. Sandbox credentials only work on `api.antonpayments.dev`. | | `static_api_keys_disabled` | You sent `Authorization: Bearer ak_*` | Static API keys are not accepted on v1. Migrate to OAuth. | | `insufficient_scope` | The credential was created without the scope this endpoint needs | Use (or create) a credential carrying the right scope. See [Capabilities & Scopes](/capabilities). | | `capability_required` | Your account doesn't hold the capability this endpoint needs (e.g. AI-compliance-only account calling a payout endpoint) | Contact Anton to change your account's tier. | ## Security model **DPoP defends against bearer-token theft.** A leaked access token alone is useless without the matching private DPoP key. This neutralises a common class of incidents — tokens captured via stack traces, error reports, network proxies, or misconfigured logging. **DPoP does NOT defend against full credential-store theft.** If an attacker exfiltrates both the private DPoP key AND a live access token from your infrastructure, they can forge proofs and act as you for up to one token TTL. The mitigations are short token TTLs (1 hour in production), key rotation discipline, and reducing blast radius via the credential's revoke endpoint. **Token TTL is the revocation mechanism.** If you suspect a credential is compromised, rotate the `client_secret` (the rotate endpoint issues a new one) and revoke the client. Outstanding tokens will continue to verify until their `exp` — at most 1 hour in production. For emergency revocation of in-flight tokens, contact support. **Anton's signing key rotates every 90 days** with a 24-hour publication overlap. The JWKS endpoint at `/v1/.well-known/jwks.json` always reflects the currently-trusted set; cache it for ≤5 minutes (the response includes a matching `Cache-Control`). ## SDKs SDKs are not part of v1. Programmatic clients integrate against the raw HTTP surface; the curl example above is the canonical reference. Official SDKs for Go, Node, and Python are tracked as a follow-up initiative — when they ship, the canonical authentication examples will move into the per-language quickstarts. ## Requirements * **Use HTTPS.** Anton only accepts TLS 1.2+ connections. Plaintext requests are dropped at the edge. * **Never commit credentials to source control.** Use environment variables or a dedicated secrets manager. The DPoP private key especially — it's the second half of your bearer-token defense. * **Never include credentials in frontend code.** All API calls must originate from a trusted backend. * **Prefer one credential per service.** Narrower blast radius when a credential needs to be rotated. * **Wall clock within 60 seconds of UTC.** NTP in your container/host. DPoP `iat` claims are time-bounded. # Capabilities & Scopes Source: https://docs.antonpayments.com/capabilities Account capabilities and credential scopes control which parts of the Anton API an integration can reach — including AI-compliance-only accounts with no payout surface at all. Anton enforces least-privilege access at two independent layers: 1. **Account capabilities** — what your merchant account as a whole is allowed to do. Set by Anton as a commercial/risk decision. 2. **Credential scopes** — what an individual OAuth client (or API key) is allowed to do within your account. Set by you when the credential is created. A request succeeds only when both layers allow it: ``` effective access = credential scopes ∩ account capabilities ``` ## The capability vocabulary | Value | Covers | | - | - | | `payouts` | All money movement — payouts, batches, beneficiaries, instruments, balances, funding accounts, FX, pricing, corridors, and the sandbox payout/beneficiary seeders. | | `intelligence` | Anton Intelligence — risk evaluations and evidence retrieval, plus customer [Verifications](/guides/verifications) (KYC/KYB over hosted flows). See the [Intelligence overview](/guides/intelligence/overview). | Every standard merchant account carries both capabilities, and every credential minted before scopes existed behaves as full-scope — **nothing changes for existing integrations**. ## The AI-Compliance tier Anton offers an **AI-compliance-only tier**: accounts provisioned with `capabilities = ["intelligence"]` and no payout surface at all. These accounts buy Anton Intelligence — payee screening, instrument screening, onboarding risk, transaction-context evaluation — without moving money through Anton. For a compliance-only account: * Every payout-surface endpoint returns `403` with code `capability_required`. The account is structurally incapable of creating payouts, beneficiaries, instruments, batches, or FX exchanges. * The intelligence surface, dashboard, documents, RFIs, onboarding, team management, API credential management, audit log, and reference data (currencies, countries, payment methods) all work normally. * **Webhooks work normally.** Subscriptions and deliveries are available on every tier — payout events simply never fire for an account that cannot create payouts. * Credentials created under the account default to the `intelligence` scope only. A compliance-only integration is exactly the [Intelligence quickstart](/guides/intelligence/quickstart): mint a token, `POST /v1/intelligence/evaluations`, read evaluations and evidence back under your own account. To move between tiers (for example, adding payouts to a compliance-only account after underwriting), contact Anton via [help.antonpayments.com](https://help.antonpayments.com). Capability changes take effect immediately — no token re-mint or credential rotation is required, because capabilities are evaluated per request against your account, not baked into tokens. ## Credential scopes Each OAuth client carries a scope set assigned **at creation time**: * Scopes must be a subset of your account's capabilities at the moment of creation — a request for an out-of-capability scope is rejected. * If you don't specify scopes, the credential defaults to **your account's current capabilities** (a compliance-only account's default credential is `intelligence`-only). * Scopes are **immutable** after creation. To change a credential's scope, create a new credential and revoke the old one. Use scoped credentials the way you use least-privilege IAM: give your compliance tooling an `intelligence`-only credential and your payment service a `payouts` credential, so a leaked compliance credential can never move money. ### Scopes in tokens Granted scopes are embedded in every access token as a space-delimited `scope` claim (RFC 6749 §3.3) and echoed in the token response: ```json theme={} { "access_token": "eyJhbGciOiJFUzI1NiIs...", "token_type": "DPoP", "expires_in": 3600, "scope": "intelligence" } ``` There is no `scope` request parameter on `POST /oauth/token` — tokens always carry exactly the scopes the credential was created with. ## Denial semantics Both layers fail with `403` and a stable code, checked in this order: | Code | Layer | Meaning | | - | - | - | | `capability_required` | Account | Your merchant account does not hold the capability this endpoint requires. Typical for an AI-compliance-only account calling a payout endpoint. | | `insufficient_scope` | Credential | Your account holds the capability, but the credential making the call was created without the matching scope. Use (or create) a credential with the right scope. | ```json theme={} { "error": { "code": "capability_required", "message": "this endpoint requires the \"payouts\" account capability" } } ``` The capability gate runs first: a `payouts`-scoped credential on a compliance-only account receives `capability_required`, not `insufficient_scope`. Denials at either layer are recorded in your account's audit trail. Neither code is retryable — the same request will fail identically until the account capability or credential changes. See [Errors](/api-reference/errors#authorization-and-access). ## What each surface requires | Surface | Requires | | - | - | | Payouts, batches, beneficiaries, instruments, balances, accounts & funding, FX, pricing, corridors, sandbox seeders | `payouts` capability + `payouts` scope | | Intelligence evaluations and evidence | `intelligence` capability + `intelligence` scope | | Verifications (KYC/KYB) | `intelligence` capability + `intelligence` scope. Name reveal and captured-document viewing are dashboard-only (admin). | | Webhooks, documents, RFIs, onboarding, users & settings, API credential management, audit log, reference data | Any authenticated credential — available on every tier. Responding to an RFI is dashboard-only and needs `rfis.respond` (Admin or Operator role). | Two classes of operation are **dashboard-only** regardless of scope, and reject machine credentials with `403 oauth_client_not_accepted` or `403 insufficient_permissions`: * **Approval decisions** — payout approve/reject in the maker-checker flow requires a signed-in human, because the approver ≠ creator guard is meaningless for a credential. * **Detokenized PII readback** — beneficiary PII retrieval, verification name reveal, and captured-document viewing happen only in the dashboard, admin-role-gated and audit-logged per access. Machine credentials can *write* PII (`PUT /v1/beneficiaries/{id}/pii` — your system is its source) but never read it back, so a leaked credential cannot harvest identities. The interactive API reference marks payout-gated endpoints with a `403 capability_required` response. # Changelog Source: https://docs.antonpayments.com/changelog A record of material changes to the Anton Payments API and documentation. ## 2026-11-09 — `payout.on_hold` webhook event ### Changed * **`payout.screening_failed` is renamed `payout.on_hold`.** The event fires at the same point with the same payload: `id`, `merchant_id`, `status` and `on_hold`. Subscribe to `payout.on_hold` in place of `payout.screening_failed`. Payout statuses are unchanged. * **`pending_screening` described.** The payout is completing required checks before it can be sent. A payout can return to this status after approval or review. No action is needed. ## 2026-10-21 — Filters on the evaluations list ### Added * **Filters on `GET /v1/intelligence/evaluations`**: `decision` and `event_type` (each one or more values, comma-separated), `risk_level`, `evaluated_after` and `evaluated_before`. Every filter is optional. ### Changed * **Unknown filter values are rejected** with `400 validation_error`, never an empty list. ## 2026-10-21 — Transactions: direction, filters, single reads and export ### Added * **`direction` on transactions.** `credit` for money in, `debit` for money out. Amounts stay unsigned. It's absent on the rare transaction whose side can't be told. * **`payout_id` and `exchange_id` on transactions**, linking a movement to the payout or FX exchange it belongs to, when known. * **Filters on `GET /v1/transactions`** and `GET /v1/accounts/{currency}/transactions`: `type`, `direction`, `status`, `currency`, `created_after`, `created_before`. * **`GET /v1/transactions/{id}`** and **`GET /v1/fx/exchanges/{id}`** (the exchange with its quote's markup and fee). * **`GET /v1/transactions/export.csv`**: the matching transactions as CSV. Needs the `reports.download` permission, and each export is recorded in your audit log. * **`return` transaction type**, for a payout returned to your balance or a deposit recalled from it. ### Changed * **Transaction `type` and `status` values** are now always lowercase and from a fixed list: types `payin`, `payout`, `fee`, `exchange`, `transfer`, `return`; statuses `completed`, `pending`, `failed`, `returned`. The values previously documented (`credit`, `debit`, `fx`, `posted`) were never sent. * **Unknown filter values are rejected** with `400 validation_error` instead of being ignored. On the per-currency list, a `currency` different from the path is rejected. * **Transaction list cursors.** Pages no longer repeat or skip a transaction that arrives while you page. A cursor issued before this change returns `400 invalid_cursor`; start again from the first page. * **`GET /v1/fx/exchanges` filters** are documented as what the API accepts: `status` and `currency`. *** ## 2026-09-24 — Payout holds, `cannot_be_processed`, and RFI responses ### Added * **`on_hold` on payouts.** `true` while a payout waits on a review, in any status before `processing`. It carries no reason. See [How Anton Evaluates Payouts](/how-anton-evaluates-payouts). * **`cannot_be_processed` payout status** and the **`payout.cannot_be_processed`** webhook event. Treat the status as final; it cannot be cancelled via the API. * **`409 payout_on_hold`** on `POST /v1/payouts/{id}/cancel` when the payout is under review, whatever the review is about. See [Errors](/api-reference/errors). ### Changed * **Cancellable statuses.** A payout can be cancelled from `created`, `pending_screening`, `pending_approval`, or `approved`. Payouts under review (`manual_review`, `pending_engine_review`, `screening_failed`, or any payout with `on_hold: true`) can no longer be cancelled until the review concludes. * **`payout.screening_failed` payload.** Now carries `id`, `merchant_id`, `status`, and `on_hold`, with no `reason`. * **RFI responses.** Responding to an RFI, and attaching documents to a response, now requires the `rfis.respond` permission, held by the Admin and Operator roles, in the dashboard. Operators can now respond. API credentials cannot respond to RFIs. * **Batch validation.** Validation no longer returns screening results. The warning `type` values are now documented, and `beneficiary_name_change` warnings name the changed field instead of the beneficiary's name. * **Blocked beneficiaries.** Documentation now describes `blocked` as "cannot be used for payouts". ### Deprecated * **`screening.hit` is no longer sent.** A payout under review shows `on_hold: true` and its status instead. Existing subscriptions keep working but receive no deliveries. *** ## 2026-07-17 — Machine credentials across the payout surface OAuth+DPoP credentials carrying the `payouts` scope now exercise the full money-movement mutation surface. Previously, machine callers could read but not mutate on several payout-surface endpoints; credential scopes now map directly to the permissions each endpoint requires, so a `payouts`-scoped credential creates and cancels payouts, manages beneficiaries and instruments, uploads and confirms batches, executes FX, and manages webhook subscriptions — end to end. ### Added * **Scope-mapped permissions for machine credentials.** Each credential scope carries a fixed permission set enforced per endpoint (least privilege — SOC 2 CC6.1/CC6.3). `payouts` covers the money-movement surface; `intelligence` covers evaluations and Verifications; both cover webhook subscription management. * **New error code `403 oauth_client_not_accepted`** on dashboard-only endpoints reached with an API credential. See [Errors](/api-reference/errors). ### Changed * **Beneficiary PII is write-only for machine credentials.** `PUT /v1/beneficiaries/{id}/pii` remains available (your system is the source of the data); `GET /v1/beneficiaries/{id}/pii` has been removed from the public API surface. Detokenized PII readback — beneficiary PII, verification name reveal, captured documents — exists only in the merchant dashboard, admin-gated and audit-logged per access. A leaked API credential cannot harvest identities. * **Approval decisions stay human.** Payout approve/reject (maker-checker) rejects machine credentials — an approver must be a signed-in portal user distinct from the creator. * **Access tokens without a `scope` claim now grant nothing.** The transitional full-scope default for pre-scope-era tokens has been removed; every legitimately minted token has carried the claim since it shipped, and a claim-less token now fails closed. *** ## 2026-07-16 — Verifications API Additive, non-breaking. The verification module — previously reachable only through the merchant dashboard — is now part of the public API for OAuth+DPoP credentials carrying the `intelligence` scope. ### Added * **Verifications API.** KYC/KYB-as-a-service over hosted flows: create verification subjects (`POST /v1/verification-subjects`), list and read them, re-verify, resend / regenerate / revoke links, resend per-owner (UBO) links, and read funnel stats (`GET /v1/verification-stats`). Every completed verification is sanctions-screened through Anton Intelligence, with the backing `evaluation_id` on the attempt's `screening` block. See the [Verifications guide](/guides/verifications). * **`verification.*` webhook events.** `verification.link_sent`, `verification.started`, `verification.approved`, `verification.declined`, `verification.review`, and `verification.expired` are documented in the [event catalog](/api-reference/webhook-events#verification-events). `link_sent` fires as the delivery receipt for Anton-delivered hosted links. ### Security * **PII-free machine surface.** Subject and owner names are masked on every API read; the audited name-reveal and captured-document viewing remain dashboard-only (admin, per-access audit trail). Hosted links are secret-once: returned only by the response that minted them. *** ## 2026-06-10 — Capabilities, AI-Compliance tier, authenticated Intelligence Additive, non-breaking changes to the v1 contract. Existing integrations are unaffected: every existing account keeps both capabilities, and every existing credential behaves as full-scope. ### Added * **Account capabilities and credential scopes.** Every merchant account carries a capability set (`payouts`, `intelligence`); every OAuth client carries a scope set fixed at creation and embedded in access tokens as a `scope` claim (echoed in the token response). Effective access is `scopes ∩ capabilities`. See [Capabilities & Scopes](/capabilities). * **AI-Compliance-only tier.** Accounts can be provisioned with the `intelligence` capability only — full access to Anton Intelligence, dashboards, webhooks, and credential management, with the entire payout surface structurally unreachable (`403 capability_required`). * **Authenticated Intelligence API.** `POST /v1/intelligence/evaluations` (with required `Idempotency-Key`), `GET /v1/intelligence/evaluations` (new, cursor-paginated), `GET /v1/intelligence/evaluations/{id}`, `GET /v1/intelligence/evaluations/{id}/evidence`, and `POST /v1/intelligence/evaluations/validate` now run under merchant credentials with the `intelligence` scope. Evaluations persist under your account and reads are strictly merchant-scoped. A dedicated 120 req/min per-merchant limit applies on top of the global quota. The anonymous public test surface keeps its existing contract where enabled. * **Intelligence scoring block.** Evaluation responses now include a `scoring` object: model `anton-scoring-v1`, a 0–1000 scale, an overall score and risk level, and five dimensions (Transaction Risk, Onboarding Risk, Transaction Monitoring, Anomaly Detection, Graph Intelligence). * **Stable payout failure codes.** Terminal asynchronous payout failures now record a machine-readable `failure_code` + `failure_category` (and, for provider failures, `rail_error_code` / `rail_provider` / `rail_provider_code`) in the payout event metadata served by `GET /v1/payouts/{id}/events`. See [Errors](/api-reference/errors#stable-failure-codes-on-payout-events). * **New error codes.** `403 capability_required`, `403 insufficient_scope`, `409 idempotency_in_flight`, `503 idempotency_unavailable` are now documented across the [error catalog](/api-reference/errors). ### Changed * **`X-RateLimit-*` headers documented in the OpenAPI spec.** `X-RateLimit-Limit` / `-Remaining` / `-Reset` (present on every response since v1.0.0) are now part of the published spec on the `429` response. * **OpenAPI 3.1 hygiene.** Nullable fields now use `type: [string, "null"]` per OpenAPI 3.1; the spec lints clean. *** ## v1.0.0 — 2026-04-18 The v1.0.0 merchant contract is now frozen. Merchant integrations built against this surface will not break in minor or patch releases. Breaking changes will only arrive in a future v2. ### Added * **Bindable pricing quotes.** `POST /v1/pricing/quote` now returns `quote_id` (prefix `pq_`) and `expires_at`. Pass `quote_id` on `POST /v1/payouts` to lock the quoted fee. Missing or mismatched quotes surface as `422 quote_expired` / `422 quote_already_used` / `422 quote_mismatch`. * **Per-merchant rate limits.** The 1,000 requests-per-minute base quota is per **merchant** (not per IP). Multi-seat merchants behind shared egress NATs now get coherent quota accounting. Specific merchants can be provisioned at 2×/5×/10×/20× the base by contacting support. * **Sandbox seeding.** `POST /v1/merchant/sandbox/reset`, `/seed-beneficiaries`, and `/seed-payouts` produce deterministic fixtures for SDK testing in the sandbox environment. ### Changed * **Cursor pagination everywhere.** Every list endpoint uses `limit` + opaque `cursor` with `{ data, has_more, next_cursor }`. Legacy `offset` pagination has been removed. * **Monetary amounts are decimal strings, scaled per currency.** Amount fields are always emitted at the currency's canonical scale (USD/EUR at 2 decimals, JPY at 0, BHD at 3, BTC at 8, USDC at 6). Never parse as a float. * **ID prefix scheme normalised.** `pay_*` (payouts), `ben_*` (beneficiaries), `ins_*` (instruments), `bat_*` (batches), `whk_*` (webhook subscriptions), `evt_*` (events), `dlv_*` (deliveries), `pq_*` (pricing quotes), `fxq_*` (FX quotes), `fxx_*` (FX exchanges), `mer_*` (merchant). Your API-key secrets are issued by the dashboard with the `ak_live_*` / `ak_test_*` prefix. * **Corridor responses no longer expose `provider`.** Anton's rail graph is a commercial secret; the merchant view emits only the merchant-observable fields. * **Timestamps are RFC 3339 with nanosecond precision, in UTC.** * **Webhook secret rotation.** `POST /v1/webhooks/{id}/secret/rotate` returns a fresh raw secret **exactly once**; `GET /v1/webhooks/{id}/secret` thereafter returns only the masked suffix (`***xxxx`). Webhook creates also echo the raw secret once in the create response. * **Idempotency scoping.** `Idempotency-Key` is scoped per `(merchant, path, body)` — cross-merchant collisions are impossible. Replays of identical bodies return the original response; replays with a different body return `409 idempotency_conflict`. ### Security * **Cross-merchant policy.** The merchant API never exposes counts, identities, or adverse-event signals derived from other merchants' activity — not even as booleans. Anton-network intelligence is aggregated only into opaque verification signals that are indistinguishable from external-provider outcomes. * **PII isolation.** All beneficiary PII and payment instrument details are tokenized in a secure vault. Raw values are only ever returned from the dedicated `GET /v1/beneficiaries/{id}/pii` endpoint. *** ## Pre-v1.0.0 notes Early access and beta entries are retained in internal changelogs. Anything on the merchant surface prior to 2026-04-18 should be treated as unsupported. # Environments Source: https://docs.antonpayments.com/environments Anton exposes a fully functional sandbox for development and a production environment for live money movement. The two are isolated — credentials, data, and infrastructure are separate. | Environment | Base URL | Credential prefix | Token TTL | What it moves | | - | - | - | - | - | | **Production** | `https://api.antonpayments.com` | `ant_oc_live_` | 1 hour | Real funds | | **Sandbox** | `https://api.antonpayments.dev` | `ant_oc_test_` | 8 hours | Simulated payouts, no settlement | Credentials are environment-scoped. A sandbox client cannot mint tokens against production, and vice versa. Mismatched attempts return `403` with `error: "invalid_client"`. See [Authentication](/authentication) for the OAuth+DPoP flow. ## Sandbox The sandbox is a full-fidelity clone of the production API. Authentication, the data model, the state machine, webhook delivery, screening, and idempotency all behave the same way. The only substitutions are: * **Rail submission** — routed to internal mocks. No funds leave Anton, no third parties are contacted. * **Compliance screening** — real OFAC logic runs, but you can trigger specific outcomes using deterministic test beneficiaries. * **Timing** — payouts move through states on a compressed timeline so you don't wait hours for a `completed` webhook in CI. Sandbox data is isolated per merchant. You can reset your sandbox or seed it with realistic test fixtures — see [Sandbox Overview](/sandbox/overview). ## Production Production moves real money. Before a live OAuth client will issue anything but a `403`, your merchant account must be: 1. **KYB approved** — identity verification completed through the merchant dashboard. 2. **Risk underwritten** — Anton's underwriting team has reviewed and approved your account for live operation. 3. **Corridor enabled** — the source/destination currency pair you want to use is active on your account. If any of those are missing, `POST /v1/payouts` returns `403` with a code explaining what's outstanding. Use the [Going Live checklist](/guides/going-live) to verify everything before your first live call. ## Going live Sandbox and production are deliberately separate — promotion is not automatic. Walk through the [Going Live checklist](/guides/going-live) to make sure your integration handles the things sandbox can't fully simulate: real settlement timing, RFI workflows under load, and rate limits under sustained traffic. # Batch Payouts Source: https://docs.antonpayments.com/guides/batch-payouts Upload a CSV or XLSX of many payouts in a single call. Anton validates, you confirm, Anton processes. > [!NOTE] > > **Editability note:** this guide was drafted from the OpenAPI spec. If the product/engineering team has an updated batch flow (file schema, row limits, validation rules), edit inline — each H2 is self-contained. Batch payouts let you send thousands of payments in one upload. The flow is three phases: **upload → validate → confirm → process**. You can't skip steps; Anton requires you to explicitly confirm after seeing the validation summary. ## When to use batches * **Payroll** — one upload per pay cycle * **Marketplace disbursements** — nightly seller settlements * **Contractor payments** — monthly or bi-weekly payouts to many contractors For single-digit payouts per call, stick with `POST /v1/payouts`. ## The file format Download the template to start: ```bash theme={} curl "https://api.antonpayments.dev/v1/batches/template" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -o batch-template.csv ``` The template contains the canonical column order and example rows. Column order matters — Anton parses by position as well as name. Supported formats: **CSV** and **XLSX**. Each row is one payout instruction. Key columns include: * `external_ref` — your beneficiary reference (used to match existing beneficiaries or create new ones) * Beneficiary identity fields — populated only when creating a new beneficiary from the row * `source_amount` or `dest_amount` — decimal string * `dest_currency`, `dest_country` * `method`, `reference`, `purpose` * Method-specific credential columns (e.g., `iban`, `sort_code`, `wallet_address`) Consult the downloaded template for the exact schema; do not reorder columns. ## Upload a batch ```bash theme={} curl "https://api.antonpayments.dev/v1/batches" \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -F "file=@payroll-2026-04-30.csv" ``` * Max file size: 32 MB * Max rows: contact support for current limits The response returns the batch in `uploaded` status. Anton queues an async validation job — polling the batch endpoint will show the status moving through `uploaded → validating → validated` (or `validation_failed`). Duplicate uploads of the exact same file within 24 hours return `409 duplicate_file` — use `Idempotency-Key` on the upload if you want deterministic retries (the file hash already acts as one, but explicit keys give clearer error handling). ## Watch for validation Validation is asynchronous. Poll or subscribe to webhooks: ```bash theme={} curl "https://api.antonpayments.dev/v1/batches/$BATCH_ID" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` When `status` moves to `validated`, the response includes a `summary` block: * `new_beneficiaries` / `matched_beneficiaries` / `existing_beneficiaries` * Method mix (count of rows per payment method) * Estimated debits per funding currency * FX markup in basis points * Balance-sufficiency check per currency Review these before confirming. The batch has an `expires_at` — confirm before it expires, or the validated batch is marked `expired` and you have to re-upload. ## Inspect errors before confirming Row-level validation errors and warnings: ```bash theme={} curl "https://api.antonpayments.dev/v1/batches/$BATCH_ID/errors" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Errors block specific rows; warnings don't. Typical errors: * Missing required columns * Invalid currency / country codes * Amount formatting (non-decimal, too many digits) * Beneficiary mismatch (PII conflicts with existing record at same `external_ref`) * Unsupported method for the destination country Warnings use these `type` values today: `duplicate_in_batch`, `beneficiary_name_change`, `velocity_block_predicted`, and `velocity_review_predicted`. Treat any other value as informational. A `beneficiary_name_change` warning names the field that will change, not the beneficiary's name. Validation checks the file itself — format, amounts, methods, credentials, beneficiary resolution, and a velocity preview. It never returns screening results. Every payout a confirmed batch creates goes through the same checks as any other payout — see [How Anton Evaluates Payouts](/how-anton-evaluates-payouts). Fix errors in your source file and re-upload — batches are immutable once uploaded. ## Confirm a validated batch Confirmation is irrevocable — once confirmed, Anton creates payouts from valid rows and starts processing. ```bash theme={} curl "https://api.antonpayments.dev/v1/batches/$BATCH_ID/confirm" \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Idempotency-Key: confirm-$BATCH_ID" \ -H "Content-Type: application/json" \ -d '{"source_currency": "USD"}' ``` The `source_currency` in the body is the default funding currency for rows that didn't specify one. Omit to let Anton use your account default. > [!WARNING] > > Once a batch is `confirmed` you cannot cancel the batch as a whole via `POST /v1/batches/{id}/cancel` — that only works from pre-processing states. Individual payouts within the batch can still be cancelled via `POST /v1/payouts/{id}/cancel` up until they reach `processing`. ## Watch processing Status progression after confirmation: ``` confirmed → processing → completed | partial | failed ``` * `completed` — every valid row became a successful payout * `partial` — some rows succeeded, some failed during processing * `failed` — all rows failed Subscribe to `batch.completed` and `batch.failed` webhook events rather than polling. ## Inspect per-row results Once processing finishes, pull the per-row outcomes: ```bash theme={} curl "https://api.antonpayments.dev/v1/batches/$BATCH_ID/results" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Each result has the original row number, outcome (`success` / `failed` / `skipped` / `pending`), and the created `payout_id` (if any). Use this to reconcile your source file with what actually shipped. For the created payouts themselves: ```bash theme={} curl "https://api.antonpayments.dev/v1/batches/$BATCH_ID/payouts" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` These are normal `Payout` records — the full state machine applies, and each fires its own `payout.*` webhook events as it moves through processing and settlement. ## Cancelling Before processing starts (states: `uploaded`, `validating`, `validated`, `validation_failed`, `confirmed` before worker picks it up), cancel the whole batch: ```bash theme={} curl "https://api.antonpayments.dev/v1/batches/$BATCH_ID/cancel" \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Once `processing` starts, cancel individual payouts instead. ## Resumability Anton tracks a per-batch `current_row_index` checkpoint — if the batch worker restarts mid-process, it resumes from the last successfully processed row rather than re-processing everything. You don't have to do anything for this to work; it's platform behavior. ## Next steps > [card] [Send a single payout](/guides/send-a-payout) > > For low-volume, per-event payout flows. > [card] [Handle webhooks](/guides/handle-webhooks) > > Subscribe to `batch.*` and `payout.*` events for real-time status. # Crypto & Stablecoin Payouts Source: https://docs.antonpayments.com/guides/crypto-payouts Pay beneficiaries on-chain or in stablecoins. The API surface is identical to fiat — the differences are in the instrument, the finality model, and the network details. Anton handles four crypto-adjacent flows with the same API surface as fiat: * **Stablecoin → fiat** — you fund in USDC/USDT, beneficiary receives fiat. Anton converts on the way out. * **Stablecoin → stablecoin** — on-chain transfer between wallets. * **Stablecoin → other crypto** — convert and deliver in native crypto. * **Fiat → stablecoin** — fund in fiat, deliver USDC/USDT to a wallet. The programmatic flow is exactly the same as a fiat payout: create beneficiary → attach wallet instrument → send payout. The differences are in the instrument credentials, the `method` + `network`, and the finality model. ## The wallet instrument A crypto/stablecoin instrument uses `method: "crypto"` on creation. Credentials are network-specific: ```bash theme={} curl "https://api.antonpayments.dev/v1/beneficiaries/$BEN_ID/instruments" \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: ins-crypto-001" \ -d '{ "method": "crypto", "currency": "USDC", "label": "Primary USDC wallet (Ethereum)", "is_default": true, "credentials": { "wallet_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1", "network": "ethereum", "token_symbol": "USDC" } }' ``` `network` values (see the [Payouts — Network enum](/api-reference/payouts/create-payout)): `ethereum`, `polygon`, `arbitrum`, `optimism`, `base`, `avalanche`, `bsc`, `tron`, `solana`, `bitcoin`, `lightning`, `stellar`, `ripple`. ### Memo and tag fields Some chains require a memo or destination tag to route funds correctly within an exchange: * **XRP** — `destination_tag` * **Stellar** — `memo` (text or hash) * **Cosmos-family** — `memo` Provide these in `credentials` when the beneficiary's receiving address belongs to an exchange. Missing a required tag will send funds to a generic exchange address where they may be unrecoverable. ### Address validation Anton validates wallet addresses client-side against chain checksums where applicable (EVM chains use EIP-55, Bitcoin uses Base58Check). A malformed address returns `422 invalid_credentials`. **What Anton does not do**: verify the address belongs to the person you intended. There is no equivalent of UK Confirmation of Payee for crypto. The beneficiary PII on the `Beneficiary` record is for KYC/compliance; on-chain delivery goes to the address you provided, period. ## Sending the payout Same endpoint as fiat. The `method` and `rail_type` distinguish the flow: ```bash theme={} curl https://api.antonpayments.dev/v1/payouts \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: pay-onchain-001" \ -d '{ "beneficiary_id": "ben_...", "instrument_id": "ins_...", "source_amount": "1000.00", "source_currency": "USDC", "dest_amount": "1000.00", "dest_currency": "USDC", "method": "stablecoin", "rail_type": "stablecoin", "fixed_side": "fixed_dest", "purpose": "contractor_payment", "reference": "INV-2026-04-042" }' ``` For `stablecoin → fiat`: ```json theme={} { "source_amount": "1000.00", "source_currency": "USDC", "dest_amount": "920.00", "dest_currency": "EUR", "method": "sepa", "rail_type": "fiat", "fixed_side": "fixed_dest" } ``` Anton handles the off-ramp — converting USDC → EUR and settling via SEPA — under the hood. ## The finality model Crypto finality is different from fiat. The `processing → sent → completed` transitions mean specific on-chain states: | State | On-chain meaning | | - | - | | `processing` | Transaction broadcast to the network. `tx_hash` populated. | | `sent` | Confirmed in at least one block. `block_confirmations >= 1`. | | `completed` | Confirmations reach `required_confirms` for the network. Considered final. | | `failed` | Transaction rejected at broadcast (invalid nonce, insufficient gas, invalid address). No funds moved. | | `returned` | Uncommon — rail operator recovered funds from a chain reversal. Most networks don't support this. | Required confirmations per network (from the corridor): * **Bitcoin**: 3-6 confirmations (\~30-60 min) * **Ethereum**: 12-32 confirmations (\~3-6 min) * **Polygon / Arbitrum / Optimism / Base**: network-specific, typically 1-20 minutes to `completed` * **Tron**: 1-20 blocks (\~3-60 sec) * **Solana**: finality at \~1 slot (\~400 ms; `completed` in seconds) * **Lightning**: near-instant Values populate on the `Payout` response as `block_confirmations` and `required_confirms` progress. ## Gas and network fees `network_fee` and `network_fee_currency` on the Payout record show the on-chain fee. It's deducted from the settlement, not from your merchant balance — so the `dest_amount` the beneficiary receives may be smaller than what you intended if the recipient pays fees (depending on method and `fee_bearer`). ## Refunds and reversals **Crypto is not fiat.** There is no chargeback, no reversal-by-default, no UK Faster Payments "return to sender" window. If a payout reaches `completed`: * Funds are on-chain, in the beneficiary's wallet. * Anton cannot recall them. Only the receiving party can return funds by sending a new transaction. If a payout reaches `failed`: * Nothing moved. Funds are still in your merchant balance (assuming the reserve was released, which Anton does automatically). If a payout is in `processing` or `sent`: * Confirmations are in progress. You cannot cancel. ## Gotchas > [accordion] Wrong network > > USDC on Ethereum is not USDC on Tron. Sending USDC-ERC20 to a Tron address loses the funds permanently. Verify the `network` on the instrument matches what the beneficiary expects BEFORE creating. > [accordion] Non-custodial wallet edge cases > > Some hardware wallets reject transactions below a dust threshold. Test with a realistic amount in sandbox before shipping a product that supports very small crypto payouts. > [accordion] Exchange addresses need memo/tag > > Sending to an exchange (Coinbase, Binance, Kraken, etc.) without the required memo or destination tag usually lands in a generic exchange account that requires manual support-ticket recovery. Always capture the memo/tag field when the beneficiary's wallet is an exchange. > [accordion] Token contract impersonation > > Many tokens use similar names or symbols. Anton validates `token_contract` where provided. If your `credentials` include `token_contract` for a custom ERC-20, Anton will only send that exact contract's tokens — prevents confused-deputy sends. > [accordion] Reorg behavior > > On probabilistic-finality chains (Bitcoin, Ethereum before finalization), a transaction that's `sent` could theoretically re-org out and move back to `processing`. Anton's state model accounts for this — don't mark the payout as final until `completed`. ## Stablecoin funding your balance To pay OUT stablecoin, you first need stablecoin in your merchant balance. Ryan's integration path: contact support to get a merchant-specific deposit address for each stablecoin/network pair you want to fund in. Deposits are detected on-chain, and once confirmations complete, the balance is credited — fires `funding.credit` if you're subscribed. (Programmatic funding address creation is not currently exposed on the merchant API; dashboard-driven for v1.) ## Subscribe to crypto-relevant events Same `payout.*` events as fiat — `payout.processing`, `payout.sent`, `payout.completed`, `payout.failed`. Payload carries `tx_hash`, `network`, `block_confirmations`, `required_confirms`. ## Next steps > [card] [Send a payout](/guides/send-a-payout) > > The unified payout API — same shape for fiat and crypto. > [card] [FX & exchange](/guides/fx-exchange) > > Converting stablecoin to fiat balance for off-ramp payouts. # FX & Currency Exchange Source: https://docs.antonpayments.com/guides/fx-exchange Get indicative rates, lock a quote, execute an exchange between currencies — and understand how cross-currency payouts use all three. Three related surfaces sit under `/v1/fx`: * **Indicative rate** (`GET /v1/fx/rate`) — read-only, cheap, non-binding. For display. * **Lockable quote** (`POST /v1/fx/quote`) — binding rate for a short window. Use when you need price certainty before committing. * **Exchange** (`POST /v1/fx/exchange`) — executes a locked quote, moves funds between your own merchant balances in different currencies. Plus — cross-currency payouts automatically use FX under the hood when you submit `POST /v1/payouts` with different `source_currency` and `dest_currency`. ## When you need each | You want to... | Use | | - | - | | Show a customer what a payout will cost them in their currency | `GET /v1/fx/rate` | | Lock in a rate before showing "send" to the customer | `POST /v1/fx/quote` then `POST /v1/fx/exchange` | | Convert your own balance from one currency to another | `POST /v1/fx/quote` then `POST /v1/fx/exchange` | | Send a payout that debits one of your currencies and credits another on the beneficiary's side | `POST /v1/payouts` with different source/dest currencies — FX is automatic | ## Indicative rates For display-only use. Two currencies, optional recipient-side (`buy`) amount: ```bash theme={} curl "https://api.antonpayments.dev/v1/fx/rate?sell_currency=USD&buy_currency=EUR&buy_amount=1000" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Response: ```json theme={} { "sell_currency": "USD", "buy_currency": "EUR", "mid_market_rate": "0.9215", "customer_rate": "0.9173", "fx_markup_bps": 45, "sell_amount": "1090.18", "buy_amount": "1000.00" } ``` * `mid_market_rate` — raw interbank rate * `customer_rate` — mid-market adjusted by your pricing plan's FX markup (`fx_markup_bps`) * `sell_amount` — computed using `customer_rate` from the supplied `buy_amount` * When `buy_amount` is omitted, the response prices a single unit (`buy_amount=1`) for rate display In sandbox, rates come from a public reference-rate feed. Rate-limited to 30 per minute per IP. The rate is not locked — by the time you execute, it may have moved. ## Lockable quotes When you need certainty: ```bash theme={} curl https://api.antonpayments.dev/v1/fx/quote \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "sell_currency": "USD", "buy_currency": "EUR", "buy_amount": "1000.00", "locked": true }' ``` Supply either `sell_amount` OR `buy_amount` — Anton computes the other side at the quoted rate. The response includes an `id` (`fxq_...`) and an `expires_at`. Execute before that moment. ```json theme={} { "id": "fxq_01HX8Z9K0M2N3P4Q5R6S7T8UFX", "sell_currency": "USD", "buy_currency": "EUR", "sell_amount": "1089.91", "buy_amount": "1000.00", "customer_rate": "0.9175", "mid_market_rate": "0.9215", "fx_markup_bps": 45, "expires_at": "2026-04-15T14:32:00Z", "locked": true } ``` Lockable quotes are rate-limited at 30/min per IP. ## Executing an exchange Exchange is idempotent: ```bash theme={} curl https://api.antonpayments.dev/v1/fx/exchange \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: fxx-$CUSTOMER_ORDER_ID" \ -d '{"quote_id": "fxq_01HX8Z9K0M2N3P4Q5R6S7T8UFX"}' ``` The exchange: * Debits `sell_amount` from your merchant balance in `sell_currency`. * Credits `buy_amount` to your merchant balance in `buy_currency`. * Records an `fx.exchange.*` webhook event and an audit entry. If the quote has expired, you get `410 quote_expired` — request a new quote. Rate-limited at 10/min per IP. ## FX on cross-currency payouts You typically don't call `/v1/fx/*` explicitly when sending a payout — Anton handles it transparently: ```bash theme={} curl https://api.antonpayments.dev/v1/payouts \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Idempotency-Key: pay-xborder-001" \ -H "Content-Type: application/json" \ -d '{ "beneficiary_id": "ben_...", "instrument_id": "ins_...", "source_amount": "550.00", "source_currency": "USD", "dest_amount": "500.00", "dest_currency": "EUR", "method": "sepa", "fixed_side": "fixed_dest", "purpose": "supplier_payment", "reference": "PO-8821" }' ``` Anton computes the required `source_amount` using current pricing (rate + markup + fee + buffer), debits your USD balance, converts, and pays the beneficiary in EUR via SEPA. The returned `Payout` carries FX detail — `exchange_rate`, `fee`, `fee_currency`, `buffer_amount`, `buffer_currency`. The `buffer_amount` is a cross-currency rate buffer held during processing and released on settlement. **When to lock separately**: if your application needs to show the exact `source_amount` to the end user before they confirm, pre-lock via `POST /v1/fx/quote` and surface the quote's `customer_rate`. The payout will use the same corridor pricing but isn't bound to the quote unless you execute against the locked quote explicitly (via the merchant account funding path — typically dashboard-driven). ## Listing exchange history ```bash theme={} curl "https://api.antonpayments.dev/v1/fx/exchanges?sell_currency=USD&limit=50" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Filters: `sell_currency`, `buy_currency`, `created_after`, `created_before`. Cursor-paginated. Each exchange has a `status` (`pending` / `completed` / `failed`) and, if it was created to fund a cross-currency payout, a `payout_id`. ## What can go wrong > [accordion] 422 insufficient\_balance on exchange > > Your sell-currency balance can't cover the exchange. Fund your balance or size the exchange down. > [accordion] 410 quote\_expired > > The lock window passed. Request a new quote — the rate may have moved in either direction. > [accordion] 422 currency\_not\_supported > > Anton doesn't currently support FX in the requested pair. See `GET /v1/currencies` for what's available. > [accordion] 503 locked\_rate\_unavailable > > Upstream provider can't honor the locked rate. Rare. Retry after a short delay. > [accordion] 502 fx\_rates\_unavailable > > Upstream rate feed is down. Honor Retry-After if present and back off. ## Subscribe to FX webhooks * `fx.quote.created` * `fx.exchange.created` * `fx.exchange.completed` * `fx.exchange.failed` See [Webhook Events](/api-reference/webhook-events) for payload schemas. ## Next steps > [card] [Send a payout](/guides/send-a-payout) > > Including cross-currency payouts that use FX transparently. > [card] [Handle webhooks](/guides/handle-webhooks) > > React to `fx.*` events on your balance-sheet reconciliation. # Going Live Source: https://docs.antonpayments.com/guides/going-live The checklist you walk through before your first production payout. Every item is a hard dependency — sandbox cannot prove any of it for you. Moving from sandbox to production is a deliberate switch, not an upgrade. The environments are isolated by design: different credentials, different data, different base URL. This checklist covers what sandbox can't simulate. > [!WARNING] > > A single missed item — unverified webhook signatures, no idempotency on payout creation, missing `429` handling — can mean duplicate payouts, silent failures, or being billed for funds you can't prove you sent. Walk the list. ## Merchant account **1. Complete KYB** Identity verification and business underwriting must be approved before any live payout will clear `pending_screening`. Track status in the merchant dashboard. **2. Fund your balance** Deposit fiat or stablecoin for the corridor you intend to use. Live payouts draw from your balance — a zero balance returns `insufficient_funds`. **3. Enable your corridors** Confirm every source/destination currency pair your application uses is active on your account. Requesting a corridor that isn't enabled returns `corridor_not_enabled`. ## Integration **1. Idempotency on every mutation** Every `POST`, `PUT`, or `PATCH` that creates or mutates state must carry an `Idempotency-Key` header. Derive keys deterministically from your own business data so you can safely retry after a network failure without double-sending. See [Idempotency](/api-reference/idempotency). **2. Webhook endpoint in production** Deploy your webhook receiver with HTTPS, a publicly reachable hostname, and logging. Subscribe to `payout.*`, `beneficiary.*`, `rfi.*`, and any other events you depend on. **3. Signature verification on every delivery** Reject any webhook whose signature fails verification. Use a constant-time compare. Enforce a replay window — reject deliveries older than 5 minutes. See [Webhook Signing](/api-reference/webhook-signing). **4. Rate limit handling** On `429`, honor the `Retry-After` header with jittered backoff. Do not retry everything at the same instant. See [Rate Limits](/api-reference/rate-limits). **5. Error handling for every documented code** Parse the `error.code` field on `4xx` and `5xx` responses and map each to a deliberate behavior: retry, escalate to a human, surface to the end user, or fail the job. See [Errors](/api-reference/errors). **6. Graceful handling of payouts under review** Payouts under review (`on_hold: true`) can clear in minutes, or take longer if an RFI is raised. Surface a pending state to your end user; do not treat review as an error. Handle `cannot_be_processed` as a final state. ## Operations **1. Monitoring and alerting** Alert on: unexpected payout failures, webhook delivery retries exhausted, elevated `5xx` rates from the Anton API, payouts on hold for longer than you expect, and open RFIs older than your SLA. **2. Credential management** Production API keys live in your secrets manager — never in environment files committed to source control, never in frontend code. Document your rotation procedure before go-live, not after the first incident. **3. Audit log access** Confirm your team has access to the merchant audit log in the dashboard. Every state-changing API call generates an audit entry; this is the authoritative record for compliance and incident response. ## Cutover day Swap `ant_oc_test_*` for `ant_oc_live_*` in your production secrets manager and redeploy. Verify the first live request with a **very small payout** to a beneficiary you control — confirm the full lifecycle (`created → approved → sent → completed`) before ramping traffic. > [!NOTE] > > Production payouts cannot be rolled back once a rail accepts them. There is no undo. Test the lifecycle end-to-end at minimum volume first. ## If something looks wrong Pause new payout creation and contact [help.antonpayments.com](https://help.antonpayments.com). Include the `X-Request-ID` header from any response that behaved unexpectedly — it lets support trace the exact call in our logs. # Handle Webhooks Source: https://docs.antonpayments.com/guides/handle-webhooks Subscribe to events, verify signatures, and build a webhook consumer you can rely on. Webhooks are how Anton tells your system that something happened without you having to ask. A payout settles, a beneficiary is blocked, an RFI is raised — Anton signs a JSON event and POSTs it to an HTTPS URL you control. This guide covers the integrator's end-to-end: how to subscribe, how to verify signatures, how to handle retries, and what patterns your receiver should follow. ## When to use webhooks (vs polling) **Always use webhooks in production.** Polling has three problems: * Wastes rate-limit budget — `GET /v1/payouts/{id}` in a loop quickly hits the 1,000 req/min per-merchant ceiling. * Introduces latency — you learn about state changes on your polling interval, not when they happen. * Misses intermediate transitions — by the time you poll, a payout may have already moved through two states. Polling is fine during development when you don't yet have a public HTTPS endpoint. For production, subscribe. ## Creating a subscription ```bash theme={} curl https://api.antonpayments.dev/v1/webhooks \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-app.example.com/webhooks/anton", "events": [ "payout.completed", "payout.failed", "payout.returned", "payout.on_hold", "beneficiary.blocked", "rfi.created" ] }' ``` The URL must be: * **HTTPS** — `http://` is rejected in all non-development environments. * **Publicly reachable** — private IP ranges, loopback, and cloud metadata endpoints (e.g. `169.254.169.254`) are rejected server-side. The response includes the subscription `id` (`wbh_...`) and a one-time `secret` (`whsec_...`). **Store the secret in your secrets manager immediately** — Anton doesn't retain the plaintext, and you cannot retrieve it later without calling `GET /v1/webhooks/{id}/secret` (which you can, but rotating is cleaner). Use `["*"]` as the `events` array to subscribe to everything. ## Signing and verification Every delivery carries HMAC-SHA256 headers: * `X-Webhook-Signature: v1={hex-hmac}` * `X-Webhook-Timestamp: {unix-seconds}` * `X-Webhook-ID: {event-id}` — use for deduplication * `X-Webhook-Event: {event-type}` * `User-Agent: AntonPayments-Webhook/1.0` The signed string is `{timestamp}.{raw-body}`. Verify every delivery in constant time. See [Webhook Signing](/api-reference/webhook-signing) for copy-paste verification code in bash, JavaScript, PHP, and Go. Treat unverified deliveries as untrusted HTTP requests — do not act on the payload until the signature checks out. > [!WARNING] > > Parse the **raw request body**, not parsed-and-reserialized JSON. Re-encoding changes byte ordering and breaks verification. ## Delivery semantics * **At-least-once.** Subscribers may occasionally receive the same event twice. Deduplicate on the envelope `id`. * **Ordering** — events for the same resource dispatch in the order they occur, but network retries can re-order arrivals at your endpoint. Don't assume order; reconcile state from the payload. * **Retries** — failed deliveries retry with exponential backoff: 30s, 2m, 8m, 32m, hourly. Up to 5 total attempts. After 5 failures, the delivery is abandoned. * **Timeout** — Anton waits up to 30 seconds for your `2xx` response. Return 2xx fast and do heavy work asynchronously (enqueue, then respond). * **Redirects** — not followed. Your URL must respond directly. A delivery is successful when your endpoint returns any `2xx` status code. Non-2xx responses (including `3xx`) count as failure and trigger retries. ## The events you probably want Core payout lifecycle: * `payout.completed` — funds delivered * `payout.failed` — rail rejected or failed settlement * `payout.returned` — funds returned after send * `payout.on_hold` — a payout is on hold * `payout.cannot_be_processed` — payout cannot be processed * `payout.velocity_blocked` — velocity rule rejected * `payout.engine_blocked` — engine-driven block; fires alongside `payout.velocity_blocked` Beneficiary lifecycle: * `beneficiary.created` * `beneficiary.updated` — edit, PII update, archive, or restore * `beneficiary.blocked` — beneficiary can no longer be used for payouts Requests for Information: * `rfi.created` — Anton raised a Request for Information `screening.hit` is no longer sent. A payout under review shows `on_hold: true` and its status instead. FX: * `fx.exchange.completed`, `fx.exchange.failed` Funding: * `funding.credit` — deposit landed in your balance The full catalog (27 event types) with payload schemas is at [Webhook Events](/api-reference/webhook-events). ## Receiver patterns A production-ready webhook receiver does four things in order: **1. Enqueue fast** Read the raw body, enqueue it for async processing, return `200` immediately. Don't block on database writes or downstream API calls inside the request handler — Anton's 30-second timeout is generous but chains of dependent work can exceed it. **2. Verify the signature** Before the enqueued worker trusts the payload, verify the signature using the stored secret. Reject anything older than 5 minutes (replay protection). **3. Deduplicate** Check the envelope `id` against a recent-events store (Redis SET with TTL works). Skip if already seen. At-least-once delivery means this IS going to happen. **4. Apply idempotently** Design your event handlers so applying the same event twice converges on the same state. Use the resource's `status` as the source of truth — `payout.completed` twice should move a payout to `completed` once. ## Debugging delivery failures `GET /v1/webhooks/events/{id}/deliveries` returns every delivery attempt Anton made for a given event — the exact request headers sent, your response status, response body (truncated), transport errors, duration, and retry schedule. When a delivery is failing, this is where you look: ```bash theme={} curl "https://api.antonpayments.dev/v1/webhooks/events/$EVENT_ID/deliveries" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Common failure modes: * **Signature mismatch (400 from your endpoint)** — you're verifying against a parsed body instead of the raw bytes, or the secret rotated and you didn't update. * **Connection timeout** — your endpoint took longer than 30s to respond. Move work off the request path. * **5xx from your endpoint** — application error; look at your own logs. * **Certificate errors** — your HTTPS cert is expired, self-signed, or mismatched to the hostname. ## Testing without waiting for real events Fire a synthetic delivery via `POST /v1/webhooks/{id}/test`: ```bash theme={} curl https://api.antonpayments.dev/v1/webhooks/$WBH_ID/test \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Anton sends a `test` event to your subscription. Use it to validate connectivity, signature verification, and response handling before depending on real events in sandbox tests. ## Secret rotation When a secret might be compromised — or on a schedule — rotate it: ```bash theme={} curl https://api.antonpayments.dev/v1/webhooks/$WBH_ID/secret/rotate \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` The response contains the new secret — again, shown once. **Rotation has no overlap window** — the old secret is invalidated immediately. Plan rotations for low-traffic periods, and update your receiver's secret in lockstep. ## Deactivation vs deletion * **Deactivate** (`POST /v1/webhooks/{id}/deactivate`) — stop delivering events. Subscription stays as a record; reactivation may be a supported future path. * **Delete** (`DELETE /v1/webhooks/{id}`) — permanent. Event history remains for audit, but no new deliveries. Prefer deactivate during incidents so you can resume later. ## Next steps > [card] [Webhook event catalog](/api-reference/webhook-events) > > Every event type and its payload schema. > [card] [Webhook signing](/api-reference/webhook-signing) > > Copy-paste HMAC verification in 4 languages. # Decisions and Next Actions Source: https://docs.antonpayments.com/guides/intelligence/decisions Understand Intelligence decisions, risk levels, and next actions. Anton Intelligence peers return evidence. The orchestrator makes the final decision. ## Decisions | Decision | Meaning | | - | - | | `approve` | No meaningful evidence, or evidence was cleared by contradictions | | `review_auto` | Possible match that needs more data or vault enrichment | | `review_manual` | High-risk or incomplete evidence requires human review | | `decline` | High-confidence prohibited evidence | ## Risk levels `low`, `medium`, `high`, `critical` ## Next actions | Next action | Meaning | | - | - | | `none` | No follow-up required | | `request_more_information` | Ask for missing disambiguators such as date of birth or address | | `manual_review` | Route to compliance review | | `decline` | Do not continue the flow | ## Automated review `review_auto` means the deterministic policy found possible evidence but needs more data before manual review or decline. The response includes `next_action: "request_more_information"` and repeats the missing fields in both `missing_disambiguators` and `summary.missing_fields`. # Evidence Retrieval Source: https://docs.antonpayments.com/guides/intelligence/evidence Retrieve obscured, provider-neutral evidence after an evaluation. `GET /v1/intelligence/evaluations/{id}` returns the concise result. `GET /v1/intelligence/evaluations/{id}/evidence` returns the expanded, PII-free evidence. Evidence is provider-neutral and does not include raw provider payloads, raw request bodies, or raw PII. Viewing evidence writes an audit event. Reads are strictly scoped to the calling surface: with credentials you can only retrieve evaluations created under your own merchant account; anonymous public-test callers can only retrieve public-test evaluations. A foreign evaluation ID returns `404` — indistinguishable from a nonexistent one. ```bash theme={} curl -sS "https://api.antonpayments.dev/v1/intelligence/evaluations/eval_example/evidence" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" | jq ``` # Idempotency and Retries Source: https://docs.antonpayments.com/guides/intelligence/idempotency-retries Safely retry Intelligence create requests. The `Idempotency-Key` header is **required** on authenticated `POST /v1/intelligence/evaluations` calls (omitting it returns `400 missing_idempotency_key`). On the anonymous public test surface it is optional but recommended. ```http theme={} Idempotency-Key: intel-payee-crm-84012-v1 ``` If a network timeout occurs, retry the exact same request with the same key. Anton returns the original evaluation when the operation has already completed — the evaluation is not re-run and no duplicate is persisted. A replay while the first attempt is still processing returns `409 idempotency_in_flight`; wait briefly and retry with the same key. The JSON body also accepts `idempotency_key` for testing, but the header is the enterprise contract. If both are present, the header wins. Standard idempotency semantics apply — 24-hour key retention, `409 idempotency_conflict` on key reuse with a different body, `X-Idempotent-Replayed: true` on replays. See [Idempotency](/api-reference/idempotency). # Instrument Screening Source: https://docs.antonpayments.com/guides/intelligence/instrument-screening Screen bank accounts, crypto wallets, cards, and IBANs through one normalized instrument object. Use `instrument_screening` when a payment instrument is added or evaluated. Required: | Field | Requirement | | - | - | | `use_case` | Must be `instrument_screening` | | `entity.type` | `person` or `business` | | `instrument.type` | `bank_account`, `crypto_wallet`, `card`, or `iban` | | Matching instrument payload or `instrument.vault_token_id` | One is required | The nested payload must match `instrument.type`. For example, `instrument.type: "crypto_wallet"` must use `instrument.crypto_wallet`, not `instrument.bank_account`. ## Crypto wallet ```bash theme={} curl -sS -X POST "https://api.antonpayments.dev/v1/intelligence/evaluations" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: intel-wallet-john-doe-001" \ -d '{ "use_case": "instrument_screening", "entity": { "type": "person", "reference_id": "payee-john-doe", "name": "John Doe", "country": "US" }, "instrument": { "type": "crypto_wallet", "country": "US", "currency": "BTC", "crypto_wallet": { "network": "bitcoin", "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh" } } }' | jq ``` ## Bank account ```bash theme={} curl -sS -X POST "https://api.antonpayments.dev/v1/intelligence/evaluations" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: intel-bank-john-doe-001" \ -d '{ "use_case": "instrument_screening", "entity": { "type": "person", "reference_id": "payee-john-doe", "name": "John Doe", "country": "US" }, "instrument": { "type": "bank_account", "country": "US", "currency": "USD", "bank_account": { "routing_number": "021000021", "account_number": "000123456789", "account_type": "checking" } } }' | jq ``` # Merchant Onboarding Source: https://docs.antonpayments.com/guides/intelligence/merchant-onboarding Screen business onboarding data using the same Intelligence contract. Use `merchant_onboarding` when evaluating a business during onboarding. Required: | Field | Requirement | | - | - | | `use_case` | Must be `merchant_onboarding` | | `entity.type` | Must be `business` | | `entity.name` or `entity.vault_token_id` | One is required | ```bash theme={} curl -sS -X POST "https://api.antonpayments.dev/v1/intelligence/evaluations" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: intel-merchant-example-001" \ -d '{ "use_case": "merchant_onboarding", "client_reference_id": "merchant-example-001", "entity": { "type": "business", "reference_id": "merchant-example", "name": "Example Imports LLC", "country": "US", "document": { "type": "business_registration", "country": "US", "number": "TEST-REG-123" } } }' | jq ``` # Anton Intelligence Source: https://docs.antonpayments.com/guides/intelligence/overview Create normalized risk intelligence evaluations for payees, instruments, payouts, and merchant onboarding. Anton Intelligence turns payment-risk inputs into one concise evaluation result. You send a strict request with a `use_case`, an `entity`, and optional instrument or payout context. Anton normalizes the request internally, calls independent peer systems, applies deterministic policy and a five-dimension scoring model, and returns a final decision. The create endpoint is intentionally strict. Unknown fields are rejected, enum values are fixed, and sensitive values are used only in memory. Anton persists redacted decision evidence, not raw PII. Every response includes `contract_version: "intelligence-public-v1"` so clients can pin and generate SDKs against a stable schema. ## Two surfaces, one contract | Surface | Auth | Persistence | | - | - | - | | **Authenticated** (production contract) | OAuth + DPoP with the `intelligence` scope — see [Authentication](/authentication) | Evaluations persist under **your** merchant account; read them back via the scoped [list](/api-reference/intelligence/list-evaluations), get, and evidence endpoints. `Idempotency-Key` is **required** on create. | | **Anonymous public test** (where enabled) | None | Evaluations run under a shared synthetic test merchant — not tied to your account, and not listable. | The request and response contract is identical on both surfaces. Intelligence is available on **every** account tier — including [AI-compliance-only accounts](/capabilities) that have no payout surface. Start with the [quickstart](/guides/intelligence/quickstart) for the full authenticated walkthrough. ## Use cases | Use case | When to use it | Event type | | - | - | - | | `payee_registration` | Registering or screening a person or business payee | `payee.create` | | `instrument_screening` | Adding or screening a bank account, wallet, card, or IBAN | `instrument.create` | | `payout_screening` | Evaluating payment movement context | `payout.create` | | `merchant_onboarding` | Evaluating business onboarding data | `merchant.onboard` | | `monitoring` | Generic/manual screening | `monitoring.evaluate` | ## Required shape ```json theme={} { "use_case": "payee_registration", "entity": { "type": "person" } } ``` For a meaningful evaluation, include at least one searchable input: `entity.name`, `entity.vault_token_id`, `instrument.vault_token_id`, or the matching instrument fields. ## Validate before creating Use validation to test request shape without creating an evaluation: ```bash theme={} curl -sS -X POST "https://api.antonpayments.dev/v1/intelligence/evaluations/validate" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -d '{ "use_case": "payee_registration", "entity": { "type": "person", "name": "John Doe", "country": "US" } }' | jq ``` ## Field rules | Field class | Rule | | - | - | | Countries | Uppercase ISO 3166 alpha-2, such as `US` or `CA` | | Dates | Real calendar dates in `YYYY-MM-DD` format | | Currencies and assets | Uppercase supported currency or asset codes, such as `USD` or `BTC` | | Instrument payloads | The nested payload must match `instrument.type` | ## Response summary The full response carries the decision, a five-dimension `scoring` block (Transaction Risk, Onboarding Risk, Transaction Monitoring, Anomaly Detection, Graph Intelligence — each 0–1000), peer statuses, policy outcome, and an audit hash — see the [quickstart](/guides/intelligence/quickstart) for a complete example. The normalized `summary` block: ```json theme={} { "contract_version": "intelligence-public-v1", "decision": "review_auto", "next_action": "request_more_information", "summary": { "screened": ["entity", "instrument"], "use_case": "instrument_screening", "instrument_type": "crypto_wallet", "findings_count": 1, "identity_confidence": "possible", "missing_fields": ["address", "birth_date", "identifier"] } } ``` # Payee Registration Source: https://docs.antonpayments.com/guides/intelligence/payee-registration Screen a new person or business payee with direct PII or a vault token. Use `payee_registration` when a payee is created or registered. Required: | Field | Requirement | | - | - | | `use_case` | Must be `payee_registration` | | `entity.type` | `person` or `business` | | `entity.name` or `entity.vault_token_id` | One is required | Optional but recommended: `entity.country`, `entity.birth_date`, `entity.address`, `entity.phone`, `entity.email`, and `entity.document`. ```bash theme={} curl -sS -X POST "https://api.antonpayments.dev/v1/intelligence/evaluations" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: intel-payee-john-doe-001" \ -d '{ "use_case": "payee_registration", "client_reference_id": "payee-john-doe-001", "entity": { "type": "person", "reference_id": "payee-john-doe", "name": "John Doe", "country": "US", "birth_date": "1979-12-30" } }' | jq ``` # Payout Screening Source: https://docs.antonpayments.com/guides/intelligence/payout-screening Evaluate payout amount, corridor, rail, payee, and optional instrument context. Use `payout_screening` when evaluating a payment event before or during payout creation. Required: | Field | Requirement | | - | - | | `use_case` | Must be `payout_screening` | | `entity.type` | `person` or `business` | | `payout.amount.value` and `payout.amount.currency` | Required | | `payout.destination_country` | Required | | Searchable entity or instrument data | Required | ```bash theme={} curl -sS -X POST "https://api.antonpayments.dev/v1/intelligence/evaluations" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: intel-payout-001" \ -d '{ "use_case": "payout_screening", "client_reference_id": "payout-001", "entity": { "type": "person", "reference_id": "payee-john-doe", "name": "John Doe", "country": "US" }, "payout": { "reference_id": "payout-001", "amount": { "value": "250.00", "currency": "USD" }, "source_country": "US", "destination_country": "CA", "rail": "bank" } }' | jq ``` # PII and Vault Tokens Source: https://docs.antonpayments.com/guides/intelligence/pii-and-vault How Anton handles direct PII and vault-token enrichment. Anton Intelligence supports two sensitive-data paths: | Path | Use when | | - | - | | Direct PII | The client sends data over TLS for immediate evaluation | | Vault token | The client sends a token reference and Anton detokenizes in memory | In both paths, raw PII is discarded after evaluation. Anton persists only redacted field presence, confidence, severity, matched or contradicted field names, provider-neutral evidence summaries, and audit hashes. Vault detokenization is audited. On the authenticated surface, vault-token enrichment only accepts tokens owned by the calling merchant — one merchant can never reference another merchant's vault tokens. On the public test endpoint, vault tokens must be scoped to the public test merchant or an explicit non-production allowlist. # Intelligence Quickstart Source: https://docs.antonpayments.com/guides/intelligence/quickstart Evaluate a payee end to end with the authenticated Intelligence API — create an evaluation, read the decision, and retrieve evidence. This walks you from credentials to a completed payee evaluation against the sandbox (`https://api.antonpayments.dev`). It works for every account tier — including [AI-compliance-only accounts](/capabilities), whose credentials carry the `intelligence` scope by default. ## Before you start * **Sandbox OAuth credentials** with the `intelligence` scope (every default credential has it) — see [Authentication](/authentication) for minting a DPoP-bound access token. * The examples show `Authorization: DPoP $ANTON_ACCESS_TOKEN`; the per-request `DPoP: ` header is implied throughout. > [!NOTE] > > All names, dates, and account numbers below are fabricated test data. In sandbox, evaluations run against the same strict contract and scoring pipeline as production. ## Step 1: Validate your request shape (optional) `POST /v1/intelligence/evaluations/validate` checks the strict contract without creating or persisting anything — useful in CI: ```bash theme={} curl -sS -X POST "https://api.antonpayments.dev/v1/intelligence/evaluations/validate" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -d '{ "use_case": "payee_registration", "entity": { "type": "person", "name": "Maria Testperson", "country": "DE", "birth_date": "1988-03-14" } }' ``` ```json theme={} { "valid": true, "contract_version": "intelligence-public-v1", "event_type": "payee.create", "use_case": "payee_registration" } ``` ## Step 2: Create the evaluation The `Idempotency-Key` header is **required** on the authenticated surface — a retry with the same key returns the original result instead of re-running the evaluation. ```bash theme={} curl -sS -X POST "https://api.antonpayments.dev/v1/intelligence/evaluations" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: intel-payee-crm-84012-v1" \ -d '{ "use_case": "payee_registration", "client_reference_id": "crm-payee-84012", "entity": { "type": "person", "reference_id": "crm-payee-84012", "name": "Maria Testperson", "country": "DE", "birth_date": "1988-03-14" } }' ``` The response is the full evaluation, persisted under **your** merchant account: ```json theme={} { "data": { "contract_version": "intelligence-public-v1", "evaluation_id": "ieval_9f2c1a7e0b8d4e21", "event_id": "ievt_5d11c0aa94f74c02", "event_type": "payee.create", "status": "complete", "decision": "approve", "risk_level": "low", "rationale": "no meaningful adverse evidence across configured peers", "next_action": "none", "summary": { "screened": ["entity"], "use_case": "payee_registration", "findings_count": 0, "identity_confidence": "none", "missing_fields": [] }, "scoring": { "model": "anton-scoring-v1", "scale": { "min": 0, "max": 1000 }, "overall_score": 112, "risk_level": "low", "dimensions": [ { "code": "TRS", "name": "Transaction Risk", "score": 90, "risk_level": "low", "status": "complete" }, { "code": "ORS", "name": "Onboarding Risk", "score": 140, "risk_level": "low", "status": "complete" }, { "code": "TM", "name": "Transaction Monitoring", "score": 0, "risk_level": "low", "status": "not_applicable" }, { "code": "AD", "name": "Anomaly Detection", "score": 105, "risk_level": "low", "status": "complete" }, { "code": "GI", "name": "Graph Intelligence", "score": 120, "risk_level": "low", "status": "complete" } ] }, "peer_statuses": [ { "peer": "sentinel", "status": "complete", "found": false }, { "peer": "engine", "status": "complete", "found": false }, { "peer": "brain", "status": "skipped", "found": false } ], "policy": { "version": "triad-policy-v2", "rule_fired": "no_peer_findings", "reasons": [] }, "audit": { "hash": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae", "persisted": true }, "evaluated_at": "2026-06-10T14:30:02Z", "latency_ms": 412 } } ``` Branch on `decision` (`approve`, `review_auto`, `review_manual`, `decline`) and `next_action` — see [Decisions and Next Actions](/guides/intelligence/decisions). The exact scores, peers, and identifiers you receive will differ; treat IDs as opaque. ## Step 3: Read it back Evaluations are strictly scoped to your merchant account. A foreign or unknown `evaluation_id` returns `404` — indistinguishable from a nonexistent one. ```bash theme={} # One evaluation curl -sS "https://api.antonpayments.dev/v1/intelligence/evaluations/ieval_9f2c1a7e0b8d4e21" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" # Newest-first, cursor-paginated list of your evaluations curl -sS "https://api.antonpayments.dev/v1/intelligence/evaluations?limit=25" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" ``` The list endpoint returns the standard `{ data, has_more, next_cursor }` page shape — see [Pagination](/api-reference/pagination). ## Step 4: Retrieve evidence For decisions you need to justify — to a reviewer, an auditor, or your own case management — fetch the expanded, PII-free evidence. Each evidence view is recorded as an audit event. ```bash theme={} curl -sS "https://api.antonpayments.dev/v1/intelligence/evaluations/ieval_9f2c1a7e0b8d4e21/evidence" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" ``` Evidence is provider-neutral and redacted — no raw provider payloads, no raw request bodies, no raw PII. See [Evidence Retrieval](/guides/intelligence/evidence). ## Errors you may hit | HTTP | Code | Meaning | | - | - | - | | `400` | `unknown_field` / `type_mismatch` | Request violates the strict contract. Fix the body — see [Rate Limits and Errors](/guides/intelligence/rate-limits-errors). | | `400` | `missing_idempotency_key` | Authenticated creates require the `Idempotency-Key` header. | | `403` | `capability_required` / `insufficient_scope` | Your account or credential lacks `intelligence`. See [Capabilities & Scopes](/capabilities). | | `422` | `validation_error` | Field-level failures listed in `error.details[]`. | | `429` | `rate_limit_exceeded` | Dedicated per-merchant Intelligence limit. Honor `Retry-After`. | ## Going further > [card] [Payee registration](/guides/intelligence/payee-registration) > > Field rules for person and business payees. > [card] [Instrument screening](/guides/intelligence/instrument-screening) > > Bank accounts, IBANs, cards, and crypto wallets. > [card] [PII and vault tokens](/guides/intelligence/pii-and-vault) > > Send direct PII or enrich from your vault tokens. > [card] [Idempotency and retries](/guides/intelligence/idempotency-retries) > > Retry semantics on the create endpoint. # Rate Limits and Errors Source: https://docs.antonpayments.com/guides/intelligence/rate-limits-errors Intelligence rate limits, capability and scope gates, and strict request errors. ## Rate limits | Surface | Limit | | - | - | | Authenticated (`/v1/intelligence/*` with credentials) | **120 requests / minute per merchant** by default, on top of the global per-merchant quota. | | Anonymous public test surface (where enabled) | 120 requests / minute per IP. | When a request is limited, Anton returns `429 Too Many Requests`, a `Retry-After` header, and the standard JSON error envelope: ```json theme={} { "error": { "message": "rate limit exceeded, retry after 60 seconds", "code": "rate_limit_exceeded" } } ``` Honor `Retry-After` and use jittered backoff — see [Rate Limits](/api-reference/rate-limits) for handling patterns and the `X-RateLimit-*` headers present on every response. Sustained-volume screening integrations can request a higher ceiling via [help.antonpayments.com](https://help.antonpayments.com). ## Common errors | Code | HTTP | Meaning | | - | - | - | | `unknown_field` | 400 | Request contains a field outside the strict contract | | `type_mismatch` | 400 | Field has the wrong JSON type | | `missing_idempotency_key` | 400 | Authenticated creates require the `Idempotency-Key` header | | `validation_error` | 422 | Required field missing, enum value invalid, country/date/currency invalid, or instrument payload mismatched | | `capability_required` | 403 | Your account does not hold the `intelligence` capability — see [Capabilities & Scopes](/capabilities) | | `insufficient_scope` | 403 | The calling credential was created without the `intelligence` scope | | `rate_limit_exceeded` | 429 | Too many requests; retry after `Retry-After` | ## Examples Missing `use_case`: ```json theme={} { "error": { "message": "use_case must be one of payee_registration, instrument_screening, payout_screening, merchant_onboarding, monitoring", "code": "validation_error" } } ``` Old raw `subject` shape: ```json theme={} { "error": { "message": "unknown field \"subject\"", "code": "unknown_field" } } ``` Wrong instrument nesting: ```json theme={} { "error": { "message": "instrument.bank_account cannot be supplied when instrument.type is crypto_wallet", "code": "validation_error" } } ``` Credential without the `intelligence` scope: ```json theme={} { "error": { "message": "this endpoint requires a credential with the \"intelligence\" scope", "code": "insufficient_scope" } } ``` # Reviews API Source: https://docs.antonpayments.com/guides/intelligence/reviews Work your team's compliance reviews from your own case system: read reviews, record decisions and notes, get events, and export records for your auditors. Reviews are your team's own compliance reviews: the screenings of yours that need a person (a possible sanctions or PEP match, a result flagged for review), the ones your ongoing monitoring or list screening opens, and the ones your team opens by hand. The portal is where your team works them. The Reviews API lets your own case system do the same, and keeps it in step through webhooks. > [!NOTE] > > The Reviews API and its webhooks need the **Reviews API and Webhooks** add-on. Exports need the **Audit Pack**. Without the add-on an endpoint answers `403 module_not_enabled`. Every endpoint also needs a credential with the `intelligence` scope. These are your records, held for you. Reviews only ever contain your own screenings and your own team's work. Anton's own screening of payouts is separate and never appears in a review, a count or an event. ## What the API returns A review carries ids, codes, the **masked** subject (`V*** S***`) and your own reference for it (`cust_7731`). It never returns a name, a date of birth, contact details or the text of a note. Notes are stored in a vault, separately for your account. The API can add them but never reads them back. Your team reads them in the portal, and they appear in the case files your people export. ```bash theme={} curl "https://api.antonpayments.dev/v1/intelligence/reviews?status=open&limit=25" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" ``` ```json theme={} { "data": [ { "id": "irv_01JB8QK2EXAMPLE", "number": "RV-0142", "kind": "possible_sanctions_match", "priority": "high", "status": "open", "source": "evaluation", "evaluation_id": "eval_01JB7ZEXAMPLE", "subject": { "type": "person", "display": "V*** S***", "reference": "cust_7731" }, "opened_by": { "type": "system" }, "due_at": "2026-09-25T21:05:00Z", "overdue": false, "created_at": "2026-09-25T13:14:00Z", "updated_at": "2026-09-25T13:14:00Z" } ], "has_more": false, "next_cursor": "" } ``` ## Recording decisions Record a decision with a reason code. Send an `Idempotency-Key` with every change. ```bash theme={} curl https://api.antonpayments.dev/v1/intelligence/reviews/irv_01JB8QK2EXAMPLE/decisions \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: rv-0142-decision-1" \ -d '{ "decision": "not_a_match", "reason_code": "dob_differs", "note": "Passport date of birth differs from the list entry." }' ``` | Review kind | Decisions | | - | - | | `possible_sanctions_match`, `possible_pep_match`, `screening_review` | `waiting_on_customer`, `not_a_match`, `confirmed_match` | | `manual` | `waiting_on_customer`, `no_concern`, `concern_confirmed` | * `waiting_on_customer` pauses the review's due time while you ask your customer for something. Call [resume](/api-reference/reviews/resume-review) when they answer. * A decision covered by your second-approver setting waits for someone on your team to approve it in the portal. * **A decision your API credential makes that clears the subject (`not_a_match`, `no_concern`) always waits for a person**, whatever your setting (`approval_rule: api_clearance`). That person must be independent of your API credentials. They cannot be the one who created the credential, or have a role that can create, rotate or revoke credentials (Admin, Technical). In practice that is your Compliance role. If nobody on your team qualifies, the decision is refused with `409 second_approver_unavailable`. * Approving, sending a decision back and withdrawing one are done by people, in the portal. The API has no endpoints for them. * Reviews opened by your own payout rules (`payout_held_by_rule`, `payee_risk_by_rule`) are decided on their approval in the portal. ## Events Subscribe to `intelligence.review.*` with [`POST /v1/webhooks`](/api-reference/webhooks/create-webhook-subscription) to keep your case system in step. See [Webhook Events](/api-reference/webhook-events#intelligence-review-events) for the payloads. Events carry ids, codes and your own reference only. ## Exports for your auditors With the Audit Pack you can export your records at any time, for any review your account holds, whatever its status: * [CSV](/api-reference/reviews/export-reviews-csv): reviews opened in a date range (up to 366 days and 10,000 reviews per export). * [Case file](/api-reference/reviews/export-case-file): one review's formal record as a PDF, with the summary, decisions and approvals, the screening evidence and the audit trail. Each export is recorded in your audit log: who exported what, when, and a SHA-256 digest of the file. Exports don't take an `Idempotency-Key`, because each call is a separate audited export. A case file exported with an API credential leaves out note text and your team members' names. Your people get notes in the case files they export. ## Retention Review records are kept for **7 years** by default. An Admin can extend the period in the portal (beyond 7 years with the Audit Pack). It can never be shortened, and nothing is deleted early while your account is active. [Get review settings](/api-reference/reviews/get-review-settings) shows the current period. # Manage Beneficiaries Source: https://docs.antonpayments.com/guides/manage-beneficiaries Create, update, search, archive, and delete the people and businesses you pay. A beneficiary is the identity of a payout recipient. Every beneficiary belongs to exactly one merchant — two merchants paying the same real person each create their own beneficiary record. PII submitted at creation is tokenized in a secure vault; Anton's core database stores only a display name and country plus an opaque token reference. This guide covers the full lifecycle — create, update, search, archive, restore, delete — plus the deduplication, PII rotation, and cross-merchant trust considerations you need for production. ## Individuals vs businesses `type` on create determines which detail block you provide: * `individual` — requires `individual.*` fields: first/last name, email, phone, DOB (YYYY-MM-DD), nationality (ISO-2), and structured address. * `business` — requires `business.*` fields: legal name, registration number, email, phone, and address. Optional: trading name, tax ID, entity type, incorporation country/date, website. The API validates shape at creation; rail-specific validation (some rails require certain fields) surfaces later when a payout is submitted. ## Creating a beneficiary ```bash theme={} curl https://api.antonpayments.dev/v1/beneficiaries \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: ben-$INVOICE_ID" \ -d @beneficiary.json ``` The `Idempotency-Key` header is required. Use a value derived from your own business data so a network failure doesn't cause a duplicate record. See [Idempotency](/api-reference/idempotency). `external_ref` is your own reference — stored as-is, indexed for search. Use your HRIS ID, contractor ID, or vendor number. `metadata` is an arbitrary string-to-string map also stored as-is. Use it for tags like `department: engineering` or `cost_center: 4421`. ## Deduplication across merchants Anton computes a content fingerprint from beneficiary PII and uses it internally to link the same real person across merchants for engine-level risk signals. You never see the fingerprint, but its existence means: * Within your own merchant: attempting to create a beneficiary with identical PII returns `422 duplicate_beneficiary`. Handle it by searching for an existing record with matching `external_ref` or PII and reusing that ID. * Across merchants: cross-merchant trust signals feed the Anton Engine's risk scoring on future payouts. You do not see this directly; it's a platform feature. ## Updating non-PII fields `PUT /v1/beneficiaries/{id}` updates the mutable fields on a beneficiary: `display_name`, `country`, `external_ref`, and `metadata`. Fields omitted from the request body are left unchanged. Set `external_ref` to `null` to clear it. ```bash theme={} curl https://api.antonpayments.dev/v1/beneficiaries/$BEN_ID \ -X PUT \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "metadata": { "department": "engineering", "cost_center": "4421", "tier": "premium" } }' ``` **PII cannot be updated via this endpoint** — use the PII-specific endpoint below. ## Updating PII Vault tokens are immutable. Updating PII replaces the entire token — you send the full detail block, Anton re-tokenizes, and the old token is dropped: ```bash theme={} curl https://api.antonpayments.dev/v1/beneficiaries/$BEN_ID/pii \ -X PUT \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d @updated-pii.json ``` Supply the detail block matching the beneficiary's `type` (`individual` or `business`). The `display_name` on the beneficiary record is re-derived from the new PII. The change is audit-logged (SOC 2 CC8.1). Common reasons to update PII: * Contractor legal name change * Business changes registered address * Beneficiary provides a corrected DOB or ID number ## Reading PII back **PII is write-only on this surface.** Your system is the source of beneficiary PII, so you can deposit and replace it — but detokenized readback is not available to API credentials. Retrieving a beneficiary's stored PII happens only in the merchant dashboard, restricted to admin users, with every access recorded in the audit log (PCI DSS 10.2.1). This is deliberate: a leaked API credential can be revoked and its payouts cancelled, but harvested identities cannot be un-leaked. Keep your own copy of what you submit; `GET /v1/beneficiaries/{id}` returns the masked record (display name, country, status, token reference) for reconciliation. ## Archive vs delete Two different disables: * **Archive** (`POST /v1/beneficiaries/{id}/archive`) — soft-disables the beneficiary. PII is preserved. The record is hidden from active listings and cannot be used on new payouts, but can be restored later. Historical payouts referencing the beneficiary remain unchanged. Requires `Idempotency-Key`. * **Delete** (`DELETE /v1/beneficiaries/{id}`) — soft-deletes the beneficiary. Permanent. Historical payouts still reference the ID for audit purposes. Prefer archive unless you know you will never need this beneficiary again. Restoring an archived beneficiary brings them back to `active`: ```bash theme={} curl https://api.antonpayments.dev/v1/beneficiaries/$BEN_ID/restore \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Idempotency-Key: restore-$BEN_ID" ``` > [!WARNING] > > Beneficiaries that cannot be used for payouts (status: `blocked`) cannot be > restored via the API. Contact support if you believe this is in error. ## Searching and filtering `GET /v1/beneficiaries` supports: * `status` — `active` / `archived` / `blocked` * `type` — `individual` / `business` * `country` — ISO-2 code * Cursor pagination: `limit` (max 100) and `cursor` For search-by-attribute, filter on `external_ref` (you store this) or fetch and filter client-side. Anton does not expose full-text search on PII. ## Instruments — beneficiaries without instruments can't be paid A beneficiary alone can't receive money; they need an instrument. See [Send a Payout — Step 3](/guides/send-a-payout) for attaching one. Call `GET /v1/beneficiaries/{id}/instruments` to list the instruments attached to a given beneficiary. ## Webhooks Subscribe to the `beneficiary.*` events to react to lifecycle changes out-of-band: * `beneficiary.created` * `beneficiary.updated` (fires on edit, archive, restore, AND PII update) * `beneficiary.deleted` (payload is just the id) * `beneficiary.blocked` (the beneficiary can no longer be used for payouts) See [Webhook Events](/api-reference/webhook-events) for payload schemas. ## Common errors | Code | HTTP | Meaning | Action | | - | - | - | - | | `duplicate_beneficiary` | 422 | Exact PII match already exists under your merchant. | Search by `external_ref` or PII; reuse the existing ID. | | `missing_beneficiary_details` | 400 | `individual` / `business` block missing or mismatched with `type`. | Include the block that matches `type`. | | `invalid_display_name` | 422 | Name fields empty or invalid characters. | Fix name; a minimum of first + last is required for individuals. | | `beneficiary_not_found` | 404 | ID doesn't exist or belongs to a different merchant. | Check the ID and prefix. | | `beneficiary_pii_update_failed` | 422 | PII update hit a validation or tokenization error. | Fix fields; check date format (YYYY-MM-DD) and ISO-2 country codes. | ## Next steps > [card] [Send a payout](/guides/send-a-payout) > > Once you have beneficiaries and instruments, fire your first payout. > [card] [Handle webhooks](/guides/handle-webhooks) > > React to `beneficiary.*` and `payout.*` events in real time. # Send a Payout Source: https://docs.antonpayments.com/guides/send-a-payout The full payout flow — beneficiary, instrument, economics, corridors, and the state machine your integration should respond to. > [!NOTE] > > **Editability note:** this guide was drafted against the OpenAPI spec. If the product/engineering team hasn't validated it against a recent end-to-end trace, flag anything that reads off and edit the relevant section — each H2 below is self-contained. A payout is a single payment from your merchant balance to a beneficiary's payment instrument. This guide walks through everything you need to know to send one in production: the data model, the fields that matter, the state machine, and how your integration should respond to each state. For a 5-minute sandbox walkthrough, start with the [Quickstart](/quickstart). This guide assumes you've already done that and need to build the real thing. ## The data model Three entities come together on every payout: * **[Beneficiary](/api-reference/beneficiaries/get-beneficiary)** — who you're paying. Identity only; PII is tokenized on creation. * **[Instrument](/api-reference/instruments/get-instrument)** — where the money goes. Bank account, wallet, or card, attached to a beneficiary. Credentials are tokenized. * **[Payout](/api-reference/payouts/get-payout)** — the single payment. Links a beneficiary and one of their instruments to an amount, currency, and rail. Create them in that order. Beneficiaries can have many instruments; one payout uses exactly one instrument. ## Economics: source vs dest amounts Every payout has two amounts: * `source_amount` — what's debited from your merchant balance in your source currency. * `dest_amount` — what the beneficiary receives in their destination currency. For same-currency payouts these are equal. For cross-currency payouts, Anton computes the other side using the current corridor pricing. The `fixed_side` field tells Anton which amount is authoritative: * `fixed_dest` (default) — beneficiary receives exactly `dest_amount`; Anton computes `source_amount` including FX and fees. * `fixed_source` — merchant pays exactly `source_amount`; Anton computes how much the beneficiary receives after FX and fees. `fee_bearer` controls who absorbs the fee: * `merchant` (default) — fee is added on top of `source_amount`. * `beneficiary` — fee is deducted from `dest_amount`, so the beneficiary receives less than the stated amount. ## Corridors, methods, and rails A **corridor** is a `(currency, country, method, network)` combination Anton can deliver through. Before attempting a payout, verify the corridor is enabled on your account: ```bash theme={} curl "https://api.antonpayments.dev/v1/corridors?currency=EUR&country=DE" \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` The `method` field on `POST /v1/payouts` selects the delivery method. For fiat: * `faster_payment` — UK Faster Payments * `sepa` — SEPA Credit Transfer (EUR) * `ach` — US ACH * `swift` — SWIFT international wire * `wire` — generic domestic wire * `bank_transfer` — generic bank transfer (rail picks based on corridor) * `mobile_money` — M-Pesa, MTN, etc. For crypto/stablecoin, see [Crypto & Stablecoin Payouts](/guides/crypto-payouts). `rail_type` (`fiat`, `crypto`, or `stablecoin`) is a hint Anton may override based on corridor availability. ## Purpose and reference Two required fields that serve different audiences: * `purpose` — a compliance-facing payment-purpose code. Examples: `contractor_payment`, `supplier_payment`, `salary`, `refund`, `services`, `goods`. Used for reporting and some rails require it. * `reference` — your own free-form string, up to 100 chars. Appears on the beneficiary's statement where the rail supports it. Use your invoice or order number so both sides can reconcile. ## Send end-user session context If a *person* triggered this payout in your product — a customer hitting "pay", an operator releasing an invoice — send the `session` object. Every field is optional and none of them can fail your payout, but they are the difference between Anton scoring a payout it can see and one it is guessing at. ```json theme={} { "beneficiary_id": "ben_...", "source_amount": "250.00", "session": { "ip": "203.0.113.7", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ...", "accept_language": "en-CA", "timezone": "America/Toronto", "device_hash": "b41c9f...", "started_at": "2026-07-25T14:02:11Z" } } ``` ### Why it materially improves the risk assessment Without session context, the only address Anton sees is **your server's** — which tells it where your infrastructure runs, not where your user is. That is the single biggest blind spot in scoring a payout. With it, Anton can reason about: * **Where the payer actually is** — country and network of `ip`, checked against the payout's destination corridor. * **Whether the story is consistent** — `timezone` against the country the IP resolves to. A Toronto browser paying from a Singapore address is worth a second look; the same browser from a Toronto address is not. * **What kind of network it is** — residential broadband, a datacenter, a Tor exit, an iCloud Private Relay egress. These carry very different weight, and Anton treats legitimate consumer privacy tooling differently from anonymity infrastructure. * **Whether it fits your own pattern** — once you send session data consistently, a payout that arrives *without* it stands out against your own baseline, which is a useful signal in its own right. The practical effect is fewer false positives on your legitimate traffic. A payout Anton can place in a coherent, ordinary-looking session is one it does not need to hold for review on thinner evidence. > [!NOTE] > > Send the IP **your edge observed for the end user** — not your server's address and not > a value the browser supplied. If you sit behind a load balancer or CDN, take the client > entry from `X-Forwarded-For` counting from the right, at the hop your own infrastructure > appends. A caller-supplied leftmost entry is attacker-controlled. ### Data-quality feedback, never rejection Only a syntactically invalid `ip` is an error (`422`). Everything else is accepted and reported back on the payout as `session_quality`, so you can fix your integration without anything failing in production: ```json theme={} { "data": { "id": "pay_...", "session_quality": ["non_public_ip"] } } ``` `non_public_ip` almost always means a misconfigured proxy handed us your own load balancer's private address instead of the user's. ### `session.ip` supersedes `end_user_ip` The older top-level `end_user_ip` field still works. When both are present, `session.ip` wins, unconditionally. New integrations should send `session` and leave `end_user_ip` alone. ### What you are confirming by sending it By sending session data you confirm you collected it lawfully from your end user under your own privacy notice, and that you are authorized to share it with Anton for fraud prevention and AML transaction monitoring. Anton keeps it as transaction evidence on a 7-year horizon aligned to the payout record, and never uses it to build a profile of your users outside that purpose. ## Idempotency `POST /v1/payouts` requires an `Idempotency-Key` header. Derive it from your own business data so retries after a network failure converge on the same payout: ``` Idempotency-Key: payout-{invoice_id}-{beneficiary_id} ``` If you retry with the same key, Anton returns the original response and sets `X-Idempotent-Replayed: true`. Different bodies with the same key return `409 idempotency_conflict`. See [Idempotency](/api-reference/idempotency) for details. ## The state machine Payouts move through a 15-state machine. The full detail is in [How Anton Evaluates Payouts](/how-anton-evaluates-payouts); the short version: | State | Meaning | What to do | | - | - | - | | `created` | Payout record exists. Next: screening. | No action. | | `pending_screening` | The payout is completing required checks before it can be sent. A payout can return to this status after approval or review. | No action is needed. | | `pending_approval` | Clear to submit; waiting for maker-checker if configured. | No action. | | `approved` | Ready for the rail. | No action. | | `processing` | Submitted to the rail. | Surface "in flight" in your UI. | | `sent` | Rail confirmed dispatch. | Surface "sent" in your UI. | | `completed` | Funds delivered and settled. | Mark the payout done in your system. | | `failed` | Rail returned a hard failure. | Review failure reason; may retry with a different instrument. | | `returned` | Funds were returned after send. The source amount is credited back to your balance in the source currency and any unused FX buffer is released; the fee is retained, because the payout was attempted. | Handle the return in your accounting, including the retained fee. | | `screening_failed` | Under review (`on_hold: true`). | Treat as a normal "pending" state. | | `velocity_blocked` | Merchant velocity rule rejected. | Wait for velocity window to reset, or request a higher threshold. | | `manual_review` | Under review (`on_hold: true`). | Treat as a normal "pending" state; can take minutes to hours. | | `pending_engine_review` | Under review (`on_hold: true`). | Treat as a normal "pending" state. | | `cannot_be_processed` | The payout cannot be processed. Anton is unable to provide further detail. | Final. Cannot be cancelled via the API; contact support. | | `cancelled` | Cancelled before rail submission. | Final. | The `on_hold` field on the payout is `true` while the payout waits on a review, in any status before `processing`. It carries no reason. ## Subscribe to webhooks — don't poll Every state transition fires a `payout.*` event. Subscribe once via `POST /v1/webhooks` and handle the events you care about: * `payout.completed` — funds delivered * `payout.failed`, `payout.returned` — terminal failure paths * `payout.velocity_blocked`, `payout.engine_blocked` — risk blocks (`payout.engine_blocked` fires alongside `payout.velocity_blocked` when the Anton engine drove the block) * `payout.on_hold` — a payout is on hold * `payout.cannot_be_processed` — the payout cannot be processed * `payout.cancelled` — operator or API cancellation Polling `GET /v1/payouts/{id}` works in development but wastes rate-limit budget at scale and misses transitions. ## Cancelling a payout You can cancel a payout that has not yet been submitted to a rail — from `created`, `pending_screening`, `pending_approval`, or `approved`: ```bash theme={} curl https://api.antonpayments.dev/v1/payouts/$PAYOUT_ID/cancel \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "Idempotency-Key: cancel-$PAYOUT_ID" \ -H "Content-Type: application/json" \ -d '{"reason": "beneficiary requested change of account"}' ``` Once a payout reaches `processing`, the rail has it — cancellation is no longer possible via the API. Contact support if you need to halt an in-flight payout. A payout on hold (`on_hold: true`) cannot be cancelled until the review concludes: the request returns `409` with code `payout_on_hold`. A payout in `cannot_be_processed` cannot be cancelled via the API (`422 payout_not_cancellable`). On successful cancellation, the debited funds (source amount, fee, and any FX buffer) are released back to your balance. ## What can go wrong > [accordion] 422 insufficient\_balance > > Your merchant balance in the source currency can't cover `source_amount + fee + buffer`. Top up the balance or reduce the payout. > [accordion] 403 corridor\_not\_enabled > > The requested `(source_currency, dest_currency, country, method)` isn't active on your account. Call `GET /v1/corridors` to see active ones, or contact support to enable a new corridor. > [accordion] 404 beneficiary\_not\_found / instrument\_not\_found > > The ID doesn't exist or belongs to a different merchant. Double-check the ID, including prefix (`ben_...`, `ins_...`). > [accordion] 422 invalid\_instrument > > The instrument is archived, disabled, or its method/currency doesn't match the payout. Instruments are scoped to a single country + method at creation. > [accordion] 429 rate\_limit\_exceeded > > Honor `Retry-After` and back off. See [Rate Limits](/api-reference/rate-limits). ## Next steps > [card] [Manage beneficiaries](/guides/manage-beneficiaries) > > Dedup, update PII, archive, restore. > [card] [Handle webhooks](/guides/handle-webhooks) > > Subscription, signing, delivery semantics. > [card] [Crypto & stablecoin](/guides/crypto-payouts) > > Network selection, finality, memo/tag fields. > [card] [FX & exchange](/guides/fx-exchange) > > Lockable quotes and cross-currency payouts. # Verifications Source: https://docs.antonpayments.com/guides/verifications KYC/KYB-as-a-service — verify people and businesses through Anton-hosted flows, with sanctions screening built in. Verifications let you run identity verification on **your** customers — the people and businesses in your ecosystem — without building a KYC stack. You create a verification subject, Anton mints a **hosted verification link**, your customer completes the flow (government ID + selfie for a person; business details plus an owner cascade for a business), and Anton screens the verified identity against sanctions and PEP lists before returning a decision. Identity documents and legal names never touch your systems. Anton stores names only as vault token references and streams captured documents from the identity provider on demand — nothing is persisted outside the vault path. Every read you make returns a **masked** display name (`A•• L••••••••`). > [!NOTE] > > Verifications require the `intelligence` account capability and a credential > carrying the `intelligence` scope. Every Anton account has the capability — > including AI-compliance-only accounts — but check your credential's scopes if > you get `403 insufficient_scope`. ## Verify a person Create a subject with `type: "person"`. With `delivery: "email"`, Anton emails the hosted link to the subject, attributed to your business name: ```bash theme={} curl https://api.antonpayments.dev/v1/verification-subjects \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: verify-customer-8841" \ -d '{ "type": "person", "display_name": "Ada Lovelace", "email": "ada@example.com", "external_ref": "customer_8841", "country": "CA", "delivery": "email", "message": "Hi Ada — please verify your identity so we can activate your account.", "link_expires_in_days": 7 }' ``` The response carries the new subject and its first verification attempt: ```json theme={} { "data": { "subject": { "id": "vsub_01HX8Z9K0M2N3P4Q5R6S7T8UG3", "type": "person", "display_name": "A•• L••••••••", "email": "ada@example.com", "external_ref": "customer_8841", "country": "CA", "created_at": "2026-07-16T14:30:00Z", "attempts": [{ "...": "the attempt below" }] }, "verification": { "id": "vrf_01HX8Z9K0M2N3P4Q5R6S7T8UG2", "status": "sent", "reason": "initial", "created_at": "2026-07-16T14:30:00Z", "link_expires_at": "2026-07-23T14:30:00Z", "checks": [], "hosted_link": "https://verify.example.com/inquiry?..." } } } ``` Three things to internalize from this response: * **`hosted_link` is secret-once.** It appears here (and on resend / regenerate / re-verify responses) and is never readable again. It opens a flow that collects your customer's identity documents — treat it like a credential. * **`status` tells you whether the email actually went out.** `sent` means Anton delivered it. `created` means it didn't (you chose `delivery: "manual"`, or the environment has no email path) — deliver the link through your own channel and never tell your customer "check your inbox" on a `created` response. * **`display_name` comes back masked, immediately.** The true name went into the vault; it does not exist in Anton's core database and is not retrievable on this surface. `message` is shown in the delivery email, quoted and attributed to your business. It is used for that one send and **never persisted** — it may carry incidental PII, so it cannot be read back later. ## Verify a business `type: "business"` runs a KYB flow: business details first, then a cascade to each **controlling owner** (25%+), who each complete an individual KYC flow at their own hosted link. The business attempt sits in `awaiting_owners` until every controlling owner is approved. The attempt's `ubos` array tracks each owner's status. To re-deliver one owner's link: ```bash theme={} curl https://api.antonpayments.dev/v1/verifications/$VRF_ID/owners/$VUBO_ID/resend \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" \ -H "Idempotency-Key: resend-owner-$VUBO_ID-1" ``` ## Lifecycle ``` created → sent → in_progress → processing → approved | declined | review ↘ awaiting_owners (business) any non-terminal → expired | revoked ``` | Status | Meaning | | - | - | | `created` | Attempt exists, link minted, nothing delivered by Anton. | | `sent` | Link delivered to the subject by email. | | `in_progress` | The subject opened the flow. | | `processing` | Submitted; provider checks running. | | `awaiting_owners` | Business only: business case done, owner flows outstanding. | | `review` | Flagged for manual review — by the provider or by sanctions screening. | | `approved` | Verified. Terminal. | | `declined` | Failed verification. Terminal. | | `expired` | Link or inquiry lapsed unused. Terminal. | | `revoked` | You cancelled it. Terminal. | Track transitions by subscribing to the [`verification.*` webhook events](/api-reference/webhook-events#verification-events) — `link_sent`, `started`, `approved`, `declined`, `review`, `expired` — or by polling `GET /v1/verification-subjects/{id}`. ## Sanctions screening Every completed verification is screened against sanctions, PEP, and watchlists (OFAC SDN, UN Consolidated, EU Consolidated, UK HMT, PEP) through Anton Intelligence. The attempt's `screening` block carries the outcome: ```json theme={} { "status": "clear", "lists_checked": [ "OFAC SDN", "UN Consolidated", "EU Consolidated", "UK HMT", "PEP" ], "evaluation_id": "eval_01HX8Z9K0M2N3P4Q5R6S7T8UH1", "detail": "No matches across 5 lists." } ``` `evaluation_id` resolves at [`GET /v1/intelligence/evaluations/{id}`](/api-reference/intelligence/get-evaluation) for the full decision evidence. A screening `hit` moves the attempt to `review` — it does not auto-decline. ## Managing links Three operations cover every link situation; pick by what happened: * **[Resend](/api-reference/verifications/resend-verification-link)** — the link expired unused or never arrived. Mints a fresh one-time link for the *same attempt* and re-delivers it. Fails with `422` on terminal attempts. * **[Regenerate](/api-reference/verifications/regenerate-verification)** — the link may have been forwarded or exposed. **Kills the old link and inquiry immediately** and opens a fresh attempt (`reason: "regenerated"`). * **[Revoke](/api-reference/verifications/revoke-verification)** — you no longer want this verification to happen. Terminally cancels the attempt and expires its link. To verify someone **again** — periodic KYC refresh, or their details materially changed — use [re-verify](/api-reference/verifications/reverify-subject), which opens a new attempt on the same subject and preserves the full history. ## What this API will never return The machine surface is deliberately PII-free: * `display_name` is masked on every read, for subjects and owners alike. * The audited **reveal** flow (true legal names) and **captured-document viewing** exist only in the merchant dashboard, restricted to admin users, with every access written to the audit trail. * Webhook payloads carry IDs and statuses — never names, links, or document content. You supplied the subject's name at creation, so your systems already hold what you need; the masking means an exfiltrated API credential cannot harvest verified identities. > [!NOTE] > > All mutating verification endpoints require an `Idempotency-Key` header — see > [Idempotency](/api-reference/idempotency). Reads are cursor-paginated — see > [Pagination](/api-reference/pagination). ## Monitoring `GET /v1/verification-stats` returns your funnel at a glance — totals by outcome, pass rate, median completion minutes, and weekly volume — the same aggregates that power the dashboard overview. See the [API reference](/api-reference/verifications/get-verification-stats). # How Anton Evaluates Payouts Source: https://docs.antonpayments.com/how-anton-evaluates-payouts Every payout moves through screening, velocity control, and AI risk scoring before a single dollar leaves your balance. Here's what happens — and how your integration should respond. A payout created via `POST /v1/payouts` is not submitted to a rail immediately. Anton evaluates it first. The evaluation outcome is reflected in the payout's state — your application reads that state (and the webhook events that announce transitions) to decide what to do next. ## What runs on every payout **1. Screening** The beneficiary and, where applicable, the sending counterparty are screened before any funds move. **2. Velocity evaluation** Anton applies merchant-scoped velocity rules: daily and monthly caps, geographic limits, instrument-level thresholds. Exceeding a rule moves the payout to `velocity_blocked`. **3. Risk scoring** The Anton Engine evaluates the payout against cross-merchant trust signals, beneficiary history, counterparty reputation, and real-time anomaly detection. **4. Rail submission** A payout that clears every check moves to `approved` and is queued for the rail. From here, `processing → sent → completed` are rail-driven and reflect settlement reality. A payout that needs a closer look is placed **under review** instead of moving on. While it is under review the payout carries `on_hold: true`, and Anton does not say why. A review ends with the payout continuing, being cancelled, or moving to `cannot_be_processed`. ## The payout state machine ``` created ├─ pending_screening │ ├─ approved ─ processing ─ sent │ │ ├─ completed │ │ ├─ failed │ │ └─ returned │ ├─ pending_approval ─ approved │ ├─ manual_review (under review) │ └─ screening_failed (under review) ├─ pending_engine_review (under review) ├─ velocity_blocked └─ cancelled Any status before processing can also move to: cannot_be_processed ``` `pending_screening`: the payout is completing required checks before it can be sent. A payout can return to this status after approval or review. No action is needed. A payout under review (`manual_review`, `screening_failed`, `pending_engine_review`) returns to the flow, is cancelled, or moves to `cannot_be_processed` when the review concludes. A payout can also be placed on hold in another pre-rail status; `on_hold` tells you, whatever the status. Every transition emits a `payout.*` webhook event. Every transition is recorded in the audit log. ## What each terminal state means | State | Meaning | What you do | | - | - | - | | `completed` | Funds delivered to the beneficiary and settled. | Mark the payout done in your system. | | `failed` | The rail accepted the payout but settlement failed. | Review the failure reason, potentially retry with a different instrument. | | `returned` | Funds were returned by the receiving bank or counterparty. The source amount is credited back to your balance and any unused FX buffer is released; the fee is retained, because the payout was attempted. | Handle the return in your accounting, including the retained fee — the original payout is final. | | `cannot_be_processed` | The payout cannot be processed. Anton is unable to provide further detail. | Treat as final. It cannot be cancelled via the API; contact support about the funds. | | `velocity_blocked` | A merchant velocity rule rejected the payout. | Wait for the velocity window to reset, or contact support to raise a threshold. | | `cancelled` | Cancelled by the merchant or operations team. | Final. Create a new payout if you still need to send funds. | ## What your integration should do **Subscribe to webhooks. Do not poll.** The payout lifecycle is event-driven. Polling wastes rate-limit budget and misses transitions. **Treat a review as a normal state.** Most legitimate payouts clear review in minutes. When a payout shows `on_hold: true`, surface a pending state to your end user; do not surface an error. A payout on hold cannot be cancelled until the review concludes — the cancel request returns `409 payout_on_hold`. **Respond to RFIs promptly.** If Anton needs more information during a review — a beneficiary's incorporation document, proof of source of funds — an `rfi.created` event fires. A team member with the `rfis.respond` permission (held by the Admin and Operator roles) responds in the dashboard and can attach documents to the response. RFI responses are accepted from signed-in dashboard users only, not from API credentials. The payout cannot clear review until the RFI is closed. **Don't retry a `cannot_be_processed` payout.** Creating a new payout to the same beneficiary does not change the outcome. ## What you can and can't control Screening, velocity, and engine evaluation run automatically on every live payout. You cannot disable them, override them at submission time, or skip them with a flag. This is a compliance requirement, not a limitation. For select merchants, Anton can enable programmatic access to the engine — risk signals, velocity rule management, and dashboard-equivalent views — on top of the public API surface. These are not part of the public v1.0.0 contract; they're negotiated per account. [Contact us](https://help.antonpayments.com) if you want to inspect or tune risk signals programmatically. ## What you send changes what Anton can see Anton scores what it is given. The largest single improvement most integrations can make is sending the `session` object on `POST /v1/payouts` — the end-user IP, timezone, and user agent your own edge observed. Without it the only address in the request is your server's, so network- and location-based reasoning has nothing to work with. With it, Anton can check the payer's country against the destination corridor, test whether the browser's timezone agrees with where the address resolves, and tell residential traffic apart from datacenter, Tor, or relay egress. Every field is optional and none of them can fail a payout — invalid values come back as `session_quality` warnings, not errors. See [Send end-user session context](/guides/send-a-payout#send-end-user-session-context). # Anton Payments Source: https://docs.antonpayments.com/introduction AI-native cross-border payout infrastructure. Fiat, stablecoin, and crypto, routed across a global network of rails. Anton Payments moves money. Fiat to fiat across borders, stablecoin to fiat, stablecoin to stablecoin, and stablecoin to other cryptocurrencies. Merchants fund payouts with the currency they already hold; Anton picks the rail, clears sanctions, scores risk, and settles. Most payout platforms bolt AI on top of static rule engines. **Anton is built the other way around** — risk scoring, smart routing, velocity control, and anomaly detection are the platform, not an add-on. ## What you can build > [card] Global payroll > > Pay contractors in 100+ countries with a single API call. Anton handles identity verification, compliance screening, and rail selection. > [card] Marketplace disbursements > > Settle seller balances in fiat or stablecoin. Batch thousands of payouts, track them via webhooks, and retry safely with idempotency guarantees. > [card] Stablecoin treasury > > Fund your balance with USDC or USDT and pay out in whichever currency your beneficiary needs — fiat off-ramp or on-chain settlement. > [card] Cross-border B2B > > Move working capital across corridors with FX quote locking, settlement confirmation, and a full audit trail for every transaction. > [card] AI compliance screening > > Use Anton Intelligence standalone — payee, instrument, and onboarding risk evaluations with auditable evidence — on an account tier with no payout surface at all. ## How it works **1. Onboard your business** Complete KYB verification through the merchant dashboard. Our underwriting team reviews your account before you can move live funds. **2. Create your first beneficiary** Add the people or businesses you want to pay. Beneficiary PII is tokenized on creation — raw identifiers never hit Anton's database. **3. Send a payout** Call `POST /v1/payouts` with an amount, currency, and beneficiary. Anton screens it, scores it, routes it to the right rail, and settles. **4. Listen for webhooks** Subscribe to `payout.*` events to know when a payout is processing, sent, completed, or needs review. Never poll. ## What makes Anton different **Compliance-first, day one.** Every payout is screened against OFAC, EU, UK, and UN sanctions lists. PII and payment instruments are isolated in a PCI-DSS vault — Anton's core database never stores raw account numbers or identity documents. SOC 2, PCI DSS, and ISO 27001 programs are active. **AI-native risk.** Every payout runs through the Anton Engine, a real-time scoring system that combines merchant-level velocity rules, cross-merchant trust signals, and anomaly detection. The verdict is reflected in the payout state machine: approved, held for review, or blocked. **Multi-rail by design.** Anton integrates with a network of bank, card, and on-chain settlement providers. You pick the corridor and currency; Anton picks the rail. ## Start building > [card] [Quickstart](/quickstart) > > Your first payout in five minutes. > [card] [Authentication](/authentication) > > OAuth + DPoP credentials, scopes, and secure usage. > [card] [API Reference](/api-reference/introduction) > > Every endpoint, every field, every response. ## Support and security * **Integration support** — [help.antonpayments.com](https://help.antonpayments.com). Include the `X-Request-ID` response header from any failing request; Anton retains a full server-side trace keyed by that ID. * **Platform status** — [status.antonpayments.com](https://status.antonpayments.com). * **Security reports** — email [security@antonpayments.com](mailto:security@antonpayments.com). Do not open public issues for suspected vulnerabilities. Initial acknowledgement within 24 hours, triage within 72. # Quickstart Source: https://docs.antonpayments.com/quickstart Send your first payout in five minutes. You'll create a beneficiary, attach a payment instrument, and fire a sandbox payout end to end. This walks you from an empty sandbox to a delivered payout. It takes about five minutes if you already have sandbox OAuth credentials and a working DPoP proof signer. > [!NOTE] > > Every request below uses the sandbox (`https://api.antonpayments.dev`) and a test OAuth client (`ant_oc_test_...`). No real funds move. Switch to `https://api.antonpayments.com` with `ant_oc_live_*` credentials when you're ready for production — see [Going Live](/guides/going-live). ## Before you start You need: * **Sandbox OAuth credentials** from the [merchant dashboard](https://app.antonpayments.com) — `client_id`, `client_secret`, and the DPoP private key the portal generated for you. Sandbox access is available before KYB — you do not need an approved merchant account to finish this quickstart. * **A working DPoP proof signer.** The [Authentication](/authentication) page has a copy-paste curl + openssl + python script. Use it (or a JOSE library in your language) to mint an access token and sign per-request proofs. * `curl`, Node 18+, PHP 8+, or Go 1.21+ — any one is enough for the examples. Mint an access token and store it. Examples below assume: ```bash theme={} export ANTON_ACCESS_TOKEN=eyJhbGciOiJFUzI1NiIs... # from POST /oauth/token # Each request also requires a fresh DPoP proof header (see /authentication). ``` The `Authorization: DPoP $ANTON_ACCESS_TOKEN` header is shown on every example. The `DPoP: ` header is implied — refer to [Authentication](/authentication) for the per-request signing. *** ## Step 1: Verify your token Hit any authenticated endpoint with your token. Reference data like `/v1/currencies` works as a zero-side-effect smoke test. ```bash cURL theme={} curl https://api.antonpayments.dev/v1/currencies \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" ``` ```javascript JavaScript theme={} const response = await fetch("https://api.antonpayments.dev/v1/currencies", { headers: { Authorization: `DPoP ${process.env.ANTON_ACCESS_TOKEN}`, DPoP: dpopProof("GET", "https://api.antonpayments.dev/v1/currencies", process.env.ANTON_ACCESS_TOKEN), }, }); const { data } = await response.json(); console.log(`${data.length} currencies supported`); ``` ```php PHP theme={} $ch = curl_init("https://api.antonpayments.dev/v1/currencies"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ["Authorization: DPoP " . getenv("ANTON_ACCESS_TOKEN")], ]); $data = json_decode(curl_exec($ch), true); curl_close($ch); echo count($data["data"]) . " currencies supported"; ``` ```go Go theme={} req, _ := http.NewRequest("GET", "https://api.antonpayments.dev/v1/currencies", nil) req.Header.Set("Authorization", "DPoP "+os.Getenv("ANTON_ACCESS_TOKEN")) resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() ``` > [!TIP] > > A `200 OK` with a currency list means your key is authenticated and ready to go. *** ## Step 2: Create a beneficiary A **beneficiary** is who you're paying — a person or business. Personal details (name, address, DOB) are tokenized in a secure vault on creation; Anton's database never holds them in plaintext. ```bash cURL theme={} curl https://api.antonpayments.dev/v1/beneficiaries \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: ben-quickstart-0001" \ -d '{ "type": "individual", "country": "GB", "external_ref": "quickstart-jane", "individual": { "first_name": "Jane", "last_name": "Smith", "email": "jane@example.com", "phone": "+442079460000", "date_of_birth": "1988-05-12", "nationality": "GB", "address": { "street_line_1": "10 Example Street", "city": "London", "postal_code": "SW1A 1AA", "country": "GB" } } }' ``` ```javascript JavaScript theme={} const res = await fetch("https://api.antonpayments.dev/v1/beneficiaries", { method: "POST", headers: { Authorization: `DPoP ${process.env.ANTON_ACCESS_TOKEN}`, DPoP: dpopProof(method, url, process.env.ANTON_ACCESS_TOKEN), "Content-Type": "application/json", "Idempotency-Key": "ben-quickstart-0001", }, body: JSON.stringify({ type: "individual", country: "GB", external_ref: "quickstart-jane", individual: { first_name: "Jane", last_name: "Smith", email: "jane@example.com", phone: "+442079460000", date_of_birth: "1988-05-12", nationality: "GB", address: { street_line_1: "10 Example Street", city: "London", postal_code: "SW1A 1AA", country: "GB", }, }, }), }); const { id: beneficiaryId } = await res.json(); console.log(beneficiaryId); // ben_... ``` ```php PHP theme={} $ch = curl_init("https://api.antonpayments.dev/v1/beneficiaries"); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: DPoP " . getenv("ANTON_ACCESS_TOKEN"), "Content-Type: application/json", "Idempotency-Key: ben-quickstart-0001", ], CURLOPT_POSTFIELDS => json_encode([ "type" => "individual", "country" => "GB", "external_ref" => "quickstart-jane", "individual" => [ "first_name" => "Jane", "last_name" => "Smith", "email" => "jane@example.com", "phone" => "+442079460000", "date_of_birth" => "1988-05-12", "nationality" => "GB", "address" => [ "street_line_1" => "10 Example Street", "city" => "London", "postal_code" => "SW1A 1AA", "country" => "GB", ], ], ]), ]); $beneficiary = json_decode(curl_exec($ch), true); curl_close($ch); $beneficiaryId = $beneficiary["id"]; // ben_... ``` ```go Go theme={} body := map[string]any{ "type": "individual", "country": "GB", "external_ref": "quickstart-jane", "individual": map[string]any{ "first_name": "Jane", "last_name": "Smith", "email": "jane@example.com", "phone": "+442079460000", "date_of_birth": "1988-05-12", "nationality": "GB", "address": map[string]any{ "street_line_1": "10 Example Street", "city": "London", "postal_code": "SW1A 1AA", "country": "GB", }, }, } buf, _ := json.Marshal(body) req, _ := http.NewRequest("POST", "https://api.antonpayments.dev/v1/beneficiaries", bytes.NewReader(buf)) req.Header.Set("Authorization", "DPoP "+os.Getenv("ANTON_ACCESS_TOKEN")) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", "ben-quickstart-0001") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() var beneficiary struct{ ID string `json:"id"` } json.NewDecoder(resp.Body).Decode(&beneficiary) // beneficiary.ID == "ben_..." ``` Save the returned `id` (prefixed `ben_`). You'll use it in the next step. *** ## Step 3: Attach a payment instrument A **beneficiary** is the identity; an **instrument** is where the money goes — a bank account, wallet, or card. One beneficiary can have many instruments. Credentials (account numbers, wallet addresses, card PANs) are tokenized in a secure vault on receipt. This example attaches a UK bank account. See [`GET /v1/payment-methods`](/api-reference/reference-data/list-payment-methods) for the complete per-country catalog. ```bash cURL theme={} curl https://api.antonpayments.dev/v1/beneficiaries/$BENEFICIARY_ID/instruments \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: ins-quickstart-0001" \ -d '{ "method": "uk_bank", "currency": "GBP", "country": "GB", "label": "Primary GBP account", "is_default": true, "credentials": { "account_number": "12345678", "sort_code": "123456" } }' ``` ```javascript JavaScript theme={} const res = await fetch( `https://api.antonpayments.dev/v1/beneficiaries/${beneficiaryId}/instruments`, { method: "POST", headers: { Authorization: `DPoP ${process.env.ANTON_ACCESS_TOKEN}`, DPoP: dpopProof(method, url, process.env.ANTON_ACCESS_TOKEN), "Content-Type": "application/json", "Idempotency-Key": "ins-quickstart-0001", }, body: JSON.stringify({ method: "uk_bank", currency: "GBP", country: "GB", label: "Primary GBP account", is_default: true, credentials: { account_number: "12345678", sort_code: "123456", }, }), }, ); const { id: instrumentId } = await res.json(); console.log(instrumentId); // ins_... ``` ```php PHP theme={} $url = "https://api.antonpayments.dev/v1/beneficiaries/{$beneficiaryId}/instruments"; $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: DPoP " . getenv("ANTON_ACCESS_TOKEN"), "Content-Type: application/json", "Idempotency-Key: ins-quickstart-0001", ], CURLOPT_POSTFIELDS => json_encode([ "method" => "uk_bank", "currency" => "GBP", "country" => "GB", "label" => "Primary GBP account", "is_default" => true, "credentials" => [ "account_number" => "12345678", "sort_code" => "123456", ], ]), ]); $instrument = json_decode(curl_exec($ch), true); curl_close($ch); $instrumentId = $instrument["id"]; // ins_... ``` ```go Go theme={} url := fmt.Sprintf("https://api.antonpayments.dev/v1/beneficiaries/%s/instruments", beneficiaryID) body := map[string]any{ "method": "uk_bank", "currency": "GBP", "country": "GB", "label": "Primary GBP account", "is_default": true, "credentials": map[string]any{ "account_number": "12345678", "sort_code": "123456", }, } buf, _ := json.Marshal(body) req, _ := http.NewRequest("POST", url, bytes.NewReader(buf)) req.Header.Set("Authorization", "DPoP "+os.Getenv("ANTON_ACCESS_TOKEN")) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", "ins-quickstart-0001") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() var instrument struct{ ID string `json:"id"` } json.NewDecoder(resp.Body).Decode(&instrument) // instrument.ID == "ins_..." ``` Save the returned `id` (prefixed `ins_`). *** ## Step 4: Send a payout Now send a payout from your sandbox balance to the beneficiary's instrument. You specify both a `source_amount` (what you pay) and a `dest_amount` (what the beneficiary receives) plus `fixed_side` to tell Anton which is authoritative. For same-currency payouts these are identical. ```bash cURL theme={} curl https://api.antonpayments.dev/v1/payouts \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: pay-quickstart-0001" \ -d '{ "beneficiary_id": "'"$BENEFICIARY_ID"'", "instrument_id": "'"$INSTRUMENT_ID"'", "source_amount": "250.00", "source_currency": "GBP", "dest_amount": "250.00", "dest_currency": "GBP", "method": "faster_payment", "rail_type": "fiat", "fixed_side": "fixed_dest", "purpose": "contractor_payment", "reference": "INV-QS-001" }' ``` ```javascript JavaScript theme={} const res = await fetch("https://api.antonpayments.dev/v1/payouts", { method: "POST", headers: { Authorization: `DPoP ${process.env.ANTON_ACCESS_TOKEN}`, DPoP: dpopProof(method, url, process.env.ANTON_ACCESS_TOKEN), "Content-Type": "application/json", "Idempotency-Key": "pay-quickstart-0001", }, body: JSON.stringify({ beneficiary_id: beneficiaryId, instrument_id: instrumentId, source_amount: "250.00", source_currency: "GBP", dest_amount: "250.00", dest_currency: "GBP", method: "faster_payment", rail_type: "fiat", fixed_side: "fixed_dest", purpose: "contractor_payment", reference: "INV-QS-001", }), }); const payout = await res.json(); console.log(payout.id, payout.status); // pay_... "pending_screening" ``` ```php PHP theme={} $ch = curl_init("https://api.antonpayments.dev/v1/payouts"); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: DPoP " . getenv("ANTON_ACCESS_TOKEN"), "Content-Type: application/json", "Idempotency-Key: pay-quickstart-0001", ], CURLOPT_POSTFIELDS => json_encode([ "beneficiary_id" => $beneficiaryId, "instrument_id" => $instrumentId, "source_amount" => "250.00", "source_currency"=> "GBP", "dest_amount" => "250.00", "dest_currency" => "GBP", "method" => "faster_payment", "rail_type" => "fiat", "fixed_side" => "fixed_dest", "purpose" => "contractor_payment", "reference" => "INV-QS-001", ]), ]); $payout = json_decode(curl_exec($ch), true); curl_close($ch); echo $payout["id"] . " " . $payout["status"]; ``` ```go Go theme={} body := map[string]any{ "beneficiary_id": beneficiaryID, "instrument_id": instrumentID, "source_amount": "250.00", "source_currency": "GBP", "dest_amount": "250.00", "dest_currency": "GBP", "method": "faster_payment", "rail_type": "fiat", "fixed_side": "fixed_dest", "purpose": "contractor_payment", "reference": "INV-QS-001", } buf, _ := json.Marshal(body) req, _ := http.NewRequest("POST", "https://api.antonpayments.dev/v1/payouts", bytes.NewReader(buf)) req.Header.Set("Authorization", "DPoP "+os.Getenv("ANTON_ACCESS_TOKEN")) req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", "pay-quickstart-0001") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() var payout struct{ ID, Status string } json.NewDecoder(resp.Body).Decode(&payout) // payout.ID == "pay_..." payout.Status == "pending_screening" ``` The payout starts at `pending_screening`: the payout is completing required checks before it can be sent. A payout can return to this status after approval or review. No action is needed. In the sandbox, it moves through the full lifecycle in seconds: ``` pending_screening → pending_approval → approved → processing → sent → completed ``` Every transition fires a `payout.*` webhook event — see [How Anton Evaluates Payouts](/how-anton-evaluates-payouts) for what each state means and how to handle `manual_review`. *** ## Step 5: Listen for webhooks (recommended) Polling works while you're developing, but production integrations should subscribe to webhooks. Create a subscription pointing at an HTTPS endpoint you control: ```bash cURL theme={} curl https://api.antonpayments.dev/v1/webhooks \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $ANTON_DPOP_PROOF" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-app.example.com/webhooks/anton", "events": [ "payout.completed", "payout.failed", "payout.returned", "payout.on_hold" ] }' ``` The response includes a one-time `secret` (`whsec_...`). Store it securely — you'll use it to verify every delivery. See [Webhook Signing](/api-reference/webhook-signing) for the HMAC-SHA256 verification recipe. > [!TIP] > > **Never poll in production.** Polling wastes your rate-limit budget and misses events. Webhook deliveries are signed, retried on failure, and replayable from the event history via `GET /v1/webhooks/events/{id}/deliveries`. *** ## What's next? > [card] [Send a payout](/guides/send-a-payout) > > The full payout flow with economics, corridors, and FX. > [card] [Handle webhooks](/guides/handle-webhooks) > > Set up real-time notifications with signed deliveries. > [card] [Manage beneficiaries](/guides/manage-beneficiaries) > > Deduplication, PII updates, archive/restore, and ops workflows. > [card] [How Anton evaluates payouts](/how-anton-evaluates-payouts) > > Screening, velocity, and the Anton Engine — what each state means. > [card] [Batch payouts](/guides/batch-payouts) > > Upload a CSV and send thousands of payouts in one call. > [card] [Go live](/guides/going-live) > > Checklist to promote your integration from sandbox to production. # Sandbox Overview Source: https://docs.antonpayments.com/sandbox/overview A full-fidelity environment for building and testing your Anton integration. Real API surface, no real money. The Anton sandbox runs the same API, the same state machine, the same compliance checks, and the same webhook delivery pipeline as production. What it doesn't do is move funds. Rail submission, settlement, and counterparty communication are handled by internal mocks with deterministic outcomes — so you can build and test without waiting for a real bank transfer, and without exposing real beneficiaries to screening hits. ## Getting a sandbox key **1. Sign in to the dashboard** Go to [app.antonpayments.com](https://app.antonpayments.com) and authenticate. Sandbox access is available from day one — you do not need to complete KYB to use it. **2. Create a test key** Generate a new API key in the **API Keys** section. Keys prefixed `ant_oc_test_` only work against `https://api.antonpayments.dev`. **3. Set your base URL** Use `https://api.antonpayments.dev` as the host for every request. ## What's identical to production * **Authentication** — same `Authorization: DPoP ` + `DPoP: ` header pair, same `401` responses, same rotation flow. Sandbox access tokens live 8 hours rather than 1. * **Data model** — beneficiaries, payouts, instruments, batches, and webhooks all share the same schemas. * **State machine** — a payout moves through `pending_screening → approved → processing → sent → completed` exactly as it would in production. * **Idempotency** — `Idempotency-Key` behaves the same way and enforces the same 24-hour window. * **Rate limits** — sandbox applies the same per-merchant ceilings. Test your handling of `429` here before production traffic exposes gaps. * **Webhooks** — subscribed endpoints receive real HTTP deliveries with real signatures. Verify your signing code in sandbox. ## What's mocked * **Rail settlement** — payouts transition to `sent` and then `completed` on a compressed timeline (seconds, not hours). No real bank is contacted. * **Timing** — sandbox deliberately moves faster than production so integration tests complete in reasonable CI windows. * **Risk outcomes** — the Anton Engine runs in sandbox with a controlled signal set. You can trigger specific verdicts using test fixtures from the seeders. ## Triggering specific scenarios > [card] [Test data](/sandbox/test-data) > > Reset your sandbox and seed sample beneficiaries and payouts in a single call. > [card] [Risk evaluation](/how-anton-evaluates-payouts) > > How payouts are scored and what each terminal state means for your integration. ## When you're ready for production Sandbox and production are completely isolated. Keys, data, webhooks, and merchant accounts do not carry over. Before you switch to a live key, walk through the [Going Live checklist](/guides/going-live) — sandbox can't simulate everything, and a missed item tends to be a painful discovery on day one. # Sandbox Test Data Source: https://docs.antonpayments.com/sandbox/test-data Reset your sandbox to a clean state and seed realistic beneficiaries, instruments, and payouts with a single call each. The sandbox gives you three endpoints to manage test data for your merchant: * `POST /v1/merchant/sandbox/reset` — wipe and optionally reseed * `POST /v1/merchant/sandbox/seed-beneficiaries` — generate sample beneficiaries across multiple countries and methods * `POST /v1/merchant/sandbox/seed-payouts` — generate sample payouts in mixed states for UI and webhook testing All three are **sandbox-only** — calling them against production returns `403 sandbox_only`. They're scoped to your merchant — you can't affect another merchant's data. ## Reset Four reset scopes: | `?scope=` | What it does | | - | - | | `balances` (default) | Wipe `merchant_accounts` + sandbox transactions, re-seed fresh balances. Beneficiaries, instruments, and payouts stay. | | `all` | Wipe payouts, instruments, beneficiaries, and sandbox transactions. Re-seed currency balances only. | | `delete-all` | Wipe everything. No reseed. You land at zero state. | | `full-reset` | Wipe everything. Re-seed balances + sample beneficiaries + sample payouts. Equivalent to a fresh merchant with demo data. | ```bash theme={} # Clean balances, keep your beneficiaries and payouts curl "https://api.antonpayments.dev/v1/merchant/sandbox/reset?scope=balances" \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" # Nuclear option — fresh merchant state with demo data curl "https://api.antonpayments.dev/v1/merchant/sandbox/reset?scope=full-reset" \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Rate-limited to 10 resets per merchant per hour — enough for active development, tight enough to catch a runaway test suite. Response: ```json theme={} { "status": "reset", "scope": "balances", "merchant_id": "mer_01HX..." } ``` `status` varies by scope: * `balances` → `"status": "reset"` * `all` → `"status": "cleaned"` * `delete-all` → `"status": "deleted"` * `full-reset` → `"status": "reset"` with extra counts for the sample data that was re-seeded `full-reset` adds `beneficiaries`, `instruments`, and `payouts` counts so the dashboard can render a confirmation toast without a second call: ```json theme={} { "status": "reset", "scope": "full-reset", "merchant_id": "mer_01HX...", "beneficiaries": 4, "instruments": 4, "payouts": 4 } ``` ## Seed sample beneficiaries Creates a curated set of realistic beneficiaries across multiple countries and payment methods — useful for populating your UI or testing country-specific edge cases: ```bash theme={} curl https://api.antonpayments.dev/v1/merchant/sandbox/seed-beneficiaries \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` Response: ```json theme={} { "status": "seeded", "merchant_id": "mer_01HX...", "beneficiaries": 4, "instruments": 4 } ``` `beneficiaries` is the number of beneficiary records created; `instruments` is the number of payment instruments attached across those beneficiaries (usually one per beneficiary, but kept separate so the response shape stays honest if the seeder later creates multi-instrument beneficiaries). The beneficiaries created include a mix of `individual` and `business` types, spanning several corridors — enough variety to exercise most payout flows without you having to construct PII by hand. ## Seed sample payouts Creates payouts in a mix of states — `completed`, `failed`, `cancelled`, `manual_review`, and in-flight — so you can validate your UI and webhook handling against every outcome: ```bash theme={} curl https://api.antonpayments.dev/v1/merchant/sandbox/seed-payouts \ -X POST \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" ``` ```json theme={} { "status": "seeded", "merchant_id": "mer_01HX...", "created": 4 } ``` `created` is the number of sample payouts created — one per seeded beneficiary, cycling through the four outcome triggers (happy path, slow, return, failure). **Requires seeded beneficiaries first.** Running seed-payouts with no beneficiaries returns `422 no_beneficiaries`. Call seed-beneficiaries first, or use `?scope=full-reset` on the reset endpoint which seeds both. ## Using these in CI A recommended CI pattern: **1. Before each test run, reset** `POST /v1/merchant/sandbox/reset?scope=delete-all` to guarantee a clean slate. **2. Seed any baseline data your tests assume** If your tests need a starting population (e.g., dashboard snapshot tests), call `seed-beneficiaries` and `seed-payouts`. **3. Run your tests** Exercise your real integration against the seeded state. **4. Between test suites, reset scoped to balances** `?scope=balances` is faster than a full reset — keeps your seeded data, resets funding state. Rate limits apply across the hour: 10 resets per merchant per hour. In a heavy-test CI setup, either share a merchant across workers carefully, or provision multiple sandbox merchants. ## Triggering specific scenarios (future) Sandbox seeders produce a curated distribution — payouts in mixed states, beneficiaries across corridors. For deterministic triggering of specific engine verdicts, screening hits, or rail failures, that's forthcoming functionality — when it lands it'll use the `?simulate=` query parameter on `POST /v1/payouts` (sandbox-only). Watch the [changelog](/changelog) for when it ships. ## What's different from production See [Sandbox Overview](/sandbox/overview) for the full list. Key points: * Rail submission is mocked — no real banks are contacted * Timing is compressed — sandbox payouts transition to `completed` in seconds * Real OFAC screening runs, but you can trigger deterministic outcomes using specific test beneficiaries * All authentication, authorization, webhook signing, and state-machine behavior is identical to production ## Next steps > [card] [Sandbox overview](/sandbox/overview) > > What sandbox is, and how it differs from production. > [card] [Going live](/guides/going-live) > > Checklist for promoting from sandbox to production.