Skip to content

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

EventWhen Triggered
payment.paidPayment is successful and funds are received from the customer.
payment.failedThe transaction failed on the provider's side.
payment.expiredThe bill was not paid before the expiration time.
payment.cancelledThe transaction was manually cancelled via the /cancel API.
payment.challengedThe transaction is in a dispute/review status by the provider (Fraud Detection).
payment.refund_initiatedThe refund process has started.
payment.refund_completedA full refund has been successfully sent back to the customer.
payment.partially_refundedA partial amount (not full) was successfully refunded.

Note: The payment.created event 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": { ... }
  }
}

Gerbang Pay API Documentation