This section defines the standard formats, data types, and enumerations used in the Lesspay API.1. Data Types#
| Type | Description | Example |
|---|
String | UTF-8 String | "Hello" |
Integer | 32-bit signed integer | 100 |
Long | 64-bit signed integer (often used for timestamps) | 1630000000000 |
Boolean | true or false | true |
BigDecimal | Monetary amount passed as String to preserve precision | "100.00" |
2. General Rules#
Timestamp: Unless specified otherwise, all time fields use a 13-digit millisecond timestamp (e.g., 1764577927000).
Amount: Amounts must be passed as strings to avoid floating-point errors (e.g., "100.50").
URL: Must be a valid HTTP or HTTPS URL (e.g., https://example.com/callback).
3. Identifiers#
request_id: The unique identifier generated by the Merchant for a transaction request. Used for idempotency and tracking.
pay_order_id: The unique identifier generated by the Lesspay System for a transaction order. Returned in the API response.
4. Enumerations#
4.1 Order Status (order_status)#
| Integer | Value | Description |
|---|
| 0 | PENDING_CONFIRM | Order created, awaiting confirmation |
| 1 | PENDING_PAY | Order awaiting payment |
| 2 | SUCCEED | Payment successful |
| 3 | FAILED | Payment failed |
| 4 | CANCELED | Order canceled |
| 5 | REFUND | Order refunded |
| 6 | CLOSED | Order closed |
| 11 | PARTIAL_SUCCESS | Partial success (Payout only) |
| 12 | PAID | It has been paid, but the amount is not equal |
4.2 Payment Way Type (way_type)#
CRYPTO: Cryptocurrency Pay
BANK_TRANSFER: Bank Transfer
CARD_PAYMENT: Card Payment
4.3 Access Type (pay_access_type)#
1: Cashier (Redirects user to Lesspay checkout page)
2: OpenAPI (Direct API integration)
4.4 Currency Type (currency)#
Standard 3-letter ISO 4217 currency codes.| Code | Currency Name | Code | Currency Name |
|---|
| USD | United States Dollar | AUD | Australian Dollar |
| BTC | Bitcoin | HKD | Hong Kong Dollar |
| ETH | Ethereum | USDC | USD Coin |
| USDT | Tether | PHP | Philippine Peso |
| AED | UAE Dirham | INR | Indian Rupee |
| CNY | Chinese Yuan | IDR | Indonesian Rupiah |
4.5 Payment Channel Code (way_code)#
4.5.1 Pay In (way_code)#
| Code | Name | way_type | Supported Currencies |
|---|
BANK_TRANSFER | FomoPay | BANK_TRANSFER | AED |
CHECKOUT_CARDPAYMENT | Card Payment | CARD_PAYMENT | HKD, AUD, CNY, USD |
COIN_PAY | CoinQPay | CRYPTO | USDT, ETH, USDC |
PAY_PROTOCOL | Pay Protocol | CRYPTO | USDT |
WX_H5 | WechatPay H5 | WECHAT | HKD, AUD, CNY |
WX_NATIVE | WechatPay Native | WECHAT | HKD, AUD, CNY |
4.5.2 Pay Out (way_code)#
| Code | Name | Supported Currencies |
|---|
TAZAPAY_PAYOUT | Tazapay-Payout | PHP, INR, IDR |
Modified at 2026-01-28 12:14:06