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
- Missing
Authorizationheader - Invalid API key
- Expired token
Validation Errors
- Invalid field values
- Missing required fields
- Format constraints not met
Not Found Errors
- 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,EASYPAISAis 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.
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
- Always check the status code first to determine the error type
- Log the complete error response for debugging
- Parse the
detailfield for user-friendly error messages - Implement retry logic for transient errors (5xx status codes)
- Handle validation errors by displaying specific field errors to users