1. Pay In
Lesspay2.0
  • LESSPAY2 API Reference
    • Get started
    • Authentication
    • Parameter Specifications
    • Pay In
      • Overview
      • Development Guidelines
      • Local Payment Methods (LPMs)
      • Error Codes
      • Card payment
        • Card Payment
        • 3D Secure (3DS) Configuration
        • Fraud & Dispute Webhook Notifications
      • API List
        • Create Payin
        • Fetch Payin
      • Webhook
        • Payin webhook
    • Pay Out
      • Overview
      • Development Guidelines
      • Multiple Transfer Methods
      • Error Codes
      • API List
        • Create Payout
        • Payout Supported Banks
        • Fetch Payout
      • Webhook
        • Payout webhook
  1. Pay In

Error Codes

Lesspay uses conventional HTTP response codes along with business-level error codes in the JSON response to indicate the success or failure of an API request.
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.

HTTP Status Codes#

Status CodeMeaning
200OK: Request successful
400Bad Request: Invalid request format or parameters
401Unauthorized: Invalid or missing API Key/Signature
403Forbidden: You are not authorized to access the requested resource
404Not Found: The requested resource does not exist
405Method Not Allowed: Incorrect HTTP method (e.g., GET instead of POST)
500Internal Server Error: A problem occurred on our server. Try again later
503Service Unavailable: The service is temporarily offline for maintenance

Business Error Codes#

In the JSON response body, the code field indicates the business result. The msg field provides a human-readable explanation.
CodeDescriptionSuggestion
0SuccessRequest was successful.
10System ExceptionLesspay internal error. Please contact support or retry later.
11Parameter ErrorCheck required fields and data formats. The msg will contain details.
12Database Service ExceptionTransient data error. Retry the request or contact support.
1201Duplicate Data ExistsThe request_id or another unique field already exists. Do not retry with the same ID.
1202Data Not FoundUnable to find the target order/resource. Verify the pay_order_id or request_id.
5000Create FailedOrder creation failed due to a business rule. Check parameters.
5002Update FailedFailed to update order. The order may be in an non-updatable state.
5003Record Not FoundThe specified record does not exist.
5004Permission ErrorThe current API credentials do not have permission for this operation.
9999Custom Business ErrorA general business logic error. The msg field contains specific details.

Fetch Payin API Error Codes#

Specific errors for the /api/global/v1/pay/query-order endpoint.
msg ValueDescriptionSuggestion
mchOrderNo and payOrderId cannot be empty at the same timeNeither request_id nor pay_order_id was provided.Provide at least one of these query parameters.
Order does not existNo order found matching the provided identifiers.Verify request_id or pay_order_id is correct.
Request time errorThe start_time >= end_time, or the time span exceeds 7 days.Ensure start_time < end_time and the range is ≤ 7 days.

Modified at 2025-12-19 04:05:40
Previous
Local Payment Methods (LPMs)
Next
Card Payment
Built with