Part 10
Receiving webhooks
Event format, event types, and how your endpoint should respond.
Register a single HTTPS endpoint in the integration dashboard and keep the webhook secret on your backend. The webhook secret is different from the API key. AntaraPay sends an HTTP POST with application/json to your endpoint; the URL configuration is not resent with every transaction.
Event payload
payin.completed
{
"event_id": "evt_example_001",
"type": "payin.completed",
"schema_version": 1,
"occurred_at": "2026-10-15T05:02:00Z",
"resource_version": 4,
"data": {
"id": "pin_example_001",
"reference": "ORDER-0001",
"status": "completed",
"amount": "100000",
"fee": "1500",
"net": "98500",
"currency": "IDR",
"settlement_status": "COMPLETED"
}
}Event types
| Event | Resource and data payload |
|---|---|
payin.completed | status completed; id, reference, amount, fee, net, currency, settlement_status. |
payin.failed | status failed; id, reference, reason_code and message. |
payin.expired | status expired; id, reference, reason_code PAYMENT_EXPIRED and message. |
payout.completed | status completed; id, reference, amount, fee, currency, completed_at, nullable transfer_reference. |
payout.failed | status failed; id, reference, reason_code (PAYOUT_FAILED, PAYOUT_REJECTED, or PAYOUT_CANCELLED); message. |
data.status values
data.status in a webhook is only completed, failed, or expired, always lowercase.
| Value | Meaning |
|---|---|
completed | Payment/transfer confirmed. |
failed | Definitively failed, rejected, or cancelled; reason_code tells the cause apart. |
expired | The payin instruction has expired. |
In-progress statuses remain available through GET, not as final webhooks.
resource_version applies per data.id; a newer event can correct expired to completed if a late payment is verified.Your endpoint's response
Your endpoint should reply 200/204 after the event is verified and durably stored, then do heavy work asynchronously. If storing fails, return 5xx so the event can be redelivered. An event with a wrong signature must be rejected without changing any data.