1. Overview
The merchant initiates to create a VA from BNC and BNC generates a VA code and returns to the merchant backend.
1.1. VA Format
A. VA Code Number Type (BNC as Master)
Maximum length of VA code number is 19 digits, with format as below.
VA Code Type | Position | Value |
---|---|---|
Static VA Code Number | 2 digits (digit 1-2) | ‘90’ – Static Code |
6 digits (digit 3-8) | Prefix code for merchant | |
11 digits (digit 9-19) | VA No sent by merchant | |
Dynamic VA Code Number | 2 digits (digit 1-2) | ‘99’ – Dynamic Code |
6 digits (digit 3-8) | Prefix code for merchant | |
20 digits (digit 9-28) | In the request:
|
Note:
Static VA can be 18 digits, in case merchant sends 18 digits length when requesting to create VA. Dynamic VA is a fixed length with 19 digits generated by BNC backend system.
B. VA Code Number Type (BNC as non-Master)
Maximum length of VA code number is 19 digits, with format as below.
VA Code Type | Position | Value |
---|---|---|
Static and Dynamic VA Code Number | 2 digits (digit 1-2) | ‘90’ – Both Static and Dynamic Code |
6 digits (digit 3-8) | Prefix code for merchant | |
11 digits (digit 9-19) | VA No sent by merchant |
Note:
Static VA can be 18 digits, in case merchant sends 18 digits length when requesting to create VA.
C. VA Amount Type
VA Code Type | Closed Amount virtualAccountTrxType =1 | Open Amount virtualAccountTrxType = 2 |
---|---|---|
Static VA Code | √ | √ |
Dynamic VA Code | √ | Not supported |
Note:
Closed amount (virtualAccountTrxType =1), amount must >= fee when request
Open amount (virtualAccountTrxType = 2), amount must >= fee when payment
2. API Specification
HTTP Method | POST |
Endpoint | SNAP Test Env URL: https://perf-openbanking.bankneo.co.id/open/bi/private/1.0.0/transfer-va/create-va SNAP Prod Env URL: https://openbanking.bankneo.co.id/open/bi/private/1.0.0/transfer-va/create-va |
SNAP Service Code | 27 |
3. Request
3.1. Request Header
Name | Type | M/O | Length | Description |
---|---|---|---|---|
X-TIMESTAMP | String | M | 25 | The request timestamp. Formatted with "yyyy-MM-ddTHH:mm:ssZ". E.g. 2022-09-06T13:00:00+07:00 |
X-SIGNATURE | String | M | 2048 | The Merchant or Client generated signature. Using Asymmetric-Signature mechanism to get the token, encrypted with SHA256withRSA.
e.g. stringToSign = <HTTP Method> + ":" + <Service Endpoint> + ":" + toLowercase(hexEncode(SHA256(minify(<Request Body>)))) + ":" + <X-TIMESTAMP> X-SIGNATURE = SHA256withRSA(PrivateKey, stringToSign) |
X-ORIGIN | String | M | 256 | Client’s host origin. |
X-PARTNER-ID | String | M | 32 | The Merchant or Client Id. Provided by BNC. |
X-EXTERNAL-ID | String | M | 36 | The Merchant External ID of request.
e.g. 77778042022091500001 |
CHANNEL-ID | String | M | 5 | PJP Channel ID. 95221 |
3.1.1 Sample Request Header
Content-type: application/json Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a" X-TIMESTAMP: 2020-12-21T14:56:11+07:00 X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5 X-ORIGIN: www.hostname.com X-PARTNER-ID: 82150823919040624621823174737537 X-EXTERNAL-ID: 41807553358950093184162180797837 CHANNEL-ID: 95221
3.2 Request Body
Name | Type | M/O | Length | Description |
---|---|---|---|---|
partnerServiceId | String | M | 8 | Derivative of X- PARTNER-ID , similar to company code, 8 digit left padding space. partnerServiceId + customerNo or virtualAccountNo. |
customerNo | String | M | 20 | Unique number (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo. |
virtualAccountNo | String | M | 28 | partnerServiceId (8 digit left padding 0) + customerNo (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
virtualAccountName | String | M | 255 | Customer name |
virtualAccountEmail | String | O | 255 | Customer email |
virtualAccountPhone | String | O | 30 | Customer’s |
trxId | String | M | 64 | Transaction ID in Partner system |
totalAmount | Array of objects | O |
|
|
-> value | String | M | 16,2 | Transaction Amount. |
-> currency | String | M | 3 | Currency (ISO4217) |
billDetails | Array of objects | O |
| Array with maximum 24 objects |
-> billCode | String | O | 2 | Bill code for Customer choose |
-> billNo | String | O | 18 | Bill number from Partner |
-> billName | String | O | 20 | Bill Name |
-> billShortName | String | O | 10 | Bill Name to shown to |
-> billDescription | Object | O |
| Bill Description |
-> -> english | String | O | 18 | Bill Description in English |
-> -> indonesia | String | O | 18 | Bill Description in Bahasa |
-> billSubCompany | String | O | 5 | Partner's product code |
-> billAmount | Array of Objects | O |
|
|
-> -> value | String (ISO4217) | M | 16,2 | Transaction Amount. |
-> -> currency | String | M | 3 | Currency |
-> additionalInfo | Object | O | Unlimited | Additional Information for custom use for each bill |
freeTexts | Array of Objects | O |
| Array with maximum 25 Objects |
-> english | String | O | 32 | Will be shown in Channel |
-> indonesia | String | O | 32 | Will be shown in Channel |
virtualAccountTrxType | String | O | 1 | 1. Closed Payment (C) 2. Open Payment (O) |
feeAmount | Array of Objects | O |
|
|
-> value | String (ISO4217) | M | 16,2 | Transaction Amount. |
-> currency | String | M | 3 | Currency |
expiredDate | String | O | 25 | Expiration date for Virtual Account. ISO-8601 |
additionalInfo | Object | O |
| Additional Information for custom use |
3.2.1 Sample Request Body
{ "partnerServiceId":"90666666", "customerNo":"00000014", "virtualAccountNo":"9066666600000014", "virtualAccountName":"Jokul Doe 001", "virtualAccountEmail":"jokul@email.com", "virtualAccountPhone":"6281828384858", "trxId":"INV-20220510-010", "totalAmount":{ "value":"0", "currency":"IDR" }, "billDetails":[ { "billCode":"01", "billNo":"123456789012345678", "billName":"Bill A for Jan", "billShortName":"Bill A", "billDescription":{ "english":"Maintenance", "indonesia":"Pemeliharaan" }, "billSubCompany":"00001", "billAmount":{ "value":"20000.00", "currency":"IDR" }, "additionalInfo":{ } } ], "freeTexts":[ { "english":"Free text", "indonesia":"Tulisan bebas" } ], "virtualAccountTrxType":"2", "feeAmount":{ "value":"0", "currency":"IDR" }, "expiredDate":"2023-01-01T10:55:00+07:00", "additionalInfo": { "subMchID", ":"001", "subMchNm": "Merchant123" } }
4. Response
4.1 Response Body
Name | Type | M/O | Length | Description |
---|---|---|---|---|
responseCode | String | M | 7 | The BI Snap standard of response code. |
responseMessage | String | M | 150 | The message corresponding to the response code. |
virtualAccountData | Object | M |
|
|
-> partnerServiceId | String | M | 8 | Derivative of X- PARTNER-ID , similar to company code, 8 digit left padding space. partnerServiceId + customerNo or virtualAccountNo |
-> customerNo | String | M | 20 | Unique number (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
-> virtualAccountNo | String | M | 28 | partnerServiceId (8 digit left padding 0) + customerNo (up to 20 digits). partnerServiceId + customerNo or virtualAccountNo |
-> virtualAccountName | String | M | 255 | Customer name |
virtualAccountEmail | String | O | 255 | Customer email |
-> virtualAccountPhone | String | O | 30 | Customer’s |
-> trxId | String | M | 64 | from Create VA Request |
-> totalAmount | Array of Objects | O |
|
|
-> -> value | String (ISO4217) | M | 16,2 | Transaction Amount. |
-> -> currency | String | M | 3 | Currency |
-> billDetails | Array of Objects | O |
| Array with maximum 24 Objects |
-> -> billCode | String | O | 2 | Bill code for Customer choose |
-> -> billNo | String | O | 18 | Bill number from Partner |
-> -> billName | String | O | 20 | Bill Name |
-> -> billShortName | String | O | 10 | Bill Name to shown to |
-> -> billDescription | Object | O |
| Bill Description |
-> -> -> english | String | O | 18 | Bill Description in English |
-> -> -> indonesia | String | O | 18 | Bill Description in Bahasa |
-> -> billSubCompany | String | O | 5 | Partner's product code |
-> -> billAmount | Array of Objects | O |
|
|
-> -> -> value | String | M | 16,2 | Transaction Amount. |
-> -> -> currency | String | M | 3 | Currency (ISO4217) |
-> -> additionalInfo | Object | O | Unlimited | Additional Information for custom use for each bill |
-> -> freeTexts | Array of Objects | O |
| Array with maximum 25 Objects |
-> -> -> english | String | O | 32 | Will be shown in Channel |
-> -> -> indonesia | String | O | 32 | Will be shown in Channel |
-> -> virtualAccountTrxType | String | O | 1 | 1. Closed Payment (C) 2. Open Payment (O) |
-> feeAmount | Array of Objects | O |
|
|
-> -> value | String (ISO4217) | M | 16,2 | Transaction Amount. |
-> -> currency | String | M | 3 | Currency |
-> expiredDate | String | O | 25 | Expiration date for Virtual Account. ISO-8601 |
-> additionalInfo | Object | O |
| Additional Information for custom use |
4.1.1 Sample Response Body
Success:
{ "responseCode":"2002700", "responseMessage":"Successful", "virtualAccountData":{ "partnerServiceId":"90666666", "customerNo":"9066666600000014", "virtualAccountNo":"9066666600000014", "virtualAccountName":"Jokul Doe 001", "virtualAccountEmail":"jokul@email.com", "virtualAccountPhone":"6281828384858", "trxId":"INV-20220510-010", "billDetails":[ { "billCode":"01", "billNo":"123456789012345678", "billName":"Bill A for Jan", "billShortName":"Bill A", "billDescription":{ "english":"Maintenance", "indonesia":"Pemeliharaan" }, "billSubCompany":"00001", "billAmount":{ "value":"20000.00", "currency":"IDR" } } ], "virtualAccountTrxType":"2", "feeAmount":{ "value":"0", "currency":"IDR" }, "expiredDate":"1672545300000", "additionalInfo":{ "subMchID":"001", "subMchNm":"Merchant123" } } }
Fail:
Response Code | HTTP Code | Service Code | Case Code | Response Message | Description | |
---|---|---|---|---|---|---|
1 | 2002700 | 200 | any | 00 | Successful | Successful |
2 | 4002700 | 400 | any | 00 | Bad Request | General request failed error, including message parsing failed |
3 | 4002701 | 400 | any | 01 | Invalid Field Format {field name} | Invalid format |
4 | 4002702 | 400 | any | 02 | Invalid Mandatory Field {field name} | Missing or invalid format on mandatory field |
5 | 4012700 | 401 | any | 00 | Unauthorized. [reason] | General unauthorized error (No Interface Def, API is Invalid, Oauth Failed, Verify Client Secret Fail, Client Forbidden Access API, Unknown Client, Key not Found) |
6 | 4012701 | 401 | any | 01 | Invalid Token (B2B) | Token found in request is invalid (Access Token Not Exist, Access Token Expiry) |
7 | 4012703 | 401 | any | 03 | Token Not Found (B2B) | Token not found in the system. This occurs on any API that requires token as input parameter |
8 | 4042708 | 404 | any | 08 | InvalidMerchant | Merchant does not exist or status abnormal |
9 | 4042711 | 404 | any | 11 | Invalid Card/Accoun t/Customer [info]/Virtual Account | Card information may be invalid, or the card account may be blacklisted, or Virtual Account number maybe invalid |
10 | 4042712 | 404 | any | 12 | Invalid Bill/Virtual Account [Reason] | The bill is blocked/suspended/not found. Virtual account is suspend/not found |
11 | 4042713 | 404 | any | 13 | Invalid Amount | The amount doesn't match with what supposed to |
12 | 4092701 | 409 | any | 01 | Duplicate partnerReferenceNo | Transaction has previously been processed indicates the same partnerReferenceNo already success |
13 | 5002702 | 500 | any | 02 | External Server Error | Backend system failure, etc |
6. Reference
Field Code | Field Name | Description | |
---|---|---|---|
1 | M | Mandatory | Mandatory |
2 | ME | Mandatory Equal | Mandatory Equal – value in the request and the response must be the same. |
3 | C | Conditional | Conditional |
4 | CE | Conditional Equal | Conditional Equal – value in the request and the response must be the same. |
5 | O | Optional | Optional |