A payout can only spend what is available in the currency it debits. Balances don't convert on their own, so USD never covers a payout that debits EUR. Money for a currency arrives through that currency's account, and the account is where you read the bank details.
Read what you hold
GET /v1/balances returns one balance per currency you hold, in full, with no paging. Fetch a single one with GET /v1/balances/{currency}; a currency you hold nothing in is 404 resource_missing.
curl "https://api.antonpayments.dev/v1/balances" \
-H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \
-H "DPoP: $DPOP_PROOF"Each balance has three figures. available is what new payouts can use. pending is reserved for payouts in flight. total is the two added together. Amounts are decimal strings at the currency's precision.
Check available before you create a payout, not total.
Choose how the money arrives
One call adds to your balance and returns the new available. The endpoint answers 404 in production.
Read the details for the currency, then pay into them from your bank. Anton credits the balance when the money lands.
Credit a sandbox balance
Name the currency and the amount to add. The amount is positive and carries the currency's precision, so 1000.00 for USD and no decimals for JPY.
The response carries the amount this call added and the balance's available after it. The credit is additive, so a second call stacks on the first. A currency you hold no account in gets one, created with the deposit.
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" }'
Sandbox only. POST /v1/sandbox/deposits exists on https://api.antonpayments.dev and answers 404 on the production host. Code that funds itself this way will not run live, so keep it out of anything you deploy.
A deposit is not stored as a record, so there is no endpoint to fetch it later. Read the balance instead.
Find the bank details
Production money comes in by transfer to your account in that currency. GET /v1/accounts/{currency}/details returns where to send it.
curl "https://api.antonpayments.dev/v1/accounts/EUR/details" \
-H "Authorization: DPoP $ANTON_ACCESS_TOKEN" \
-H "DPoP: $DPOP_PROOF"Which fields are set depends on the currency and country: some accounts have an iban and a bic, others an account_number and a sort_code, and other schemes appear in routing_codes. The rest come back null. Show your user only the fields that are set, with the holder_name they must pay.
GET /v1/accounts lists your accounts, one per currency. An account has the same three figures as a balance, but there pending means funds not yet available. For deciding what a payout can spend, read the balance.
Know when it lands
A transfer that arrives reaches you as a signed funding.credit event, with the amount, currency, a masked sender name and the payment reference. Match it to the payment you expected by reference, not by sender.
balance.low fires when a currency's available balance crosses its threshold. It fires once and stays quiet until the balance recovers, so treat it as a prompt to top up. Track payouts with webhooks covers subscribing and verifying them.
When it goes wrong
Retry-After.