Overview
Webhooks push real-time event notifications to your server so you do not need to poll the API for status updates. When something happens in your Anton account -- such as a payout completing or a payee being created -- Anton sends an HTTP POST request to your registered URL with the event details.
Creating a Webhook via the Portal
Log in to the merchant portal and navigate to Settings > Webhooks
Click Create Webhook
Enter your endpoint URL -- this must be a publicly accessible HTTPS URL
Select the event types you want to receive (e.g., payout.completed, payout.failed)
Click Save
After creation, the portal displays your signing secret. Copy and store it securely -- you need it to verify webhook signatures. The signing secret is only shown once.
Creating a Webhook via the API
curl https://api.antonpayments.dev/v1/webhooks \
-X POST \
-H "Authorization: Bearer ak_test_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/webhooks/anton",
"events": [
"payout.completed",
"payout.failed",
"payout.returned",
"payee.created"
]
}'The response includes the webhook ID, your selected events, and the signing_secret. Store the signing secret immediately -- it is only returned at creation time.
Choosing Event Types
Subscribe only to the events your system needs. Common configurations:
Payout tracking -- Subscribe to
payout.completed,payout.failed, andpayout.returnedto track final outcomes.Full lifecycle -- Add
payout.created,payout.screening,payout.processing, andpayout.sentfor every status change.Payee management -- Subscribe to
payee.created,payee.updated, andpayee.deletedto keep local records in sync.Batch operations -- Use
batch.completedandbatch.failedto monitor batch processing.
Testing Webhook Delivery
Before going live, test your webhook endpoint in sandbox:
Use a tunnel service for local development. Tools like ngrok expose your local server so Anton can deliver webhooks:
βngrok http 3000
Register the generated HTTPS URL as your webhook endpoint.Create test payouts in sandbox to trigger real webhook deliveries. Sandbox payouts settle instantly, so you receive events immediately.
Check delivery history in the merchant portal under Settings > Webhooks. Each attempt shows the status code, response time, and error details.
Managing Subscriptions
You can update or delete webhook subscriptions at any time through the portal or API. When you update a subscription, you can change the URL or modify the event types. Deleting a subscription stops all future deliveries to that endpoint.
