Skip to main content
Copy for LLM

Webhooks

Webhooks work exactly as they do for in-store payments: register an HTTPS endpoint, verify the signature, acknowledge quickly, deduplicate on eventId. The mechanism, the signature, and the delivery format are described in the in-store webhooks guide; this page covers what is specific to online payments.

What a delivery looks like​

{
"eventId": "evt_1a2b3c4d5e6f7a8b",
"eventType": "PAYMENT_CAPTURED",
"merchantExternalId": "your-merchant-id",
"timestamp": "2026-11-02T08:16:41Z",
"data": {
"pspReference": "BNDL7K2P9QW1ABCD",
"merchantReference": "bill-7731",
"amount": "42.50",
"currency": "SGD",
"status": "CAPTURED",
"paymentMethod": "E_WALLET",
"walletProvider": "PAYNOW",
"acquirerReference": "v1-261102081530-aa-abc123"
}
}

merchantReference is the reference you set when opening the page. A card payment carries cardSummary and cardBrand instead of walletProvider. A refund event also carries refundedAmount, the total refunded so far.

Events you will receive​

For the online lifecycle:

EventMeaningFinal?
PAYMENT_CAPTUREDThe customer paid. Fulfil the order.yes
PAYMENT_REFUSEDDeclined, and the page takes no further attempt.yes
PAYMENT_CANCELLEDWithdrawn before payment — by you, or by the customer on the page.yes
PAYMENT_EXPIREDThe page reached its expiry with nobody paying.yes
PAYMENT_ERRORA processing problem prevented a decision.yes
PAYMENT_SENT_FOR_REFUNDA full refund is at the acquirer, not yet confirmed.no
PAYMENT_REFUNDEDA refund was confirmed.—
PAYMENT_REFUND_FAILEDA refund was refused or failed.—
PAYMENT_SETTLEDThe acquirer settled the payment.—

Subscribe to the events your integration acts on. A table-ordering flow typically acts on PAYMENT_CAPTURED (send the order to the kitchen) and treats every other final event as "not paid".

An endpoint receives only the event types listed when it was registered; there is no "every event" default. To be told of every online outcome, list all of the events above, and add TEST to check the endpoint with a test delivery.

A final event is not always the last event for a payment

A payment can be paid after its page was closed — see a payment that lands after the page was closed. Your handler must accept PAYMENT_CAPTURED after PAYMENT_EXPIRED or PAYMENT_CANCELLED for the same payment, and PAYMENT_REFUNDED for a payment it never saw captured. Key every decision on the payment id (pspReference, or the id you stored), never on the bill alone: a refund of one payment under a bill does not mean the bill was refunded.

Webhooks and the return page together​

The customer's browser returns to your returnUrl at about the same time the webhook arrives. The two overlap safely: whichever reaches you first, the payment settles once. Build the return page to read the payment and wait briefly for CAPTURED, and let the webhook be the record you fulfil from — the customer may never come back to the return page at all.