Overview#
Our API uses standard HTTP response codes to indicate the success or failure of an API request. When an error occurs, the response body will contain a JSON object structured according to IETF RFC 7807 (Problem Details for HTTP APIs).This standardized format allows you to programmatically handle errors based on stable error codes while providing human-readable details for debugging.HTTP Status Codes#
We use the following HTTP status codes to indicate the general class of the response:| Status Code | Description |
|---|
| 200 OK | The request was successful. |
| 400 Bad Request | The request was invalid (e.g., missing parameters, invalid format). |
| 401 Unauthorized | Authentication failed (e.g., API key is missing or invalid). |
| 403 Forbidden | You do not have permission to access this resource. |
| 422 Unprocessable Entity | The request was well-formed but failed business logic validation (e.g., insufficient funds). |
| 429 Too Many Requests | You have exceeded your rate limit. |
| 500 Internal Server Error | Something went wrong on our end. Please contact support with the logId. |
| 503 Service Unavailable | The service or an upstream dependency is temporarily unavailable. Please retry later. |
Error Response Structure#
In the event of an error (4xx or 5xx), the response body will follow this structure:{
"type": "https://api-doc.mce.sg/8182426m0",
"title": "Insufficient Funds",
"status": 422,
"detail": "The transaction amount (150.00) exceeds the available balance.",
"instance": "/v1.0/payment/fiat/createWithdrawal",
"code": "PAY_INSUFFICIENT_FUNDS",
"logId": "0a1b2c3d-4e5f-6789-0123-456789abcdef"
}
Field Definitions#
| Field | Type | Description |
|---|
code | String | The specific error identifier. |
detail | String | A human-readable explanation specific to this occurrence of the problem. Safe to display to your end-users. |
logId | String | Technical Support ID. A unique identifier for the specific request trace on our infrastructure. Please log this ID and provide it when contacting Technical Support. It is distinct from your business |
title | String | A short, readable summary of the problem type. |
status | Integer | The HTTP status code generated by the origin server for this occurrence of the problem. |
type | String | A URI reference that identifies the problem type and links to documentation. |
instance | String | (Optional) A URI reference that identifies the specific resource where the error occurred. |
Error Code Pattern#
Our error codes follow a semantic string pattern to help you quickly identify the source of the error.Prefix (SERVICE): Identifies the module (e.g., PAY for Payments, AUTH for Authentication).
Suffix (CODE): Identifies the specific error (e.g., INVALID_PARAM, TIMEOUT, 001).
PAY_INSUFFICIENT_FUNDS: Business logic error in the Payment module.
AUTH_TOKEN_EXPIRED: The access token has expired.
GATEWAY_TIMEOUT: Upstream service timeout.
Need Help?#
If you encounter an error that persists or is not documented, please contact our support team.Crucial: When reporting an issue, please copy the logId from the error response. This allows our engineering team to locate the logs for your specific request immediately.Modified at 2026-02-11 07:10:39