Skip to main content

Error Handling

If an error occurs, the API returns an appropriate HTTP status code along with an error message in the response body.


HTTP Status Codes

Status CodeDescription
400Bad request
401Unauthorized access
404Transaction not found
500Internal server error

Application-level Errors

Pay-in, pay-out, remittance, and card APIs also return business status codes in the JSON body (e.g. status: "0050"). These are distinct from HTTP status codes.

ProductStatus code reference
Pakistan wallet pay-inPay-In (wallet — PK)
Unified pay-in (BD/NP/EG/IQ)Pay-In (unified)
CardsCards
Pay-outPay-Out
RemittanceRemittance

  1. Check the HTTP status first — retry only on transient 5xx errors with backoff.
  2. Parse the JSON status and message fields for business outcomes.
  3. For async flows (non-OTP wallets, disbursements, remittances), combine API responses with webhooks and inquiry APIs for final state.
  4. Log reference, transactionId, or userKey for support escalation.