The API is REST over HTTPS, with JSON in and out. Amounts are decimal strings, never floats, so nothing rounds on the way.
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://api.antonpayments.com |
| Sandbox | https://api.antonpayments.dev |
Authentication
Every request carries a DPoP-bound OAuth 2.0 access token and a fresh DPoP proof. Static API keys are not accepted. Mint a token and sign proofs as Authentication shows.
Authorization: DPoP <access_token>
DPoP: <proof JWT, fresh per request>Effective access is scopes ∩ capabilities. A call outside your account's capabilities fails with 403 capability_required, and a call outside the credential's scopes with 403 insufficient_scope. See Capabilities and scopes.
Conventions
- Versioning. The API is versioned by date, for example
2026-12-01. Your account is pinned to the latest version when you create your first OAuth client, and every/v1response carries anAnton-Versionheader with the version it was served at. SendAnton-Versionon one request to try another version on that call. An unknown version is400 invalid_api_version. Webhook events are rendered at your pinned version. New routes, optional fields, enum values, error codes, event types and headers can appear in any version, so ignore what you do not recognise. - JSON. A request with a body must be
application/json, otherwise it is400 invalid_content_type. The upload endpoints takemultipart/form-datainstead. Field names aresnake_case. Unknown body fields, unknown query parameters and wrong types are rejected with400, never ignored. - Amounts. Decimal strings in the currency's precision:
"1234.56", not1234.56. More decimal places than the currency allows is422 amount_precision_invalid. Responses always render the full precision ("10.50", never"10.5").GET /v1/currencieslists each currency'sprecision. - Timestamps. RFC 3339 in UTC with milliseconds and a
Zsuffix:"2026-11-19T14:03:22.104Z". Fields that hold a time end in_at. - Resources. Every object has
id,object(its type name) andlivemode(falsein sandbox). Objects you create can carrymetadata: up to 50 string keys, keys up to 40 characters, values up to 500. Never put personal data in it. - Identifiers. Prefixed opaque strings such as
pay_...,ben_...,ins_...,bat_...andwhk_.... A path ID with the wrong prefix or shape is400 resource_id_invalid, withparamset. A well-formed ID that does not exist, or that belongs to another account, is404 resource_missing. - Single resources. A request for one resource returns the object at the top level, with no
datawrapper. A delete returns{"id": "...", "object": "...", "deleted": true}. - Lists. Every list is
{"object": "list", "data": [...], "has_more": ..., "next_cursor": ...}. See Pagination. - Errors. Every error has
type,code,messageandrequest_id. Branch oncode. See Errors. - The spec. The full OpenAPI description is at openapi-merchant.yaml. Use it to generate a client or import the API into Postman.
Response headers
| Header | On | Meaning |
|---|---|---|
Request-Id | Every response | Our identifier for the request (req_...), the same value as error.request_id. Quote it to support. Anton always generates it. |
Anton-Version | Every /v1 response, including 401 | The API version the response was served at. |
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset | Every authenticated response, unless the limit could not be checked | Your current rate limit window. See Rate limits. |
Retry-After | 429 and 503 | Seconds to wait before retrying. |
WWW-Authenticate | 401 | The challenge: DPoP realm="anton", algs="ES256 EdDSA", plus error="invalid_token" or error="invalid_dpop_proof" when a credential was sent and refused. See Errors. |
Idempotent-Replayed | Replayed responses | true when the response replays an earlier request with the same Idempotency-Key. See Idempotency. |
To correlate a call with your own systems, send X-Client-Request-Id: up to 128 characters from A-Z a-z 0-9 . _ : -, and anything else is ignored. Anton logs it next to its own ID and never uses it as its own.
Cross-cutting topics
Retry any mutation with Idempotency-Key.
Cursors on every list endpoint.
X-RateLimit-* headers, and Retry-After on a 429.
Branch on error.code. Every code, with its status.
Event types, their payloads and the API version they render at.
Verify each delivery before you act on it.