Create VA
POST/v1.0/transfer-va/create-va
This API is used to create virtual account (VA) from DANA to Bank
API Type
SNAP API
Expected Timeout
8 second
SNAP Service Code
27
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)
partnerServiceId
string
8 charactersRequiredBiller/merchant code of the virtual account. 8 digit left padding with space
customerNo
string
1 - 20 charactersRequiredUnique number (up to 20 digits). Combine
partnerServiceId and customerNo or virtualAccountNovirtualAccountNo
string
1 - 28 charactersRequiredInformation of virtual account number which combine
partnerServiceId and customerNovirtualAccountName
string
1 - 255 charactersRequiredInformation of customer name
virtualAccountEmail
string
1 - 255 charactersInformation of customer email
virtualAccountPhone
string
1 - 30 charactersInformation of customer’s phone number
trxId
string
1 - 64 charactersRequiredTransaction identifier generated by DANA
feeAmount
money
Fee 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
currency
string
1 - 3 charactersRequiredCurrency
totalAmount
money
Total 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
currency
string
1 - 3 charactersRequiredCurrency
freeTexts
array of multilanguagetext
Information of free text using multi language text
english
string
RequiredEnglish language text.
The length defines as below:
The length defines as below:
- Freetexts: 32 max
- paymentFlagReason: 200 max
indonesia
string
RequiredIndonesia language text.
The length defines as below:
The length defines as below:
- Freetexts: 32 max
- paymentFlagReason: 200 max
virtualAccountTrxType
string
1 charactersInformation of virtual account transaction type. The values include:
1= Closed Payment (C)2= Open Payment (O)3= Partial (I)4= Minimum (M) - only can be paid once with minimum amount5= Maximum (L)6= Open Minimum (N) - can be paid multiple with minimum amount7= Open Maximum (X) - can be paid multiple with cumulative maximum amount8= Bill Variable (V)9= Multi Bill Variable (W)
expiredDate
string
25 charactersExpiration date for virtual account, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
additionalInfo
json object
Additional information
POST .../v1.0/transfer-va/create-va HTTP/1.2
Content-type: application/json
Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
X-TIMESTAMP: 2020-12-23T09:10:11+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
ORIGIN: www.hostname.com
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221
{
"partnerServiceId": " 88899",
"customerNo": "12345678901234567890",
"virtualAccountNo": " 8889912345678901234567890",
"virtualAccountName": "Jokul Doe",
"virtualAccountEmail": "jokul@gmail.com",
"virtualAccountPhone": "081289229038",
"trxId": "022028861016",
"feeAmount": {
"currency": "IDR",
"value": "100.00"
},
"totalAmount": {
"currency": "IDR",
"value": "88000.00"
},
"freeTexts": [
{
"english": "Successful",
"indonesia": "Sukses"
}
],
"virtualAccountTrxType":"1",
"expiredDate":"2021-12-08T20:16:43+07:00",
"additionalInfo": {},
}
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
virtualAccountData
json object
RequiredContains virtual account data
partnerServiceId
string
8 charactersRequiredBiller/merchant code of the virtual account. 8 digit left padding with space
customerNo
string
1 - 20 charactersRequiredUnique number (up to 20 digits). Combine partnerServiceIdand
customerNo or virtualAccountNovirtualAccountNo
string
1 - 28 charactersRequiredInformation of virtual account number which combine partnerServiceId and customerNo
virtualAccountName
string
1 - 255 charactersRequiredInformation of customer name
virtualAccountEmail
string
1 - 255 charactersInformation of customer email
virtualAccountPhone
string
1 - 30 charactersInformation of customer’s phone number
trxId
string
1 - 64 charactersRequiredTransaction identifier generated by DANA
feeAmount
money
Fee 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
currency
string
1 - 3 charactersRequiredCurrency
totalAmount
money
Total 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
currency
string
1 - 3 charactersRequiredCurrency
freeTexts
array of multilanguagetext
1 - 25 charactersInformation of free text using multi language text
virtualAccountTrxType
string
1 charactersInformation of virtual account transaction type. The value include:
1= Closed Payment (C)2= Open Payment (O)3= Partial (I)4= Minimum (M) - only can be paid once with minimum amount5= Maximum (L)6= Open Minimum (N) - can be paid multiple with minimum amount7= Open Maximum (X) - can be paid multiple with cumulative maximum amount8= Bill Variable (V)9= Multi Bill Variable (W)
expiredDate
string
25 charactersExpiration date for virtual account, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
additionalInfo
json object
Additional information
Content-type: application/json
X-TIMESTAMP: 2020-12-23T09:10:11+07:00
{
"responseCode": "2002700",
"responseMessage": "Successful",
"virtualAccountData":
{
"partnerServiceId": " 88899",
"customerNo": "12345678901234567890",
"virtualAccountNo": " 8889912345678901234567890",
"virtualAccountName": "Jokul Doe",
"virtualAccountEmail": "jokul@gmail.com",
"virtualAccountPhone": "081234567890",
"trxId": "022028861016",
"feeAmount": {
"currency": "IDR",
"value": "100.00"
},
"totalAmount": {
"currency": "IDR",
"value": "88000.00"
},
"freeTexts": [
{
"english": "Successful",
"indonesia": "Sukses"
}
],
"virtualAccountTrxType":"1",
"expireDate":"2021-12-08T20:16:43+07:00",
"additionalInfo": {},
}
| Response | Cause | Solution |
|---|---|---|
2002700Successful | Success to be processed | Mark Create VA process as Success |
4002700Bad Request | General request failed error | Mark Create VA process as Failed. Retry request with proper parameter |
4002701Invalid Field Format | Invalid format for certain field | Mark Create VA process as Failed. Retry request with proper parameter |
4002702Invalid Mandatory Field | Missing or invalid format on mandatory field | Mark Create VA process as Failed. Retry request with proper parameter |
4012700Unauthorized. [reason] | General unauthorized error | Mark Create VA process as Failed. Retry request with proper parameter |
4012701Invalid Token (B2B) | Authorization token are invalid, perhaps due to token expiry for B2B | Mark Create VA process as Failed. Retry request with proper parameter |
4292700Too Many Requests | Maximum transaction limit exceeded | Mark Create VA process as Pending. Retry request periodically |
5002700General Error | General error non retry-able | Mark Create VA process as Failed. Retry request periodically |
5002701Internal Server Error | Unknown internal server failure, please retry the process again | Mark Create VA process as Pending. 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 Create VA process as Pending |
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 Create VA process as Pending • If empty field/field does not exist, mark Create VA process as Pending |