Each call below leaves something the next one needs: a token, a payee, an account to pay into, money to send, the payout, and a way to hear how it ends. Keep the IDs as you go.
Get a token
Trade your client_id and client_secret for a token. Every call after this one carries that token and a fresh DPoP proof signed for its exact method and URL. Authentication has a working signer.
A sandbox token lasts 8 hours. There is no refresh token: mint a new one when it runs out.
curl -X POST \ https://api.antonpayments.dev/oauth/token \ -H "DPoP: $DPOP_PROOF" \ -H "Authorization: Basic $CLIENT_CREDENTIALS" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d grant_type=client_credentials
Register who you pay
A payee is identity and nothing else. Its personal details go to a vault on the way in, and you get back a ben_ ID. Send your own ID as external_ref, and build the Idempotency-Key from it, so a retry returns the same payee instead of a second one.
Comes back active. Register a payee covers businesses and duplicates.
curl -X POST \ https://api.antonpayments.dev/v1/beneficiaries \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" \ -H "Idempotency-Key: ben-contractor-1042" \ -H "Content-Type: application/json" \ -d '{ "type": "individual", "country": "GB", "external_ref": "contractor-1042", "individual": { "first_name": "Jane", "last_name": "Smith", "email": "jane@example.com", "phone": "+442079460000", "birth_date": "1988-05-12", "nationality": "GB", "address": { "street_line_1": "10 Example Street", "city": "London", "postal_code": "SW1A 1AA", "country": "GB" } } }'
Give them an account
An instrument is where the money lands, and it belongs to one payee through beneficiary_id. The iban goes in and never comes back out; reads show a masked display.
Register an instrument covers wallets and the other methods.
curl -X POST \ https://api.antonpayments.dev/v1/instruments \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" \ -H "Idempotency-Key: ins-contractor-1042-eur-primary" \ -H "Content-Type: application/json" \ -d '{ "beneficiary_id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "method": "iban", "currency": "EUR", "label": "Primary account", "default": true, "credentials": { "account_holder_name": "Jane Smith", "iban": "DE89370400440532013000" } }'
Fund the sandbox
A payout spends a balance you already hold. In the sandbox, one call credits it; in production the money arrives by bank transfer instead, and this endpoint doesn't exist.
Deposits stack. Fund your balance covers production funding.
curl -X POST \ https://api.antonpayments.dev/v1/sandbox/deposits \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" \ -H "Idempotency-Key: fund-usd-1" \ -H "Content-Type: application/json" \ -d '{ "currency": "USD", "amount": "1000.00" }'
Send the payout
USD from your balance, EUR to the payee over SEPA. fixed_side says the payee gets exactly the destination_amount; Anton prices the other side. Amounts are strings.
The call returns before the money moves. Anton checks the payout first, and everything after arrives as events.
curl -X POST \ https://api.antonpayments.dev/v1/payouts \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" \ -H "Idempotency-Key: payout-PO-8821" \ -H "Content-Type: application/json" \ -d '{ "beneficiary_id": "ben_01HX8Z9K0M2N3P4Q5R6S7T8UA1", "instrument_id": "ins_01HX8Z9K0M2N3P4Q5R6S7T8UA2", "source_amount": "550.00", "source_currency": "USD", "destination_amount": "500.00", "destination_currency": "EUR", "method": "sepa", "rail_type": "fiat", "fixed_side": "fixed_destination", "purpose": "supplier_payment", "reference": "PO-8821" }'
Hear how it ends
Polling tells you less, later. Subscribe once and every payout reports its own progress to your URL, signed. Answer any 2xx quickly and do the work afterwards.
The signing secret is shown once. Store it now.
curl -X POST \ https://api.antonpayments.dev/v1/webhooks \ -H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \ -H "DPoP: $DPOP_PROOF" \ -H "Idempotency-Key: webhook-orders-1" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/hooks", "events": [ "payout.completed", "payout.failed", "payout.returned", "payout.on_hold" ] }'