Merchant API
Merchant Information Query
Call this API to query merchant information, including: balance, merchant name, etc.
- Request Method: GET
- API Path: http://[API Domain]/api/v1/mch/info
- Request Example: http://[API Domain]/api/v1/mch/info?mch_id=[Merchant ID]&sign=[Signature]
- Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| mch_id | number | Yes | Merchant ID, note this parameter is also signed |
| nonce | string | Yes | Random string, at least 6 characters |
| timestamp | number | Yes | UNIX timestamp, 10 digits |
| sign | string | Yes | Parameter signature. See Signature Algorithm |
- Response:
| Parameter Name | Type | Description |
|---|---|---|
| id | number | Merchant ID |
| name | string | Merchant Name |
| created_at | string | Merchant Creation Time |
Response Example:
json
{
"code": 200,
"payload": {
"id": 20,
"name": "Demo Merchant",
"created_at": "2022-11-22 17:37:52"
}
}Merchant Balance Query
Call this API to query the merchant's balance
- Request Method: GET
- API Path: http://[API Domain]/api/v1/mch/balance
- Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| mch_id | number | Yes | Merchant ID, note this parameter is also signed |
| currency | string | Yes | Currency code, see System Currency Codes |
| nonce | string | Yes | Random string, at least 6 characters |
| timestamp | number | Yes | UNIX timestamp, 10 digits |
| sign | string | Yes | Parameter signature. See Signature Algorithm |
- Response:
| Parameter | Description |
|---|---|
| balance | Merchant Balance |
Response Example:
json
{
"code": 200,
"payload": {
"balance": 23456
}
}