code to determine success or failure.
Response Structure
| Field Name | Type | Description |
|---|---|---|
| code | number | Status code. 0 = success; non-0 = failure |
| msg | string | Description message (multilingual, see notes below) |
| data | object/array/string | Response data (only returned on success; some interfaces may return an encrypted string) |
Basic Examples
Success response:Multilingual Support
Themsg field supports multilingual responses, controlled via the Language request header:
| Header Value | Response Language | Notes |
|---|---|---|
zh_CN | Chinese (Simplified) | Chinese Simplified |
en_US | English | English |
| Not provided or other | English (default) | Default English |
Special Cases
1. List Interfaces
Thedata of list interfaces is an object containing a list array:
2. Card Privacy Information Interface
The responsedata is an encrypted string, which the merchant must decrypt using MerchantEncryptUtil:
3. Parameter Validation Failure
When parameter validation fails,msg is prefixed with the snake_case field name in the format field_name validation message.
Examples:
cardholder_no invalid parameter— Required field validation failed.phone_code invalid parameter— Country code format error or contains a+sign.city only supports English input— Address field English validation failed.address_info.city invalid parameter— Nested object field validation failed.
HTTP Status Codes
| HTTP Status Code | Description |
|---|---|
| 200 | Request succeeded (check code field to determine business outcome) |
| 400 | Request format error or invalid parameters |
| 401 | Authentication failed (Api-Key / Access-Token invalid) |
| 403 | Access forbidden (IP not in whitelist, etc.) |
| 404 | Resource not found |
| 500 | Server error |
Error Code Ranges
| Range | Description |
|---|---|
| 1xxx | Common exceptions, permission exceptions, authentication exceptions, PCI-related |
| 2xxx | Member/cardholder-related exceptions |
| 3xxx | Account and transfer-related exceptions |
| 4xxx | Card, card transaction, and card privacy-related exceptions |
Field Name Conventions
All JSON field names are in snake_case (consistent with interface parameters). Examples:cardholder_no— Cardholder order numbercard_last_no— Last four digits of card numbertotal_balance— Total account balanceconsume_no— Consumption order number
