WiPay
Webhooks

Payments API events

Payment lifecycle events delivered to Payments API webhook endpoints.

Payments API events track the lifecycle of a payment from creation through authorisation, refunds, chargebacks, and confirmed fraud outcomes. Every event uses the shared webhook envelope, headers, signature, and retry model. Use the envelope event as the authoritative lifecycle signal.

Event catalog

EventWhen it fires
payment.createdA payment request has been created and is awaiting processing.
payment.successThe payment was authorised and captured successfully.
payment.failedThe payment was declined by the issuer or gateway.
payment.errorThe payment attempt errored before a definitive outcome (e.g. gateway timeout).
payment.chargeback_pendingA chargeback has been raised and the transaction is held pending review.
payment.chargeback_processedFunds have been taken to cover a confirmed chargeback.
payment.chargeback_releasedA pending chargeback has been released; funds are no longer held.
payment.refund_requestedA refund has been requested on a completed transaction.
payment.refundedA refund has been processed and funds returned to the payer.
payment.refund_rejectedA refund request has been rejected. meta.reason carries the decision reason.
payment.fraud_confirmedThe transaction has been confirmed as fraud and funds taken.

data payload

Payment events carry a data object with a stable core set of fields. The exact shape depends on whether WiPay already has a completed transaction for the payment. For lifecycle automation, use the envelope event as the primary signal. data.status is the general payment status, while data.status_desc provides the human-readable transaction state.

FieldTypeNotes
cardstring | nullMasked PAN, e.g. XXXXXXXXXXXX1234.
currencystringISO 4217 alpha code of the amount the merchant is charged in.
currency_creditedstringISO 4217 alpha code of the amount the merchant is credited in. May differ when cross-currency settlement applies.
customer_addressstring | nullAs supplied at request time.
customer_emailstring | nullAs supplied at request time.
customer_namestring | nullAs supplied at request time.
customer_phonestring | nullAs supplied at request time.
datastring | nullMerchant-supplied pass-through value.
datestringISO 8601 timestamp of the transaction creation.
fee_structurestringDisplay name: Customer Pay, Merchant Absorb, or Split.
hashstring | nullMerchant-supplied hash echoed back.
messagestring | nullGateway response message.
order_idstring | nullMerchant-supplied order identifier.
originstringChannel/origin label, e.g. card purchase.
receiverstringMerchant business / receiver name.
statusstringGeneral payment status. Values are pending, success, failed, error, or incomplete.
status_descstringHuman-readable transaction state. For post-authorisation lifecycle events this is often more specific than status, for example Refund Requested or Taken for Chargeback.
totalstring2-decimal amount the merchant is charged.
total_creditedstring2-decimal amount the merchant is credited.
transaction_idstringWiPay transaction reference, e.g. CB-4778D2C4.

Before WiPay has a completed transaction record for the payment (for example on an early payment.created delivery), a reduced shape is sent that omits gateway-supplied fields:

{
  "currency": "TTD",
  "data": "{\"cart_id\":\"cart_123\"}",
  "date": "2026-04-17T19:14:25+00:00",
  "fee_structure": "Customer Pay",
  "order_id": "ORDER-0001",
  "status": "pending",
  "status_desc": "Transaction Processing",
  "total": "25.00",
  "transaction_id": "CB-4778D2C4"
}

meta

meta carries context that isn't part of the payment object itself:

KeyEventsDescription
transaction_idAll payment eventsThe merchant-facing transaction reference. Always mirrored here for convenience.
previous_statusStatus-change events (payment.refund_requested, payment.refunded, payment.chargeback_pending, payment.chargeback_processed, payment.fraud_confirmed)Previous transaction-state value before the transition. Treat this as an opaque integer for correlation only; use event and data.status_desc for workflow logic.
reasonpayment.refund_rejectedHuman-readable rejection reason.

Additional metadata keys may be present on specific events. Ignore keys you do not use.

Example — payment.success

{
  "id": "3e1f9b2c-7d0a-4a68-9b74-2b4e1c9a4a1e",
  "api_family": "payments_api",
  "event": "payment.success",
  "occurred_at": "2026-04-17T19:14:25+00:00",
  "data": {
    "card": "XXXXXXXXXXXX1234",
    "currency": "TTD",
    "currency_credited": "TTD",
    "customer_address": "1 Example Avenue, Port of Spain",
    "customer_email": "jane.customer@example.com",
    "customer_name": "Jane Customer",
    "customer_phone": "+18680000000",
    "data": null,
    "date": "2026-04-17T19:14:25+00:00",
    "fee_structure": "Customer Pay",
    "hash": "9f3a8c0b1d2e4f5a6b7c8d9e0f1a2b3c",
    "message": "Approved or completed successfully",
    "order_id": "ORDER-0001",
    "origin": "card purchase",
    "receiver": "John Merchant",
    "status": "success",
    "status_desc": "Normal",
    "total": "25.00",
    "total_credited": "25.00",
    "transaction_id": "CB-4778D2C4"
  },
  "meta": {
    "transaction_id": "CB-4778D2C4"
  }
}

Example — payment.refund_requested

{
  "id": "5b2c8d4e-1a3f-4d7c-9e0b-2c4d6e8f0a1b",
  "api_family": "payments_api",
  "event": "payment.refund_requested",
  "occurred_at": "2026-04-17T20:02:11+00:00",
  "data": {
    "card": "XXXXXXXXXXXX1234",
    "currency": "TTD",
    "currency_credited": "TTD",
    "customer_email": "jane.customer@example.com",
    "customer_name": "Jane Customer",
    "date": "2026-04-17T19:14:25+00:00",
    "fee_structure": "Customer Pay",
    "message": "Approved or completed successfully",
    "order_id": "ORDER-0001",
    "origin": "card purchase",
    "receiver": "John Merchant",
    "status": "success",
    "status_desc": "Refund Requested",
    "total": "25.00",
    "total_credited": "25.00",
    "transaction_id": "CB-4778D2C4"
  },
  "meta": {
    "previous_status": 0,
    "transaction_id": "CB-4778D2C4"
  }
}

Example — payment.refund_rejected

{
  "id": "7d4e0f6a-3b5d-4c9e-a1b2-c3d4e5f60718",
  "api_family": "payments_api",
  "event": "payment.refund_rejected",
  "occurred_at": "2026-04-18T09:30:00+00:00",
  "data": {
    "card": "XXXXXXXXXXXX1234",
    "currency": "TTD",
    "currency_credited": "TTD",
    "date": "2026-04-17T19:14:25+00:00",
    "fee_structure": "Customer Pay",
    "order_id": "ORDER-0001",
    "origin": "card purchase",
    "receiver": "John Merchant",
    "status": "success",
    "status_desc": "Normal",
    "total": "25.00",
    "total_credited": "25.00",
    "transaction_id": "CB-4778D2C4"
  },
  "meta": {
    "reason": "Refund window has elapsed.",
    "transaction_id": "CB-4778D2C4"
  }
}