Error Handling
Handle errors at both the API layer and transaction-result layer.
API errors
| HTTP status | Meaning | Recommended action |
|---|---|---|
400 | Validation or processing error. | Fix request fields and retry only after correcting the payload. |
401 | Missing or invalid API key. | Confirm the X-Api-Key header. |
403 | Account or permission issue. | Contact your account manager. |
500 | Processing-side error. | Retry later or contact support if it persists. |
Transaction declines
A processor decline may be returned inside a successful HTTP response.
If the API returns HTTP 200 but response_code is 200, treat the transaction as declined.
{
"order_id": "700202",
"response_code": 200,
"gateway_response_code": "202",
"gateway_response_description": "Insufficient funds"
}Postback delivery failures
Postback delivery fails when your endpoint does not return HTTP 200.
Common causes:
| Cause | Fix |
|---|---|
Endpoint returns 401 or 403 | Allow the postback request or adjust endpoint authentication. |
Endpoint returns 404 | Confirm the configured Postback URL. |
Endpoint returns 500 | Check your server logs. |
| Timeout | Return HTTP 200 quickly, then process complex work asynchronously. |
| Invalid SSL | Use a valid HTTPS certificate. |
Review delivery attempts here:
Updated 2 days ago