Payment flow & statuses

What happens to a payment from creation to settlement, and what your system should do at each step.

Payment methods #

methodWhat the payer doesNotes
fpxChooses their bank on the FPX list and approves in online banking.Personal and business accounts of Malaysian banks.
duitnow_qrScans 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 #

statusMeaningWhat you do
processingAegisPay 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}.
pendingCreated. Waiting for the payer. checkout_url is set.Send the payer to checkout_url. Wait.
succeededPaid and confirmed with the bank network. Final.Fulfil the order.
expiredThe payer didn't pay before expires_at.Don't fulfil. Offer a new payment (new merchant_reference).
failedThe 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_url is an AegisPay link. Redirect the payer's browser to it, or show it as a button. It works only while the payment is pending and not expired.
  • After paying (or cancelling), the payer is redirected to your return_url with the payment ID added:
text
https://shop.example.com/orders/1001/return?aegis_payment_id=pay_7Hq2xK9mN4pR8sT1
The 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 fee and net_amount (amount − fee). The fee is fixed when the payment is created.
  • Succeeded payments add net_amount to 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.succeeded webhook, or a verified GET /v1/payments/{id} response says succeeded.
  • Its amount, currency and merchant_reference match your order.

See Webhooks for a complete handler.