Payment flow & statuses
What happens to a payment from creation to settlement, and what your system should do at each step.
Payment methods #
| method | What the payer does | Notes |
|---|---|---|
| fpx | Chooses their bank on the FPX list and approves in online banking. | Personal and business accounts of Malaysian banks. |
| duitnow_qr | Scans a DuitNow QR code with any banking or e-wallet app. | Works with most Malaysian banking apps and e-wallets. |
Amounts are in Malaysian ringgit (MYR), from 1.00 to 30000.00. Each method must be enabled for your account. Your rates are shown in the dashboard under Settings → General.
Statuses #
| status | Meaning | What you do |
|---|---|---|
| processing | AegisPay is still confirming the payment with the bank network. Rare and brief. | Retry the create with the same Idempotency-Key, or poll GET /v1/payments/{id}. |
| pending | Created. Waiting for the payer. checkout_url is set. | Send the payer to checkout_url. Wait. |
| succeeded | Paid and confirmed with the bank network. Final. | Fulfil the order. |
| expired | The payer didn't pay before expires_at. | Don't fulfil. Offer a new payment (new merchant_reference). |
| failed | The bank network refused to create it. Final. | Create a new payment with a new merchant_reference. |
A late payment can still succeed. If the bank confirms a payment after it was marked
expired, it moves to succeeded and you get a payment.succeeded webhook. Make sure your order system can handle that (fulfil it, or refund it).Lifecycle #
POST /v1/payments
│
▼
processing ──(bank network refused)──► failed
│
▼
pending ──(payer pays, bank confirms)──► succeeded ◄─┐
│ │ late bank confirmation
└──(no payment before expires_at)──► expired ────────┘Checkout and return #
checkout_urlis an AegisPay link. Redirect the payer's browser to it, or show it as a button. It works only while the payment ispendingand not expired.- After paying (or cancelling), the payer is redirected to your
return_urlwith the payment ID added:
text
https://shop.example.com/orders/1001/return?aegis_payment_id=pay_7Hq2xK9mN4pR8sT1The return redirect is not proof of payment. Anyone can open that URL. On your return page, look the payment up with
GET /v1/payments/{id} (signed and verified) or wait for the webhook, and only then show "paid".Fees and money #
- Every payment shows
feeandnet_amount(amount − fee). The fee is fixed when the payment is created. - Succeeded payments add
net_amountto your pending balance. After the hold period it becomes available. - Available money is paid to your verified bank account. Track it under Payouts in the dashboard.
When to fulfil an order #
Fulfil only when both are true:
- You received a verified
payment.succeededwebhook, or a verifiedGET /v1/payments/{id}response sayssucceeded. - Its
amount,currencyandmerchant_referencematch your order.
See Webhooks for a complete handler.