Create Payment
POST/v1.0/emoney/otc-cashout.htm
This API used to do request user cashout transaction from merchant to DANA
API Type
SNAP API
Expected Timeout
8 second
SNAP Service Code
44
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
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
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
Note: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
customerNumber
string
1 - 32 charactersRequiredCustomer account number
otp
string
6 charactersRequiredOne Time Password
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
currency
string
1 - 3 charactersRequiredCurrency
feeType
string
1 - 25 charactersFee charge target
•
•
•
•
OUR •
BEN •
SHA|1000additionalInfo
json object
Additional information
additionalInfo.extensionInfo
json object
Additional information of extension
postId
string
1 - 64 charactersPost identifier information
storeId
string
1 - 64 charactersStore identifier information
phoneNumber
string
1 - 32 charactersPhone number information
POST .../v1.0/emoney/otc-cashout.htm HTTP/1.2
Content-type: application/json
Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
X-TIMESTAMP: 2021-12-03T10:37:11+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
ORIGIN: www.hostname.com
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221
{
"partnerReferenceNo": "14054Q0727520211128121824995",
"customerNumber": "081234567890",
"otp": "672751",
"amount": {
"currency": "IDR",
"value": "50000.00"
},
"additionalInfo": {
"extensionInfo": {
"postId": "Q07275",
"storeId": "14054",
"phoneNumber": "081234567890"
}
}
}
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 charactersUnique 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
Note: When retrying after a timeout or unexpected response, use the same partnerReferenceNo as in the original request
transactionDate
string
25 charactersTransaction date, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
additionalInfo
json object
Additional information
additionalInfo.description
string
1 - 128 charactersAdditional information of description
Content-type: application/json
X-TIMESTAMP: 2021-12-03T10:37:12+07:00
{
"responseCode": "2004400",
"responseMessage": "Successful",
"referenceNo": "2021112810121482030100166514528830697",
"partnerReferenceNo": "14054Q0727520211128121824995",
"transactionDate": "2021-12-03T10:37:12+07:00",
"additionalInfo": {
"description": "BUDI"
}
}
| Response | Cause | Solution |
|---|---|---|
2004400Successful | Success to be processed | Mark Create Payment process as Success |
4004400Bad Request | General request failed error | Mark Create Payment process as Failed. Retry request with proper parameter |
4004401Invalid Field Format | Invalid format for certain field | Mark Create Payment process as Failed. Retry request with proper parameter |
4004402Invalid Mandatory Field | Missing or invalid format on mandatory field | Mark Create Payment process as Failed. Retry request with proper parameter |
4014400Unauthorized. [reason] | General unauthorized error | Mark Create Payment process as Failed. Retry request with proper parameter |
4014401Invalid Token (B2B) | Authorization token are invalid, perhaps due to token expiry for B2B | Mark Create Payment process as Failed. Retry request with proper parameter |
4034402Exceeds Transaction Amount Limit | Exceeds transaction amount limit | Mark Create Payment process as Failed. Retry request with proper amount |
4034404Activity Count Limit Exceeded | Too many request, exceeds transaction frequency limit | Mark Create Payment process as Failed. Retry new Create Payment process on next day |
4034405Do Not Honor | Account or user status is abnormal | Mark Create Payment process as Failed. Can contact to DANA to check the user/account status |
4034414Insufficient Funds | Insufficient funds | Mark Create Payment process as Failed. Check current available balance for Create Payment process |
4044411Invalid 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 Create Payment process as Failed. Retry request with proper phone number |
4044415Invalid OTP | OTP is incorrect | Mark Create Payment process as Failed. Retry request with proper OTP code |
4044418Inconsistent Request | Inconsistent request parameter found for the same partner reference number/transaction ID | Mark Create Payment process as Failed and hold the money |
4294400Too Many Requests | Maximum transaction limit exceeded | Mark Create Payment process as Pending. Hold the money and retry request periodically |
5004400General Error | General error non retry-able | Mark Create Payment process as Failed and hold the money |
5004401Internal Server Error | Unknown internal server failure, please retry the process again | Mark Create Payment process as Pending. Hold the money and retry request periodically or continue to Query Status/Cancel API |
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 Create Payment 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) |
|