{
"type": "https://httpstatuses.com/400",
"title": "Bad Request",
"status": 400,
"errorCode": "E900",
"detail": "Validation failed",
"instance": "https://api.onekhusa.com/sandbox/v1/collections/getTransaction",
"errors": [
"Merchant Account Number should be 8 numbers only.",
"Merchant Account Number is incorrect format",
"Transaction Reference Number should be exact 12 characters."
]
}
| Field | Description |
|---|---|
type | Stable URI that identifies the error category. |
title | Short summary of the error. |
status | HTTP status code. |
errorCode | Error code indicating the specific validation, authorization, or system error as defined in the Error Codes table below |
detail | Human-readable explanation. |
instance | Path or resource that triggered the issue. |
errors | Field-level validation details (when available). |
HTTP Responses
| Status | Name | Description |
|---|---|---|
200 | OK | The request succeeded and the response contains the expected payload. |
201 | Created | OneKhusa created the requested resource, such as a transaction or payout. |
202 | Accepted | OneKhusa accepted the request and queued it for further processing. Notification will be sent through email and/or webhook when process is complete. |
204 | No Content | The request succeeded and no response body is returned (for example, querying/retrieving a transaction which does not exist) |
400 | Bad Request | The request payload malformed due to business validation rules implemented in OneKhusa. |
401 | Unauthorized | The supplied OneKhusa credentials were missing, expired, or invalid. |
402 | Request Failed | The request was well-formed but OneKhusa could not complete it due to business rule validation. |
403 | Forbidden | The authenticated principal lacks permission to call this OneKhusa endpoint. |
404 | Not Found | The referenced OneKhusa resource could not be located. |
409 | Conflict | The request conflicts with the current state of the resource (for example, duplicate idempotency key). |
424 | External Dependency Failed | OneKhusa could not complete the request because a downstream provider returned an error. |
429 | Too Many Requests | The rate limit for this API key or tenant was exceeded; retry with exponential backoff. |
500, 502, 503, 504 | Server Errors | OneKhusa encountered an unexpected error; retries usually succeed once the service stabilizes. |
Generic Error Codes
| Error Code | Description |
|---|---|
E900 | Validation error occurred |
E901 | Unauthorized access to the requested resource |
E902 | The request is forbidden |
E903 | The requested resource cannot be found |
E904 | Request timeout |
E905 | Too many requests sent per merchant account |
E906 | Cache service is not available |
E907 | Duplicated idempotency key or failed to store idempotency data |
E950 | Something went wrong on our side, we are fixing it |
E951 | Service currently under maintenance |
E952 | Service unavailable |
E953 | API gateway timeout |
Note that in case of funds transfer errors, response code value will be set under error code.