2xx status codes denote that the requested operation was performed successfully.4xx status codes denote a client error, often due to invalid parameters or authentication issues.5xx status codes denote a server-side error with Lesspay's systems.| Status Code | Meaning |
|---|---|
200 | OK: Request successful |
400 | Bad Request: Invalid request format or parameters |
401 | Unauthorized: Invalid or missing API Key/Signature |
403 | Forbidden: You are not authorized to access the requested resource |
404 | Not Found: The requested resource does not exist |
405 | Method Not Allowed: Incorrect HTTP method (e.g., GET instead of POST) |
500 | Internal Server Error: A problem occurred on our server. Try again later |
503 | Service Unavailable: The service is temporarily offline for maintenance |
code field indicates the business result. The msg field provides a human-readable explanation.| Code | Description | Suggestion |
|---|---|---|
0 | Success | Request was successful. |
10 | System Exception | Lesspay internal error. Please contact support or retry later. |
11 | Parameter Error | Check required fields and data formats. The msg will contain details. |
12 | Database Service Exception | Transient data error. Retry the request or contact support. |
1201 | Duplicate Data Exists | The request_id or another unique field already exists. Do not retry with the same ID. |
1202 | Data Not Found | Unable to find the target order/resource. Verify the pay_order_id or request_id. |
5000 | Create Failed | Order creation failed due to a business rule. Check parameters. |
5002 | Update Failed | Failed to update order. The order may be in an non-updatable state. |
5003 | Record Not Found | The specified record does not exist. |
5004 | Permission Error | The current API credentials do not have permission for this operation. |
9999 | Custom Business Error | A general business logic error. The msg field contains specific details. |
/api/global/v1/pay/query-order endpoint.msg Value | Description | Suggestion |
|---|---|---|
mchOrderNo and payOrderId cannot be empty at the same time | Neither request_id nor pay_order_id was provided. | Provide at least one of these query parameters. |
Order does not exist | No order found matching the provided identifiers. | Verify request_id or pay_order_id is correct. |
Request time error | The start_time >= end_time, or the time span exceeds 7 days. | Ensure start_time < end_time and the range is ≤ 7 days. |