Customer Top Up
POST/v1.0/emoney/topup.htm
This API is used for merchant to do top up request to DANA
API Type
SNAP API
Expected Timeout
8 second
SNAP Service Code
38
Accept
application/json
Content Type
application/json
Content-type
string
1 - 127 charactersRequiredContent type, value always
application/jsonAuthorization
string
1 - 2048 charactersConditionalContains bearer JWT token, which has been obtained from Authorization Token Request API
Conditional Info
Y:= Signature option is symmetric approach
Authorization-Customer
string
1 - 512 charactersConditional- Contains customer token, which has been obtained from binding process
- If request is coming from user interaction, this field is mandatory. If not, just filled customerNumber
Conditional Info
Y:= customerNumber is not exist
X-TIMESTAMP
string
25 charactersRequiredTransaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
X-SIGNATURE
string
RequiredSignature need to be generated with
symmetricSignature or asymmetricSignature methodORIGIN
string
Origin domain
X-PARTNER-ID
string
1 - 36 charactersRequiredUnique identifier for partner was generated by DANA, or known as clientId
X-EXTERNAL-ID
string
1 - 36 charactersRequiredUnique messaging reference identifier generated by merchant and should be unique within the same day
X-IP-ADDRESS
string
15 charactersIP address of the end user (customer) using IPv4 format
X-DEVICE-ID
string
1 - 400 charactersConditionalDevice identification on which the API services is currently being accessed by the end user (customer)
Sample:
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: 72635bdfd223yvjm7246nsdj34hd455 9393kjh42
Conditional Info
Y:= Authorization Customer is exist
CHANNEL-ID
string
1 - 5 charactersRequiredDevice identification on which the API services is currently being accessed by the end user (customer)
partnerReferenceNo
string
1 - 64 charactersRequiredUnique 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
customerNumber
string
1 - 32 charactersConditionalBeneficiary customer phone number in DANA, in format 628xxx
Conditional Info
Y:= Authorization Customer is not exist
amount
money
RequiredAmount. Contains two sub-fields:
- Value: Transaction amount, including the cents
- Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue of amount. Following ISO-4217, for IDR the value includes 2 decimal digits separated with point
e.g., IDR 10.000,- will be placed with 10000.00
e.g., IDR 10.000,- will be placed with 10000.00
currency
string
1 - 3 charactersRequiredCurrency
feeAmount
money
RequiredFee amount. Contains two sub-fields:
- Value: Transaction amount, including the cents
- Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue of amount. Following ISO-4217, for IDR the value includes 2 decimal digits separated with point
e.g., IDR 10.000,- will be placed with 10000.00
e.g., IDR 10.000,- will be placed with 10000.00
currency
string
1 - 3 charactersRequiredCurrency
transactionDate
string
25 charactersTransaction date, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
sessionId
string
1 - 25 charactersSession identifier
categoryId
numeric
1 - 10 charactersCategory identifier
notes
string
1 - 255 charactersTransaction notes
additionalInfo
json object
Additional information
fundType
string
1 - 64 charactersRequiredAdditional information of top up fund type, value always
AGENT_TOPUP_FOR_USER_SETTLEexternalDivisionId
string
1 - 64 charactersAdditional information of external division identifier. (fundType:
AGENT_TOPUP_FOR_USER_SETTLE)Note
It is generally optional, but becomes mandatory if the additionalInfo.chargeTarget value is set to DIVISION.
chargeTarget
string
1 - 64 charactersAdditional information of charge target. The values are:
nullDIVISIONMERCHANT
Note
If the value is DIVISION, externalDivisionId will be Mandatory
subScenario
string
1 - 64 charactersConditionalAdditional information of sub scenario, value always
GLOBAL_REMITTANCEConditional Info
Y:= Cross border remittance scenario
extendInfo
string
1 - 4096 charactersAdditional information of extend
instructedAmountType
string
1 - 64 charactersAdditional information of type of instructed amount
payerPaymentMethod
json object
RequiredAdditional information of method of payer payment
walletDetail
json object
ConditionalInformation details of cash/wallet
Conditional Info
Y:= paymentMethodType=WALLET
walletName
string
1 - 128 charactersRequiredWallet name
customerId
string
1 - 64 charactersRequiredCustomer unique identifier assigned by participant
customerName
json object
Information details of customer name
firstName
string
1 - 32 charactersCustomer’s first name
lastName
string
1 - 32 charactersCustomer’s last name
fullName
string
1 - 128 charactersRequiredCustomer’s full name
middleName
string
1 - 32 charactersCustomer’s middle name
bankDetail
json object
ConditionalInformation details of Bank/cash
Conditional Info
Y:= paymentMethodType=BANK
accountType
string
1 - 32 charactersType of account
accountNo
string
1 - 64 charactersConditionalAccount number
Conditional Info
Y:= paymentMethodType=BANK
accountName
string
1 - 128 charactersAccount name
bankName
string
1 - 128 charactersConditionalBank name
Conditional Info
Y:= paymentMethodType=BANK
officeOpeningAccount
string
1 - 128 charactersThe Bank of account opening
swiftCode
string
1 - 16 charactersConditionalBank identifier code for cross-border financial transactions
Conditional Info
Y:= paymentMethodType=BANK
currency
string
1 - 3 charactersCurrency
iban
string
1 - 64 charactersAn international Bank account code to identify offshore Bank accounts
sourceOfFund
string
1 - 32 charactersFund source, which has values:
SALARYBUSSINESSUNKNOWN
paymentMethodType
string
1 - 32 charactersRequiredPayer’s type of payment method, which has values:
WALLETBANKCASH
bizSceneType
string
1 - 64 charactersAdditional information of type of Bizscene
transferToAmount
money
Additional information of transfer to amount. Contains two sub-fields:
- Value: Amount, including the cents
- Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue of amount. Following ISO-4217, for IDR the value includes 2 decimal digits separated with point
e.g., IDR 10.000,- will be placed with 10000.00
e.g., IDR 10.000,- will be placed with 10000.00
currency
string
1 - 3 charactersRequiredCurrency
transferFromAmount
money
Additional information of transfer from amount. Contains two sub-fields:
- Value: Amount, including the cents
- Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue of amount. Following ISO-4217, for IDR the value includes 2 decimal digits separated with point
e.g., IDR 10.000,- will be placed with 10000.00
e.g., IDR 10.000,- will be placed with 10000.00
currency
string
1 - 3 charactersRequiredCurrency
additionalTransferDetails
json object
Additional information of transfer details
beneficiary
json object
RequiredBeneficiary user information
nationality
string
2 charactersCode of nationality. Refer to ISO-3166 country/region code
userName
json object
Information details of user name
firstName
string
1 - 32 charactersUser’s first name
lastName
string
1 - 32 charactersUser’s last name
fullName
string
1 - 128 charactersRequiredUser’s full name
middleName
string
1 - 32 charactersUser’s middle name
transferPurpose
string
1 - 32 charactersType of transfer purpose, such as:
FAMILY_SUPPORTSALARYEDUCATIONOTHER
transferFromRegion
string
2 charactersRequiredPayer’s country or region. Refer to ISO-3166 country/region code
payer
json object
RequiredInformation details of payer
userAddress
json object
RequiredInformation detail of user address
zipCode
string
1 - 32 charactersZIP or postal code of user
city
string
1 - 32 charactersRequiredCity, district, suburb, town, or village
address2
string
1 - 256 charactersAddress line 2
address1
string
1 - 256 charactersAddress line 1
region
string
2 charactersRequiredCode of region. Refer to ISO-3166 country/region code
province
string
1 - 32 charactersUser’s address province
district
string
1 - 32 charactersUser’s address district
nationality
string
2 charactersCode of nationality. Refer to ISO-3166 country/region code
userPhoneNo
string
1 - 32 charactersRequiredUser’s contact number
certificate
json object
Information details of certificate
certificateNo
string
1 - 64 charactersRequiredCertificate number
certificateType
string
1 - 32 charactersType of certificate, which has values:
ID_CARDPassport
certificateIssuingCountry
string
1 - 2 charactersCountry of certificate issuance. Refer to ISO-3166 country/region code
userName
json object
Information details of user name
firstName
string
1 - 32 charactersUser’s first name
lastName
string
1 - 32 charactersUser’s last name
fullName
string
1 - 128 charactersRequiredUser’s full name
middleName
string
1 - 32 charactersUser’s middle name
userId
string
1 - 64 charactersUnique user identifier
birthDate
string
1 - 8 charactersDate of birth. Formatted in
YYYYMMDDtitle
string
1 - 8 charactersUser’s title, which has values:
MRMRSMS
gender
string
1 - 16 charactersUser’s gender, which has values:
MALEFEMALE
birthPlace
string
1 - 64 charactersUser's birthplace
politicalExposedPerson
string
1 charactersA Politically Exposed Person (PEP) options, which has values:
YN
occupation
string
1 - 64 charactersUser’s occupation
userPhoneAreaCode
string
1 - 8 charactersUser’s phone area code
userPhoneExtension
string
1 - 8 charactersUser’s phone extension
email
string
1 - 128 charactersUser’s email
transferToRegion
string
2 charactersRequiredBeneficiary’s country or region. Refer to ISO-3166 country/region code
accessToken
string
1 - 512 charactersConditional- Contains customer token, which has been obtained from binding process
- If request is coming from user interaction, this field is mandatory. If not, just filled customerNumber
Conditional Info
Y:= customerNumber is not exist
Wallet
POST /v1.0/emoney/topup.htm HTTP/1.2
Content-type: application/json
Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Authorization-Customer: Bearer fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
X-TIMESTAMP: 2020-12-21T17:07:11+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
ORIGIN: www.hostname.com
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
X-IP-ADDRESS: 172.24.281.24
X-DEVICE-ID: 09864ADCASA
CHANNEL-ID: 95221
{
"partnerReferenceNo": "2020102900000000000001",
"customerNumber": "6281773628883",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"feeAmount": {
"value": "10000.00",
"currency": "IDR"
},
"transactionDate": "2020-12-21T14:56:11+07:00",
"sessionId": "883737GHY8839",
"categoryId": "6",
"notes": "notes test",
"additionalInfo": {
"fundType": "AGENT_TOPUP_FOR_USER_SETTLE",
"externalDivisionId": "91080916Division",
"chargeTarget": "DIVISION",
"subScenario": "GLOBAL_REMITTANCE",
"extendInfo": {
"instructedAmountType": "TRANSFER_TO",
"payerPaymentMethod": {
"walletDetail": {
"walletName": "HK_WALLET",
"customerId": "123456789",
"customerName": {
"firstName": "William",
"lastName": "Clinton",
"fullName": "William Jefferson Clinton",
"middleName": "Jefferson"
}
},
"paymentMethodType": "WALLET",
"sourceOfFund": ""
},
"bizSceneType": "TRANSFER",
"transferToAmount": {
"currency": "IDR",
"value": "5000000.00"
},
"transferFromAmount": {
"currency": "USD",
"value": "70000.00"
},
"additionalTransferDetails": {
"beneficiary": {
"nationality": "ID",
"userName": {
"firstName": "Patrick",
"lastName": "Star",
"fullName": "Patrick Star",
"middleName": ""
}
},
"transferPurpose": "FAMILY_SUPPORT",
"transferFromRegion": "KR",
"payer": {
"userAddress": {
"zipCode": "04072",
"city": "SEOUL",
"address2": "366-1. Hapjeong-dong",
"address1": "Mapo-gu, Seoul",
"region": "KR",
"province": "Seoul",
"district": "Mapo District"
},
"nationality": "CN",
"userPhoneNo": "01012345678",
"certificate": {
"certificateNo": "11234578899",
"certificateType": "PASSPORT",
"certificateIssuingCountry": ""
},
"userName": {
"firstName": "William",
"lastName": "Clinton",
"fullName": "William Jefferson Clinton",
"middleName": "Jefferson"
},
"userId": "123456789",
"birthDate": "20020604",
"title": "",
"gender": "",
"birthPlace": "",
"politicalExposedPerson": "",
"occupation": "",
"userPhoneAreaCode": "",
"userPhoneExtension": "",
"email": "williamjclinton@gmail.com"
},
"transferToRegion": "ID"
}
},
"accessToken" : "fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a"
}
}
Content-type
string
1 - 127 charactersRequiredContent type, value always
application/jsonX-TIMESTAMP
string
25 charactersRequiredTransaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
responseCode
string
7 charactersRequiredRefer to response code list
responseMessage
string
1 - 150 charactersRequiredRefer to response code list
referenceNo
string
1 - 64 charactersConditionalTransaction identifier on DANA system
Conditional Info
Y:= Successfully processed
partnerReferenceNo
string
1 - 64 charactersRequiredUnique 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
sessionId
string
1 - 25 charactersSession identifier
customerNumber
string
1 - 32 charactersCustomer account number, in format 628xxx
amount
money
RequiredAmount. Contains two sub-fields:
1. Value: Transaction amount, including the cents
2. Currency: Currency code based on ISO
1. Value: Transaction amount, including the cents
2. Currency: Currency code based on ISO
value
string
1 - 19 charactersRequiredValue of amount. Following ISO-4217, for IDR the value includes 2 decimal digits separated with point
e.g., IDR 10.000,- will be placed with 10000.00
e.g., IDR 10.000,- will be placed with 10000.00
currency
string
1 - 3 charactersRequiredCurrency
additionalInfo
json object
Additional information
Content-type: application/json
X-TIMESTAMP: 2020-12-21T14:36:19+07:00
{
"responseCode": "2003800",
"responseMessage": "Successful",
"referenceNo": "2020102977770000000009",
"partnerReferenceNo": "2020102900000000000001",
"sessionId": "883737GHY8839",
"customerNumber": "628187366363",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {}
}
| Response | Cause | Solution |
|---|---|---|
2003800Successful | Success to be processed | Mark Customer Top Up process as Success |
4003800Bad Request | General request failed error | Mark Customer Top Up process as Failed. Retry request with proper parameter |
4003801Invalid Field Format | Invalid format for certain field | Mark Customer Top Up process as Failed. Retry request with proper parameter |
4003802Invalid Mandatory Field | Missing or invalid format on mandatory field | Mark Customer Top Up process as Failed. Retry request with proper parameter |
4013800Unauthorized. [reason] | General unauthorized error | Mark Customer Top Up process as Failed. Retry request with proper parameter |
4013801Invalid Token (B2B) | Authorization token are invalid, perhaps due to token expiry for B2B | Mark Customer Top Up process as Failed. Retry request with proper parameter |
4013802Invalid Customer Token | Customer token are invalid, perhaps due to token expiry | Mark Customer Top Up process as Failed. Retry request with proper parameter |
4013804Customer Token Not Found | Customer token not found in the system. This occurs on any API that requires token as input parameter | Mark Customer Top Up process as Failed. Retry request with proper parameter |
4033802Exceeds Transaction Amount Limit | Exceeds transaction amount limit | Mark Customer Top Up process as Failed. Retry request with proper amount |
4033803Suspected Fraud | Suspected fraud | Mark Customer Top Up process as Failed. Contact DANA to check the user/account status |
4033805Do Not Honor | Account or user status is abnormal | Mark Customer Top Up process as Failed. Contact DANA to check the user/account status |
4033814Insufficient Funds | Insufficient funds | Mark Customer Top Up process as Failed. Contact DANA to top up deposit balance |
4033815Transaction Not Permitted.[reason] | Transaction not permitted | Mark Customer Top Up process as Failed. Contact DANA to check merchant configuration |
4033818Inactive Card/Account/Customer | Indicates inactive account | Mark Customer Top Up process as Failed. Contact DANA to check merchant configuration |
4033820Merchant Limit Exceed | Merchant aggregated purchase amount on that day exceeds the agreed limit | Mark Customer Top Up process as Failed. Contact DANA to check merchant configuration |
4043808Invalid Merchant | Merchant does not exist or status abnormal | Mark Customer Top Up process as Failed. Contact DANA to check merchant configuration |
4043811Invalid Card/Account/Customer [info]/Virtual Account | Card information may be invalid, or the card account may be blacklisted, or Virtual Account number maybe invalid | Mark Customer Top Up process as Failed. Contact to DANA to check merchant configuration |
4043818Inconsistent Request | Inconsistent request parameter found for the same partner reference number/transaction identifier | Mark Customer Top Up process as Success. Contact DANA to check the Customer Top Up process status |
4293800Too Many Requests | Maximum transaction limit exceeded | Mark Customer Top Up process as Pending. Hold the money and retry request periodically |
5003800General Error | General error non retry-able | Mark Customer Top Up process as Failed. Retry new Customer Top Up process |
5003801Internal Server Error | Unknown internal server failure, please retry the process again | Mark Customer Top Up process as Pending. Hold the money and 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 Customer Top Up process as Pending and hold the money |
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) |
|