AntaraPayAPI v1

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

EventResource and data payload
payin.completedstatus completed; id, reference, amount, fee, net, currency, settlement_status.
payin.failedstatus failed; id, reference, reason_code and message.
payin.expiredstatus expired; id, reference, reason_code PAYMENT_EXPIRED and message.
payout.completedstatus completed; id, reference, amount, fee, currency, completed_at, nullable transfer_reference.
payout.failedstatus 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.

ValueMeaning
completedPayment/transfer confirmed.
failedDefinitively failed, rejected, or cancelled; reason_code tells the cause apart.
expiredThe 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.