Skip to main content

Query Balance

⚠️ This API uses the GET method, but the original documentation describes the parameters as a request body (request_id, balance_type, ...) — according to the general convention on the Security page, the GET method requires signing on the alphabetically sorted query string, not a JSON body. Need to confirm with dev the actual way of passing parameters for this API.

Process​

Merchant calls this API to query the Merchant's balance at the time of the call.

API Information​

URL: /b2b/core/api/ext/balance/inquery

Method: GET

Request​

Main Parameters Table​

No.Field NameData TypeRequiredDescription
1request_idString✅Unique ID for each Request from MERCHANT to Baokim.
2request_timeString✅Request sent time. Format: YYYY-MM-DD H:i:s
3master_merchant_codeString✅Unique identifier for MASTER MERCHANT
4sub_merchant_codeString✅Unique identifier for SUB MERCHANT
5balance_typeNumber✅1: Estimated balance
2: Disbursement (debit) balance

Request Example​

{
"request_id": "MERCHANT050015588AXE014",
"request_time": "2025-08-11 14:41:00",
"master_merchant_code": "MERCHANTCODE_MASTER",
"sub_merchant_code": "MERCHANTCODE_SUB",
"balance_type": 2
}

Response​

Main Parameters Table​

No.Field NameData TypeRequiredDescription
1codeNumber✅Baokim error code
2messageString✅Baokim error code message
3dataObject✅Data returned by Baokim

data Information​

No.Field NameData TypeRequiredDescription
1master_merchant_codeString✅Unique identifier for MASTER MERCHANT
2sub_merchant_codeString✅Unique identifier for SUB MERCHANT
3balanceNumber✅Balance
4created_atDateTime✅Created date
5updated_atDateTime✅Updated date

Response Example​

{
"code": 100,
"message": "Success",
"data": {
"master_merchant_code": "MERCHANTCODE_MASTER",
"sub_merchant_code": "MERCHANTCODE_SUB",
"balance": 100000000,
"created_at": "2025-12-01 12:00:00",
"updated_at": "2025-12-01 12:00:00"
}
}

Error Codes​

Error CodeDescription
100Success
11Failed
401Merchant verify failed
422Validation error