Error Codes
This page documents all error codes returned by the 123hub API, along with their meanings and recommended handling strategies.Error Response Format
Error responses return HTTP 400 (or HTTP 404 for unknown methods). Theerror object contains a numeric code, a human-readable message, and optional details and context fields (both null by default).
Successful responses return HTTP 200. Error responses return HTTP 400 (most errors) or HTTP 404 (unknown method). Always check the
success field in the response body to determine whether the request succeeded or failed.Error Code Categories
Error codes are grouped into categories by their numeric range:| Range | Category | Description |
|---|---|---|
| 1xxx | System errors | Internal server errors, service unavailability, rate limits, timeouts |
| 2xxx | Method routing errors | Unknown or invalid method value in request body |
| 3xxx | Authentication errors | Signature verification, application ID, and access issues |
| 4xxx | Provider/routing errors | Provider account or route configuration issues |
| 5xxx | Limit errors | Customer or transaction limit violations |
| 6xxx | Payment errors | Payment creation, lookup, status, and amount issues |
| 7xxx | External provider errors | Errors returned by or timeouts from external payment providers |
| 8xxx | Parsing errors | Malformed request body |
| 9xxx | Validation errors | Missing or invalid field values |
Complete Error Code Reference
| Code | Message | HTTP Status | Description |
|---|---|---|---|
| 1000 | Common error | 400 | Unexpected server error |
| 1001 | Endpoint not found | 400 | The requested endpoint does not exist |
| 1002 | The method does not exist / is not available | 404 | The method field contains an unknown value |
| 1005 | Invalid request format | 400 | A required field is missing or the request is malformed |
| 1006 | Invalid Content-Type header | 400 | Content-Type must be application/json |
| 1007 | HTTP Method Not Allowed | 400 | Only POST is supported |
| 2001 | Unexpected error | 400 | An unexpected processing error occurred |
| 2002 | The payment provider is not available | 400 | No available route for the given service_id |
| 3000 | Authentication error | 400 | General authentication failure (e.g., incorrect X-Data-Hash) |
| 3001 | Missing / incorrect X-Data-Application-Id header | 400 | The X-Data-Application-Id header is missing or malformed |
| 3002 | Missing / incorrect X-Data-Hash header | 400 | The X-Data-Hash header is missing |
| 3003 | The app does not exist | 400 | No application found for the given X-Data-Application-Id |
| 3004 | The app is disabled | 400 | Your application has been disabled |
| 3005 | The app is blocked | 400 | Your application has been blocked |
| 6001 | Incorrect transaction amount | 400 | Amount is zero, negative, or otherwise invalid |
| 6002 | Incorrect currency code | 400 | Currency does not match the expected currency for the service_id |
| 6004 | Insufficient funds | 400 | Not enough balance for this withdrawal |
| 6009 | Payment already exists | 400 | Duplicate c_id for this merchant |
| 6010 | Payment does not exist | 400 | No payment found with given identifiers |
| 7001 | Error of interaction between payment provider and payment system | 400 | External provider returned an error |
| 7002 | Payment provider not available | 400 | External provider did not respond in time |
| 8801 | Current payment or operation status does not allow this action | 400 | Invalid status transition |
| 9000 | Validation error | 400 | Generic validation failure |
Error Details by Category
System Errors (1xxx)
These errors indicate problems on the server side. Most are transient and can be retried. 1000 — Common error An unexpected error occurred. Retry with exponential backoff.method field in the request body does not match any supported method. Supported methods: payment.in, payment.out, payment.status, balance.get, gateway.ping. This is the only error that returns HTTP 404 instead of 400.
details field contains a description of the issue.
application/json.
1007 — HTTP Method Not Allowed
Only POST is supported.
Routing Errors (2xxx)
2001 — Unexpected error An unexpected processing error occurred during request routing. 2002 — Payment provider not available No available route was found for the givenservice_id. This may mean the service is not configured or has been deactivated. Contact support.
Authentication Errors (3xxx)
These errors relate to theX-Data-Application-Id and X-Data-Hash headers.
3000 — Authentication error
General authentication failure. The SHA512 hash in X-Data-Hash does not match the expected value. Verify your hashing algorithm and secret key.
3001 — Missing / incorrect X-Data-Application-Id header
The X-Data-Application-Id header is missing or malformed.
3002 — Missing / incorrect X-Data-Hash header
The X-Data-Hash header is missing.
3003 — The app does not exist
No application found for the given X-Data-Application-Id.
3004 — The app is disabled
Your application has been disabled. Contact support.
3005 — The app is blocked
Your application has been blocked. Contact support.
Payment Errors (6xxx)
6001 — Incorrect transaction amount The amount is zero, negative, or otherwise invalid.service_id.
6004 — Insufficient funds
Not enough balance for this withdrawal. Check your balance using the balance.get method.
6009 — Payment already exists
A payment with the same c_id already exists for this merchant. Use a unique c_id for each payment, or query the existing payment using payment.status.
6010 — Payment does not exist
No payment was found with the provided identifiers (c_id, h_id, or p_id).
External Provider Errors (7xxx)
7001 — Provider interaction error The external payment provider returned an error. This may be transient. Retry after a delay or contact support if it persists. 7002 — Payment provider not available The external provider did not respond within the expected time. Retry the request.Status Errors (8xxx)
8801 — Invalid status transition The requested action cannot be performed because the payment is in a status that does not allow it (e.g., trying to cancel a completed payment).Validation Errors (9xxx)
9000 — Validation error Generic validation failure. Thedetails field may indicate the specific issue.
Error Handling Best Practices
Check the success field
Always check
success in the response body. Do not rely on HTTP status codes for error detection.Use request_id for debugging
Log the
request_id from every response. Include it when contacting support.Retry transient errors
Implement exponential backoff for error codes 1000, 7001, and 7002.
Validate before sending
Validate inputs client-side before making API calls to avoid 1005 and 9000 errors.
