Biller Product

Check Balance

Check Balance is a service used to check the available balance. This service is only applicable for merchants using the Deposit mechanism, as transactions are processed through direct balance deduction. For merchants using the Invoicing mechanism, this service is not required since payments are handled through an invoicing system rather than a balance-based one.

Flow

Send the required parameters in your request, and Espay Biller Product will return a response in JSON format.

API URL

Environment URL
Sandbox
https://sandbox-api.espay.id/rest/billertools/getbalance
Production
https://api.espay.id/rest/billertools/getbalance

Authorization

Every request you send must include an Authorization header using Basic Auth. Learn more about Basic Auth.

Authorization: Basic {base64(username:password)}

Headers

Key Value
Method
POST
HTTP Version
HTTP/1.1
Accept
*/*
Content-Length
<dynamic>
Content-Type
application/x-www-form-urlencoded
Authorization
Basic base64(username:password)

Request Parameters​

Parameter Type Mandatory Description
rq_uuid
String (255)
Y
Request identifier. A unique ID used to identify messages.

Format:
Sender_id + unique ID

Example:
SENDERID123ABC-DEF456
rq_datetime
String (19)
Y
Date and time of the transaction request from the merchant's server.

Format:
YYYY-MM-DD HH:MM:SS

Example:
2024-03-14 07:49:28
sender_id
String (32)
Y
Merchant identity code from Espay team.
password
String (32)
Y
Password from Espay team.
Y: Yes, O: Optional, C: Conditional

Response Parameters​

Parameter Type Mandatory Keterangan
rq_uuid
String (255)
Y
Request identifier. A unique ID used to identify messages.

Format:
Sender_id + unique ID

Example:
SENDERID123ABC-DEF456
rq_datetime
String (19)
Y
Date and time of the transaction request from the merchant's server.

Format:
YYYY-MM-DD HH:MM:SS

Example:
2024-03-14 07:49:28
error_code
String (4)
Y
Response code.

Format:
  • Success: 0000
  • Failure: XXXX
error_desc
String (128)
Y
Response description.
balance
...
...
The total amount of the deposit balance.
Y: Yes, O: Optional, C: Conditional











































Sample Request

POST /rest/billertools/getbalance HTTP/1.1
Host: sandbox-api.espay.id
Content-Length: 176
Content-Type: application/x-www-form-urlencoded
Authorization: Basic RU5TRVZBTDprVXVYUjVNUkRtcHZrY1lk
    
rq_uuid=getbalance018&
rq_datetime=2018-01-15 10:33:43&
sender_id=SENDERID&
password=p45w0rd&
signature=db420be770fef07ebdc23378456a1c6b7c6b3cd9aadef39cb2784f0bb48bf869
               
















Sample Positive Response

{
   "rq_uuid":"getbalance09",
   "rq_datetime":"2018-01-15 10:45:50",
   "error_code":"getbalance09",
   "error_desc":"2018-01-15 10:45:50",
   "balance":"16127451.00"
}
                


Sample Negative Response

{
   "rq_uuid":"getbalance018",
   "rs_datetime":"2025-10-14 13:25:10",
   "error_code":"EX",
   "error_desc":"Cannot map server service. Record not found"
}
                    


HTTP

POST /rest/billertools/getbalance HTTP/1.1
Host: sandbox-api.espay.id
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ZXNwYXktdGVzdDp0ZXN0
Content-Length: 170

rq_uuid=getbalance018&rq_datetime=2018-01-15%2010%3A33%3A43&sender_id=SENDERID&password=p45w0rd&signature=db420be770fef07ebdc23378456a1c6b7c6b3cd9aadef39cb2784f0bb48bf869
               


CURL

curl --location 'https://sandbox-api.espay.id/rest/billertools/gettransactioninfo' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic ZXNwYXktdGVzdDp0ZXN0' \
--data-urlencode 'rq_uuid=ESPAY123ABC-456DEF' \
--data-urlencode 'rq_datetime=2017-12-17 12:22:32' \
--data-urlencode 'sender_id=ESPAY' \
--data-urlencode 'password=espaypass' \
--data-urlencode 'signature=c26a2a9901941a2eefd9c529c38822fabbd470c2693d40465616fa3fd58a0b26' \
--data-urlencode 'ref_id=TX1712171209991FA'
               
Scroll to Top