Skip to main content

Balance Inquiry

POST/v1.0/balance-inquiry.htm

This API is used to query user's DANA account balance via merchant

API Type
SNAP API
Expected Timeout
3 second
SNAP Service Code
11
Accept
application/json
Content Type
applciation/json

Content-Type
string
1 - 127 charactersRequired
Content type, value always application/json
Authorization-Customer
string
1 - 512 charactersRequired
Contains customer token, which has been obtained from binding process, refer to Apply Token API
X-TIMESTAMP
string
25 charactersRequired
Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
X-SIGNATURE
string
Required
Signature need to be generated with asymmetricSignature method
ORIGIN
string
Origin domain
X-PARTNER-ID
string
1 - 36 charactersRequired
Unique identifier for partner was generated by DANA, or known as clientId
X-EXTERNAL-ID
string
1 - 36 charactersRequired
Unique messaging reference identifier generated by merchant and should be unique within the same day
X-DEVICE-ID
string
1 - 400 charactersRequired
Device identification on which the API services is currently being accessed by the end user (customer). Sample:
  • Web Application:
    • Mozilla / 5.0 (Windows NT 10.0; Win64; x64)
    • AppleWebKit / 537.36 (KHTML, like Gecko)
    • Chrome / 75.0.3770.100
    • Safari / 537.36 OPR / 62.0.3331.99
  • Mobile Application:
    • Android:android-20013adf6cdd8123f
    • iOS: 72635bdfd223yvjm7246n sdj34hd4559393kjh42"
CHANNEL-ID
string
1 - 5 charactersRequired
Device identification on which the API services is currently being accessed by the end user (customer)

partnerReferenceNo
string
1 - 64 characters
Unique transaction identifier in partner system for each transaction.
Note: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
balanceTypes
array of string
Information of balance types to specify which balance type expected to be returned. Will return all available balance type if this parameter empty
additionalInfo
json object
Additional information
additionalInfo.accessToken
string
1 - 512 charactersRequired
Contains customer token, which has been obtained from binding process, refer to Apply Token API
POST .../v1.0/balance-inquiry.htm HTTP/1.2
Content-type: application/json
Authorization-Customer: Bearer fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
ORIGIN: www.hostname.com
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
X-DEVICE-ID: 09864ADCASA
CHANNEL-ID: 95221
{
"partnerReferenceNo":"2020102900000000000001",
"balanceTypes":["BALANCE"],
"additionalInfo":{
"accessToken" : "fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a"
}
}

Content-Type
string
1 - 127 charactersRequired
Content type, value always application/json
X-TIMESTAMP
string
25 charactersRequired
Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)

responseCode
string
7 charactersRequired
Refer to response code list
responseMessage
string
1 - 150 charactersRequired
Refer to response code list
referenceNo
string
1 - 64 characters
Transaction identifier on DANA system
partnerReferenceNo
string
1 - 64 characters
Unique transaction identifier in partner system for each transaction.
Note: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
name
string
1 - 140 charactersConditional
Customer account name
Conditional Info
Y:= Information found
accountInfos
array of json object
Account information
accountInfos.balanceType
string
1 - 70 charactersConditional
Account information of balance type to specify which balance type expected to be returned. Will return all available balance type if this parameter empty
Conditional Info
Y:= Information found
accountInfos.amount
money
Conditional
Account information of amount which include the net active amount.
Contains two sub-fields:
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
Conditional Info
Y:= Information found
accountInfos.floatAmount
money
Account information of float amount which include the inactive amount due to cut off period.
Contains two sub-fields:
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
accountInfos.holdAmount
money
Account information of hold amount which include the unusable amount due to certain type of transaction.
Contains two sub-fields:
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
accountInfos.availableBalance
money
Conditional
Account information of available balance which include the active amount that can be used for transaction.
Contains two sub-fields:
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
Conditional Info
Y:= Information found
accountInfos.ledgerBalance
money
Account information of ledger balance which include the starting balance for this day.
Contains two sub-fields:
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
accountInfos.currentMultiLateralLimit
money
Account information of current multilateral limit.
Contains two sub-fields:
1. Value: Amount, including the cents
2. Currency: Currency code based on ISO
accountInfos.registrationStatusCode
string
1 - 4 characters
Account information of customer registration status
accountInfos.status
string
1 - 4 characters
Account information of status. The values include:
  • 1 = Active Account
  • 2 = Closed Account
  • 4 = New Account
  • 6 = Restricted Account
  • 7 = Frozen Account
additionalInfo
json object
Additional information
Content-Type: application/json
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
{
"responseCode": "2001100",
"responseMessage": "Successful",
"referenceNo": "2020102977770000000009",
"partnerReferenceNo":"2020102900000000000001",
"name":"JONXXXXX",
"accountInfos": [
{
"balanceType": "BALANCE",
"amount": {
"value": "135000.00",
"currency": "IDR"
},
"floatAmount": {
"value": "0.00",
"currency": "IDR"
},
"holdAmount": {
"value": "0.00",
"currency": "IDR"
},
"availableBalance": {
"value": "135000.00",
"currency": "IDR"
},
"ledgerBalance": {
"value": "0.00",
"currency": "IDR"
},
"currentMultilateralLimit": {
"value": "0.00",
"currency": "IDR"
},
"registrationStatusCode": "0001",
"status": "0001"
}
],
"additionalInfo": {}
}

ResponseCauseSolution
2001100Successful
Success to be processed
Mark Balance Inquiry process as Success
4001100Bad Request
General request failed error
Mark Balance Inquiry process as Failed. Retry request with proper parameter
4001101Invalid Field Format
Invalid format for certain field
Mark Balance Inquiry process as Failed. Retry request with proper parameter
4001102Invalid Mandatory Field
Missing or invalid format on mandatory field
Mark Balance Inquiry process as Failed. Retry request with proper parameter
4011100Unauthorized. [reason]
General unauthorized error
Mark Balance Inquiry process as Failed. Retry request with proper parameter
4011102Invalid Customer Token
Customer token are invalid, perhaps due to token expiry
Mark Balance Inquiry process as Failed. Retry request with proper parameter
4011104Customer Token Not Found
Customer token not found in the system. This occurs on any API that requires token as input parameter
Mark Balance Inquiry process as Failed. Retry request with proper parameter
4031105Do Not Honor
Account or user status is abnormal
Mark Balance Inquiry process as Failed. Retry request with proper parameter or can contact to DANA to check the user/account status
4291100Too Many Requests
Maximum transaction limit exceeded
Mark Balance Inquiry process as Failed. Retry request periodically
5001100General Error
General error non retry-able
Mark Balance Inquiry process as Failed. Retry request periodically
5001101Internal Server Error
Unknown internal server failure, please retry the process again
Mark Balance Inquiry process as Failed. Retry request periodically
Total timeout
Total timeout, the client side does not get any responses from the server side (Can be due to network issue, server slowing down, and so on)
Do a retry maximum 3 attempts, if still fails mark Balance Inquiry process as Failed
Unexpected response (Empty field/field does not exist/undefined response code)
The server does not produce expected responses (Can be due to hardware failure, bugs, and so on)
  • If the response code prefix are 202 and 5XX, mark Balance Inquiry process as Failed
  • If empty field/field does not exist, mark Balance Inquiry process as Failed