Payment Callback
Gate sends an HTTP POST notification (webhook) to your server when an e-wallet payment reaches a final status, so you don't need to poll.
Webhook Workflow
- The customer pays via the
payment_urlfrom the Create Transaction step. - The payment network sends a server-to-server notification to Gate.
- Gate updates the transaction status. Only a Completed payment changes the transaction to
SUCCESS; this status is final and is not changed by later notifications. - Gate sends the payload to the
callback_urlyou provided in Create Transaction. Ifcallback_urlis empty, no notification is sent.
Webhook Endpoint Details
| Property | Value |
|---|---|
| HTTP Method | POST |
| Target URL | Your callback_url |
| Content-Type | application/json |
| Timeout | 10 seconds |
Payload Structure
Fields
| Field | Type | Description |
|---|---|---|
trx_id |
string | Transaction ID from create transaction. |
external_ref_id |
string | Transaction reference at the payment network. |
paid_at |
string (RFC3339) | Time the payment was completed. |
amount |
string | Paid amount as a decimal string (e.g. "50000"). |
method |
integer | Payment method enum (2 = E-Wallet). |
status |
integer | Payment status code (table below). |
issuer_name |
string | E-wallet brand code (e.g. DANA). |
customer_name |
string | Customer name. |
Status Values
| Value | Status | Meaning |
|---|---|---|
0 |
Pending | Not yet paid. |
1 |
Reject | Rejected by the payment network. |
2 |
Cancel | Cancelled. |
3 |
Expired | Timed out without payment. |
4 |
Obscure | Undefined status from the network. |
5 |
Completed | Successfully paid and settled. |
Example Webhook Payload
{
"trx_id": "cmr1h08xk000342qq3fmnl5u1",
"external_ref_id": "EXTREF02202607010942441460",
"paid_at": "2026-07-01T10:05:43+07:00",
"amount": "50000",
"method": 2,
"status": 5,
"issuer_name": "DANA",
"customer_name": "John Doe"
}
Expected Response
Your server must respond with HTTP 2xx as quickly as possible.
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "success"
}
A 4xx/5xx response or a timeout is treated as a failure and will be retried by the background queue.
Important Notes
[!IMPORTANT] Verify
trx_id: Make sure thetrx_idmatches a pending order in your database before fulfilling the order.Idempotency: Callbacks may be re-sent. Processing the same
trx_idwith status5multiple times must not result in duplicate order fulfillment.