Skip to content
PGSwift Docs
Documentation/Payment Completed Webhook

Payment Completed Webhook

POST payment.v2.completed

Request Headers

All webhook requests include the following headers for authentication and verification:

Header Description
X-PARTNER-ID Your client identifier
X-TIMESTAMP Request timestamp in ISO8601 format (e.g., 2024-12-18T16:21:07+07:00)
X-SIGNATURE RSA signature for request verification (see Signature Generation)

Payload Structure

All webhooks use the unified envelope: { event, timestamp, data }.

Name Type Description
event string Event name: "payment.v2.completed"
timestamp string Webhook dispatch timestamp (ISO 8601)
data.transaction_id string Internal transaction identifier
data.merchant_transaction_id string Unique identifier for the merchant's transaction
data.created_at string Transaction creation timestamp (ISO 8601)
data.amount string Transaction amount
data.currency string Currency code (e.g. "IDR")
data.channel string Payment channel
data.payment_channel string/null Normalized payment channel, one format for every payment type and provider: a value such as QRIS, VA_BRI, BANK_BCA, or EWALLET_DANA (payment type prefix + code from the Appendix). null when the channel cannot be determined. Prefer this over channel.
data.service_fee_rate number Service fee rate applied
data.service_fee_rate_str string Service fee rate as an exact decimal string
data.service_fee_amount number Service fee amount charged
data.service_fee_amount_str string Service fee amount as an exact decimal string
data.nett_amount number Net amount after fees
data.nett_amount_str string Net amount as an exact decimal string
data.rrn string/null Retrieval Reference Number (if available)
data.status string Payment status: "success"
data.payment_at string/null Payment completion timestamp (ISO 8601), null if not yet paid
data.customer_info.customer_name string Value of customer_name from the request
data.customer_info.product_name string Value of product_name from the request
data.customer_info.company_name string Value of company_name from the request. Present only when it was sent.
data.payer_info object Payer details. Only sent to merchants enabled for it during onboarding; the field is absent for everyone else. Always holds payer_name, payer_pan, payer_issuer_code and payer_issuer_name; a key is null when the payment channel does not provide it (for example virtual accounts, or a payment confirmed through a status check).

Example Payload

{
  "event": "payment.v2.completed",
  "timestamp": "2024-12-18T16:21:07+07:00",
  "data": {
    "transaction_id": "9a69c494-6f37-400d-ba57-d5f69ff1bf8c",
    "payment_channel": "VA_BCA",
    "merchant_transaction_id": "RLP0000000000",
    "created_at": "2024-12-18T16:21:07+07:00",
    "amount": "10000.00",
    "currency": "IDR",
    "channel": "BCA",
    "service_fee_rate": 0.00,
    "service_fee_rate_str": "0.00",
    "service_fee_amount": 0.00,
    "service_fee_amount_str": "0.00",
    "nett_amount": 10000.00,
    "nett_amount_str": "10000.00",
    "rrn": "1811317515",
    "status": "success",
    "payment_at": "2024-12-18T16:21:05+07:00",
    "customer_info": {
      "customer_name": "John Doe",
      "product_name": "Deposit Now",
      "company_name": "PT Maju Jaya"
    },
    "payer_info": {
      "payer_name": "BUDI SANTOSO",
      "payer_pan": "9360053512345678901",
      "payer_issuer_code": "93600535",
      "payer_issuer_name": "SeaBank"
    }
  }
}