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_idStringUnique ID for each Request from MERCHANT to Baokim.
2request_timeStringRequest sent time. Format: YYYY-MM-DD H:i:s
3master_merchant_codeStringUnique identifier for MASTER MERCHANT
4sub_merchant_codeStringUnique identifier for SUB MERCHANT
5balance_typeNumber1: 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
1codeNumberBaokim error code
2messageStringBaokim error code message
3dataObjectData returned by Baokim

data Information

No.Field NameData TypeRequiredDescription
1master_merchant_codeStringUnique identifier for MASTER MERCHANT
2sub_merchant_codeStringUnique identifier for SUB MERCHANT
3balanceNumberBalance
4created_atDateTimeCreated date
5updated_atDateTimeUpdated 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