Webhook Events
Below is a complete list of all events that can be triggered and the JSON payload you will receive via Webhook.
Available Event List
| Event | When Triggered |
|---|---|
payment.paid | Payment is successful and funds are received from the customer. |
payment.failed | The transaction failed on the provider's side. |
payment.expired | The bill was not paid before the expiration time. |
payment.cancelled | The transaction was manually cancelled via the /cancel API. |
payment.challenged | The transaction is in a dispute/review status by the provider (Fraud Detection). |
payment.refund_initiated | The refund process has started. |
payment.refund_completed | A full refund has been successfully sent back to the customer. |
payment.partially_refunded | A partial amount (not full) was successfully refunded. |
Note: The
payment.createdevent is NOT forwarded via webhook.
Universal Envelope Structure
Every event shares the same main structure (envelope). What differentiates them is the content inside the data field.
json
{
"event_id": "11111111-2222-3333-4444-555555555555",
"event_type": "payment.paid",
"version": 1,
"occurred_at": "2026-07-21T11:05:32Z",
"tenant_id": "b6a3b2b8-f09d-4767-8fa0-68153c30a91f",
"data": { ... } // The actual payload is here
}Example data Events
The data fields below represent Gerbang Pay's standard Unified Callback Payload, regardless of which provider (Midtrans/Winpay) is responding.
1. payment.paid
The most frequently used event. This is the signal that you can deliver the goods/services to the customer.
json
{
"event_id": "...",
"event_type": "payment.paid",
...
"data": {
"provider_order_id": "WP-998877", // ID in the provider's internal system
"status": "paid", // Canonical status from Gerbang Pay
"amount_paid": 10000000, // Amount of incoming funds
"paid_at": "2026-07-21T11:05:32Z", // Time of payment
"raw_payload": { ... } // The original/raw payload from the provider's callback (can vary)
}
}2. payment.expired
Sent when the bill passes its expiration time.
json
{
"event_id": "...",
"event_type": "payment.expired",
...
"data": {
"provider_order_id": "WP-998877",
"status": "expired",
"amount_paid": 0,
"paid_at": null,
"raw_payload": { ... }
}
}3. payment.failed
Sent when the transaction fails to be processed by the bank/provider.
json
{
"event_id": "...",
"event_type": "payment.failed",
...
"data": {
"provider_order_id": "WP-998877",
"status": "failed",
"amount_paid": 0,
"paid_at": null,
"raw_payload": { ... }
}
}4. payment.cancelled
Sent when the system (or you yourself) cancels a transaction that is still in a pending status.
json
{
"event_id": "...",
"event_type": "payment.cancelled",
...
"data": {
"provider_order_id": "WP-998877",
"status": "cancelled",
"amount_paid": 0,
"paid_at": null,
"raw_payload": { ... }
}
}