Balance
Request
API URL: /merchant/v2/{GUID}/balance
Note
{GUID} Obtained from the merchant backend (API Docking -> GUID)
✅ Required ⭕ Optional ❌ Not used
Header | Content | Description |
---|---|---|
Content-Type | text/plain | |
X-Transaction-Signature | {transaction_signature} | Please refer to Transaction Signature |
Param | Type | Required | Sign | Description |
---|---|---|---|---|
user_id | String | ✅ | ✅ | Merchant identification |
balance_mode | Integer | ⭕ | ❌ | 0 = Return total balance(Default) 1 = Return available balance 2 = Return total balance and available balance |
timestamp | Integer | ✅ | ✅ | Request timestamp (10 digits), If the time difference is allowed to be 5 seconds, it will fail. |
sign | String | ✅ | ❌ | Signature string. Please refer to Data Signature and Verification |
Response
Param | Type | Required | Sign | Description |
---|---|---|---|---|
user_id | String | ✅ | ✅ | Merchant identification |
PHP | Array | ⭕ | ❌ | Display channels and balances on them (Please refer to Response Example) |
sign | String | ✅ | ❌ | Signature string. Please refer to Data Signature and Verification |
Response Example
- balance_mode = 0
- balance_mode = 1
- balance_mode = 2