API INQUIRY BALANCE
API inquiry saldo wilayah USDT (USDT).
Request
The Balance Inquiry API enables merchants to retrieve real-time account balance information for their Smilepayz accounts. This API provides detailed balance information for different account types including pay-in and pay-out accounts.
Request Path:
sandbox:
https://sandbox-gateway.smilepayz.com/v2.0/inquiry-balance
production:https://gateway.smilepayz.com/v2.0/inquiry-balance
Header Parameters
| Field | Required | Type | Description |
|---|---|---|---|
| Content-Type | M | String | application/json request body. |
| X-TIMESTAMP | M | String | Datetime with zone offset, format yyyy-MM-ddTHH:mm:ss±HH:mm |
| X-SIGNATURE | M | String | Signature of JSON body (see product Signature doc). |
| X-PARTNER-ID | M | String | Your merchantID |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
| accountNo | M | String(128) | Settlement accountNo if gateway returns it. |
| balanceTypes | M | List(String) | Balance type specifications to retrieve Format: Array of predefined balance type codes Default: ["BALANCE"] Examples: BALANCE Used to specify which balance types to query |
Important Notes
1. Sandbox Environment:
accountNouses randomly generated string values for testing purposes
2. Production Environment:accountNocan be retrieved from the merchant backend system.
See How to Get Production Account Number
3. Pay-In Account: Used for collecting funds from all incoming payment transactions
4. Pay-Out Account: Used for processing disbursement and withdrawal transactions
5. Account Transfers: Balances can be transferred between different account types.
Example Body – Balance Inquiry Request:
Content-type: application/json
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 20001
{
"accountNo": "21120030202403071031",
"balanceTypes": [
"BALANCE"
]
}
Response
HTTP Response
| Field | Required | Type | Description |
|---|---|---|---|
| Content-Type | M | String | application/json response or callback body. |
| X-TIMESTAMP | M | String | Datetime with zone offset, format yyyy-MM-ddTHH:mm:ss±HH:mm |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
| code | M | String | 00 success, other values error. |
| message | M | String | UTF-8 human-readable result line. |
| accountNo | O | String | Settlement accountNo if gateway returns it. |
| name | O | String | Beneficiary full name (UTF-8). |
| balanceTypes | O | Array | Requested balance type specifications Format: Array of predefined balance type codes Examples: ["BALANCE"] Indicates which balance types were queried |
| accountInfos | M | Object | Detailed balance information container Contains comprehensive balance details for the specified account |
| balanceType | M | String | Type of balance being reported Format: Predefined balance type codes Examples: BALANCE Indicates the specific balance category |
| amount | M | Object | Amount |
| currency | M | String | Fixed to USDT. |
| value | M | String | Balance amount as string value Format: String representation of numeric value Example: "250000" represents USDT 250000 Used for precise balance representation |
| availableBalance | M | Object | Available balance for transactions Contains currency and value information May differ from total balance due to holds or restrictions See see Money model |
| currency | M | String | Fixed to USDT. |
| value | M | String | Available balance amount as string value Format: String representation of numeric value Example: "250000" represents USDT 250000 Used for precise available balance representation |
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"code": "00",
"message": "Successful",
"accountNo": "21120030202403071031",
"name": "Sandbox Test",
"balanceTypes": [
"BALANCE"
],
"accountInfos": {
"balanceType": "BALANCE",
"amount": {
"currency": "USDT",
"value": "250000"
},
"availableBalance": {
"currency": "USDT",
"value": "250000"
}
}
}
