Balance Inquiry
Balance Inquiry
To request balance inqury, you will need to hit this API through your Backend:
Direct API - Direct Debit Balance Inquiry
API Request
Type | Value | Description |
---|---|---|
HTTP Method | POST | |
API endpoint (Sandbox) | https://api-sandbox.doku.com/direct-debit/[acquirer-name]/v1.0/balance-inquiry | Possible Values for [acquirer-name] : ovo, cimb, allobank, bri |
API endpoint (Production) | https://api.doku.com/direct-debit/[acquirer-name]/v1.0/balance-inquiry | Possible Values for [acquirer-name] : ovo, cimb, allobank, bri |
Here is the sample of request header to perform Account Binding:
X-PARTNER-ID: MCH-0001-10791114622547
X-EXTERNAL-ID: 1684987418452706687
X-TIMESTAMP: 2023-01-27T15:58:59+07:00
X-IP-ADDRESS: 192.168.23.23
X-DEVICE-ID: 912f12e223624d2e94828b1681992be3
X-SIGNATURE: hMac123234nsjkdfhajnkssfhgjklsfsdfdfgdfgdfg124dfgfgh
Request Header Explanation
Parameter | Description |
---|---|
X-PARTNER-ID | Unique ID for a partner (DOKU'S Client ID) |
X-EXTERNAL-ID | Numeric String. Reference number that should be unique in the same day (request-id) |
X-TIMESTAMP | Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format |
X-IP-ADDRESS | IP address of the end user (customer) using IPv4 format. Notes: Mandatory for Allobank (Min:10, Max:15), Optional for rest of acquirer |
X-SIGNATURE | algoritma symmetric signature HMAC_SHA512 (clientSecret, stringToSign) with formula stringToSign = HTTPMethod +โ:โ+ EndpointUrl +":"+ AccessToken +":โ+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":โ + TimeStamp |
Here is the sample of request body for Balance Inquiry :
{
"bankCardToken": "78b7b881c207a079d6338033365dfb28"
}
Request Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
bankCardToken | string | Mandatory | Customer's token obtained from binding process |
API Response
After hitting the above API request, DOKU will give the response.
Type | Value |
---|---|
HTTP Status | 201 |
Result | CREATED |
Here is the sample response header:
X-PARTNER-ID: MCH-0001-10791114622547
X-EXTERNAL-ID: 1684987418452706687
X-TIMESTAMP: 2023-01-27T15:58:59+07:00
X-IP-ADDRESS: 192.168.23.23
X-DEVICE-ID: 912f12e223624d2e94828b1681992be3
X-SIGNATURE: hMac123234nsjkdfhajnkssfhgjklsfsdfdfgdfgdfg124dfgfgh
Response Header Explanation
Parameter | Description |
---|---|
X-PARTNER-ID | Unique ID for a partner (DOKU'S Client ID) |
X-EXTERNAL-ID | Numeric String. Reference number that should be unique in the same day (request-id) |
X-TIMESTAMP | Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format |
X-IP-ADDRESS | IP address of the end user (customer) using IPv4 format. Notes: Mandatory for Allobank (Min:10, Max:15), Optional for rest of acquirer |
X-SIGNATURE | algoritma symmetric signature HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +โ:โ+ EndpointUrl +":"+ AccessToken +":โ+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":โ + TimeStamp |
Here is the sample of response body:
1. OVO
{
"responseCode": "2001100",
"responseMessage": "Request has been processed successfully",
"accountInfo": [
{
"balanceType": "Cash",
"amount": {
"value": "200000.00",
"currency": "IDR"
},
"floatAmount": {
"value": "50000.00",
"currency": "IDR"
},
"holdAmount": {
"value": "20000.00",
"currency": "IDR"
},
"availableBalance": {
"value": "130000.00",
"currency": "IDR"
},
"ledgerBalance": {
"value": "30000.00",
"currency": "IDR"
},
"currentMultilateralLimit": {
"value": "10000.00",
"currency": "IDR"
},
"registrationStatusCode": "0001",
"status": "0001"
},
{
"balanceType": "Points",
"amount": {
"value": "200000.00",
"currency": "IDR"
},
"floatAmount": {
"value": "50000.00",
"currency": "IDR"
},
"holdAmount": {
"value": "20000.00",
"currency": "IDR"
},
"availableBalance": {
"value": "130000.00",
"currency": "IDR"
},
"ledgerBalance": {
"value": "30000.00",
"currency": "IDR"
},
"currentMultilateralLimit": {
"value": "10000.00",
"currency": "IDR"
},
"registrationStatusCode": "0001",
"status": "0001"
}
]
}
Response Balance Inquiry Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
responseCode | string (7) | Mandatory | Response code as defined in SNAP Regulation |
responseMessage | string (150) | Mandatory | Response message as defined in SNAP Regulation |
accountInfo | string (64) | Optional | |
accountInfo.balanceType | string (70) | Optional | Account type name (CASH/POINT) |
accountInfo.floatAmount | object | Optional | |
accountInfo.floatAmount.value | Numeric (16,2) | Conditional | Amount of deposit that is not effective yet (due to holiday, etc.). balance of this type of account, ends with decimal .00 |
accountInfo.floatAmount.currency | string (3) | Conditional | IDR |
accountInfo.holdAmount | object | Optional | |
accountInfo.holdAmount.value | Numeric (16,2 | Conditional | balance of Hold amount that cannot be used, ends with decimal .00 |
accountInfo.holdAmount.currency | string (3) | Conditional | IDR |
accountInfo.availableBalance | object | Optional | |
accountInfo.availableBalance.value | Numeric (16,2 | Mandatory | Customer's auth code |
accountInfo.availableBalance.currency | string(128) | Mandatory | Customer's auth code |
accountInfo.ledgerBalance | string(128) | Mandatory | Customer's auth code |
accountInfo.ledgerBalance.value | string(128) | Mandatory | Customer's auth code |
accountInfo.ledgerBalance.currency | string(128) | Mandatory | Customer's auth code |
accountInfo.currentMultilateralLimit | string(128) | Mandatory | Customer's auth code |
accountInfo.currentMultilateralLimit.value | string(128) | Mandatory | Customer's auth code |
accountInfo.currentMultilateralLimit.currency | string(128) | Mandatory | Customer's auth code |
registrationStatusCode | string(128) | Mandatory | Customer's auth code |
status | string(128) | Mandatory | Customer's auth code |
2. Allo Bank
{
"responseCode": "2001100",
"responseMessage": "Successful",
"accountInfos": [
{
"balanceType": "balance",
"amount": {
"value": "1916427.00",
"currency": "IDR"
}
},
{
"balanceType": "point",
"amount": {
"value": "0",
"currency": "IDR"
}
},
{
"balanceType": "paylater",
"amount": {
"value": "50000000.00",
"currency": "IDR"
}
}
]
}
Response Balance Inquiry Notification Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
responseCode | string (7) | Mandatory | Response code as defined in SNAP Regulation |
responseMessage | string (150) | Mandatory | Response message as defined in SNAP Regulation |
accountInfo | object | Optional | |
accountInfo.balanceType | string | Optional | Account type name (CASH/POINT) |
accountInfo.amount | object | Optional | Available balance type in user's account (BALANCE, POINT, PAYLATER) |
accountInfo.amount.value | Numeric (16,2) | Conditional | balance of this type of account, ends with decimal .00 |
accountInfo.amount.currency | string (3) | Conditional | IDR |