Skip to main content

Virtual Account

Endpoint:

https://api.cronosengine.com/api/virtual-account

Method : POST

Generate Virtual Accounts from Multiple Banks with Our API. Simplify fund acceptance with our efficient API solution. Streamline your payment processes and expand your options for accepting funds seamlessly.

Request Parameters

ParameterMandatoryDescription
bankCodeYesThe code representing the bank to be used for the transaction. you can find the list of bank codes here.
singleUseYesA boolean value indicates whether the generated API parameter can be used for a single transaction only. true / false
typeYesOpenAmount / ClosedAmount
referenceYesA unique reference number or identifier for the transaction. all transaction references should be unique.
amountYesAmount your user should paid to complete the transaction.
expiryMinutesNoIf you want the transaction to last for 1 hour, you would set the value of the expiryMinutes parameter to 60.
viewNameYesThe name or identifier of the receiver for the transaction.
additionalInfo.callbackYesThe callback URL where notifications or updates related to the transaction will be sent.

Headers

KeyValue
On-KeyProject Key
On-TokenProject Token
On-SignatureGenerated using : hash_hmac('sha512', key + json_encode(body), token)
Acceptapplication/json

Bank Codes

Bank CodeBank NameCapability
008MandiriOne-off / Persistent - Open Amount, Closed Amount
014BCAOne-off / Persistent - Open Amount, Closed Amount
002BRIOne-off / Persistent - Open Amount, Closed Amount
009BNIOne-off - Closed Amount
013PermataOne-off / Persistent - Open Amount, Closed Amount
011DanamonPersistent - Open Amount
022CIMB NiagaOne-off - Closed Amount
153Sahabat SampoernaOne-off / Persistent - Open Amount, Closed Amount

Response Parameters

ParameterDescription
responseCodeThe HTTP response code indicating the status of the request. you can see the detailed information in the Error Codes Section.
responseMessageA descriptive message indicating the status of the request.
responseDataAn object containing the data related to the transaction response.
responseData.idCronos unique identifier for the transaction.
responseData.statusThe current status of the transaction. success, pending, expired, failed
responseData.feePayerThe party responsible for paying the transaction fee. customer, merchant
responseData.amountThe original amount associated with the transaction.
responseData.feeThe fee charged for the transaction.
responseData.totalAmountThe total amount (original amount + fee) for the transaction.
responseData.expiredDateThe date and time when the transaction will expire.
responseData.additionalInfo.callbackThe callback URL where notifications or updates related to the transaction will be sent.
responseData.virtualAccount.bankCodeThe code representing the bank associated with the virtual account.
responseData.virtualAccount.vaNumberThe virtual account number for the transaction.
responseData.virtualAccount.viewNameThe name or identifier associated with the virtual account.

Example

Request

curl --location 'https://api.cronosengine.com/api/virtual-account' \
--header 'On-Key;' \
--header 'On-Token;' \
--header 'On-Signature;' \
--data '{
"bankCode": "014",
"singleUse": true,
"type": "ClosedAmount",
"reference": "123456",
"amount": 10000,
"expiryMinutes": 30,
"viewName": "Mr. Gentur",
"additionalInfo": {
"callback": "http://your-site-callback.com/notify"
}
}'

Response

{
"responseCode": 200,
"responseMessage": "success",
"responseData": {
"id": "74881f0f-f2cb-4675-859b-fe883682c605",
"merchantRef": "123456",
"status": "pending",
"feePayer": "customer",
"amount": 10000,
"fee": 4000,
"totalAmount": 14000,
"expiredDate": "2023-07-13T13:51:48+07:00",
"additionalInfo": {
"callback": "https://kraken.free.beeceptor.com/notify"
},
"virtualAccount": {
"bankCode": "014",
"vaNumber": "700707760000011321",
"viewName": "Mr. Gentur"
}
}
}