Skip to main content

Before you begin

You need an Anton Payments account and a sandbox API key. If you do not have one yet, contact our team to get provisioned.
Sandbox mode — All examples in this guide use the sandbox environment (api.antonpayments.dev) and test API keys (ak_test_...). No real money moves. Switch to api.antonpayments.com and ak_live_... keys when you are ready for production.

Step 1: Get your API key

API keys are created in the merchant portal. Navigate to Settings > API Keys and generate a sandbox key. The key is displayed once at creation time — save it immediately. Your key will look like this:
ak_test_7f3a9b2c...
Test that it works by fetching your merchant profile:
curl https://api.antonpayments.dev/v1/merchant \
  -H "Authorization: Bearer ak_test_your_key_here"
If you get back your merchant profile, you are authenticated and ready to go.

Step 2: Create a payee

Before you can send money, you need to register the recipient. A payee stores the recipient’s identity and payment instrument details.
curl https://api.antonpayments.dev/v1/payees \
  -X POST \
  -H "Authorization: Bearer ak_test_your_key_here" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-payee-jane-001" \
  -d '{
    "type": "individual",
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane@example.com",
    "country": "GB",
    "currency": "GBP",
    "bank_account": {
      "account_number": "12345678",
      "sort_code": "123456"
    }
  }'
Save the id from the response — you need it in the next step.

Step 3: Create a payout

Send money to your payee. The payout goes through compliance screening and rail routing automatically.
curl https://api.antonpayments.dev/v1/payouts \
  -X POST \
  -H "Authorization: Bearer ak_test_your_key_here" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: payout-inv-1042" \
  -d '{
    "payee_id": "pye_cng3q8s6ek9kc5qg1h1g",
    "amount": "250.00",
    "currency": "GBP",
    "description": "Invoice #1042 payment",
    "reference": "INV-1042"
  }'
The payout moves through these statuses:
created -> pending_screening -> processing -> sent -> completed

Step 4: Track via webhooks

Polling works for testing, but production integrations should use webhooks. Register a webhook endpoint to receive real-time notifications on payout state changes.
curl https://api.antonpayments.dev/v1/webhooks \
  -X POST \
  -H "Authorization: Bearer ak_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.com/webhooks/anton",
    "events": ["payout.completed", "payout.failed", "payout.returned"]
  }'
You can also poll the payout status directly while testing:
curl https://api.antonpayments.dev/v1/payouts/pay_cng3q8s6ek9kc5qg1h2g \
  -H "Authorization: Bearer ak_test_your_key_here"
To list your recent payouts with cursor-based pagination:
curl "https://api.antonpayments.dev/v1/payouts?limit=10" \
  -H "Authorization: Bearer ak_test_your_key_here"
The response includes has_more and next_cursor fields. To fetch the next page, pass the cursor:
curl "https://api.antonpayments.dev/v1/payouts?limit=10&cursor=pay_def456" \
  -H "Authorization: Bearer ak_test_your_key_here"
Webhooks are the recommended approach for production. Polling is acceptable during development, but webhook-driven architectures are more efficient and receive updates faster. See Handle webhooks for implementation details.

What’s next?

Payout lifecycle

Understand every status a payout can be in and what triggers transitions.

Handle webhooks

Set up real-time notifications for payout events.

Batch payouts

Send thousands of payouts at once via CSV upload.

Go live

Checklist for moving from sandbox to production.