Skip to main content

Error Response Format

All errors follow the RFC 7807 Problem Details specification:

HTTP Status Codes

OK
Request successful
Created
Resource created successfully
Bad Request
Invalid request parameters or malformed request body
Unauthorized
Missing or invalid authentication credentials
Not Found
Requested resource not found
Unprocessable Content
Request validation failed or business logic error

Common Error Scenarios

Authentication Errors

Causes:
  • Missing Authorization header
  • Invalid API key
  • Expired token

Validation Errors

Causes:
  • Invalid field values
  • Missing required fields
  • Format constraints not met

Not Found Errors

Causes:
  • Invalid transaction reference
  • Resource doesn’t exist
  • Unauthorized access to resource

Payment-Specific Errors

Insufficient Balance

Payment Channel Disabled

Waypay can enable or disable a payment channel for your merchant account, separately for deposits and withdrawals. A new order on a disabled channel is rejected before anything is created or charged:
  • Deposits are matched on the wallet you request (paymentMethod / walletProvider).
  • Withdrawals are matched on the beneficiary’s wallet (customerRef.bankCode). For example, EASYPAISA is an Easypaisa withdrawal.
  • Orders accepted before a channel was disabled are not affected. They complete normally and still send webhooks.
  • Re-sending an order you already submitted, with the same Idempotency-Key, returns that order’s result instead of this error.
  • Do not retry this error. Contact support to have the channel enabled.
On POST /Payment/deposit, if the channel is disabled while your order is being placed, you can also see this code as walletChargeInfo.errorCode.

Invalid Mobile Number

Transaction Already Refunded

Best Practices

  1. Always check the status code first to determine the error type
  2. Log the complete error response for debugging
  3. Parse the detail field for user-friendly error messages
  4. Implement retry logic for transient errors (5xx status codes)
  5. Handle validation errors by displaying specific field errors to users