Zoorya Pay Developers

Transaction lifecycle

Every status a payment can have, and what to do with each.

A payment goes through a few statuses, from the moment you create it until the customer pays, fails or gives up. Knowing them tells you what to show the customer and when it is safe to ship the order. The diagram shows the path; the table says what to do at each status.

status from Get a payment is one of:

StatusMeaningWhat you do
PENDINGCreated; waiting for the customer to pay the link, or to approve on their phone or bank.Wait for the webhook, or check again later.
SUCCESSFULMoney taken.Fulfil — but only if amount matches your order.
ERROR_PERMFailed and will not succeed if retried as is. errorDescription says why.Tell the customer; offer a new payment.
ERROR_TEMPFailed for a temporary reason.Let the customer try again.
TIMEOUTThe customer did not approve in time.Let the customer try again.
CANCELLEDThe payment was cancelled.Show the order as unpaid.
REVERSEDA successful payment was reversed.Treat the order as unpaid.

SUCCESSFUL, ERROR_PERM, ERROR_TEMP, TIMEOUT and CANCELLED are final. The webhook is sent when a payment reaches one of them.

Trying again#

A new try is a new payment: create a new link or a new C2B Direct payment with a new externalUniqueId. Each payment has its own paymentId — keep the latest one against the order and confirm with it.