Skip to main content

API INQUIRY BALANCE

smilepayz teamsAbout 2 min

Request

The Balance Inquiry API enables merchants to retrieve real-time account balance information.

Request Path:

sandbox: https://sandbox-gateway.smilepayz.com/v2.0/inquiry-balance
production: https://gateway.smilepayz.com/v2.0/inquiry-balance

Header Parameters

FieldRequiredTypeDescription
Content-TypeMStringHTTP content type specification
Fixed value: application/json
Required for proper request parsing
X-TIMESTAMPMStringISO 8601 datetime format with timezone offset
Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Example: 2020-12-17T10:55:00+07:00
Note: Must be current server time within ±5 minutes
X-SIGNATUREMStringDigital signature for request authentication.
See Signature Generation
X-PARTNER-IDMStringUnique merchant identifier assigned by the platform
Format: Alphanumeric string
Used for merchant authentication and transaction routing
Please enter merchantID

Body Parameters

FieldRequiredTypeDescription
accountNoMString(128)Merchant account identifier for balance inquiry
Format: Alphanumeric string
Maximum length: 128 characters
Used to identify the specific account for balance retrieval
balanceTypesMList(String)Balance type specifications to retrieve
Format: Array of predefined balance type codes
Default: ["BALANCE"]
Examples: BALANCE, AVAILABLE

Important Notes

1. Sandbox Environment: accountNo uses randomly generated string values for testing purposes
2. Production Environment: accountNo can 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 Header – Balance Inquiry Request:

POST {Base URL}/v2.0/inquiry-balance HTTP/1.2

Content-type: application/json
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 20001

Response

HTTP Request

FieldRequiredTypeDescription
Content-TypeMStringHTTP response content type specification
Fixed value: application/json
Indicates JSON response format
X-TIMESTAMPMStringISO 8601 datetime format with timezone offset
Format: yyyy-MM-ddTHH:mm:ss±HH:mm
Example: 2020-12-17T10:55:00+07:00

Response Body

FieldRequiredTypeDescription
codeMStringAPI response status code indicating operation result
Format: Two-digit string
Success: "00", Error: Other codes
Used for programmatic response handling
messageMStringHuman-readable response status description
Format: UTF-8 encoded string
Provides detailed information about the operation result
accountInfosMBalanceAccountsAccount balance information container
Contains balance type, amount, and available balance details
See BalanceAccounts Model
accountNoOStringOriginal account identifier for reference
Format: Same as request accountNo
Used for account verification and tracking
balanceTypesOListRequested balance types that were processed
Format: Array of balance type codes
Contains the balance types that were successfully retrieved
nameOStringAccount holder name for display purposes
Format: UTF-8 encoded string
Shown in balance inquiry results
additionalInfoOJsonStringAdditional account information and metadata
Format: JSON object
Contains supplementary account details when available

Example Body – Balance Inquiry Response:

Content-type: application/json 
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
Last update: