Create Virtual Account
1 min
POST
https://dev.nicepay.co.id/nicepay/api/v1.0/transfer-va/create-va
Header Parameters
- X-TIMESTAMPstringrequiredExample
- X-SIGNATUREstringrequiredDefaultRtZh3JLTde3laYpjI2zpLW854Dg7aPMXKH4PTnqVsgxUIOV0BVeBRQkG0CCpSSaJGKp16122ReEM9w2no4u4sg==
- X-PARTNER-IDstringrequiredExample
- X-EXTERNAL-IDstringrequiredExample
- CHANNEL-IDstringrequiredExample
Body Parameters
- bodycreateva_bodyExample
{ "partnerServiceId": "", "customerNo": "", "virtualAccountNo": "", "virtualAccountName": "Jhon Doe", "trxId": "2023123100000000000001", "totalAmount": { "value": "10000.00", "currency": "IDR" }, "additionalInfo": { "bankCd": "BMRI", "goodsNm": "John Doe", "dbProcessUrl": "https://dev.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp", "vacctValidDt": "", "vacctValidTm": "", "msId": "", "msFee": "", "msFeeType": "", "mbFee": "", "mbFeeType": "" } }- objectCreate-VA
- partnerServiceIdstringrequired
- customerNostring
- virtualAccountNostringrequired
- virtualAccountNamestringrequired
- trxIdstringrequired
- totalAmounttotalAmount
- valuestringExample
- currencystringExample
- additionalInfoadditionalInfo
- bankCdstring
- goodsNmstring
- dbProcessUrlstring
- vacctValidDtstring
- vacctValidTmstring
- msIdstring
- msFeestring
- msFeeTypestring
- mbFeestring
- mbFeeTypestring
- object
Responses
200
- SuccessRegist
- responseCodestringExampleDescription
- responseMessagestringExampleDescription
- virtualAccountDataSuccessRegist_virtualAccountData
- partnerServiceIdstringDescription
- customerNostringDescription
- virtualAccountNostringExampleDescription
- trxIdstringExampleDescription
- totalAmounttotalAmount
- valuestringExample
- currencystringExample
- additionalInfoSuccessRegist_virtualAccountData_additionalInfo
- bankCdstringExampleDescription
- tXidVAstringExampleDescription
- goodsNmstringExampleDescription
- vacctValidDtstringExampleDescription
- vacctValidTmstringExampleDescription
- msIdstringDescription
- msFeestringDescription
- msFeeTypestringDescription
- mbFeestringDescription
- mbFeeTypestringDescription
202
- RequestInProgress
- responseCodestringExampleDescription
- responseMessagestringExampleDescription
409
- DuplicatepartnerReferenceNo
- responseCodestringExampleDescription
- responseMessagestringExampleDescription
500
- GeneralError
- responseCodestringExampleDescription
- responseMessagestringExampleDescription
504
- RequestTimeout
- responseCodestringExampleDescription
- responseMessagestringExampleDescription
curl
curl --request POST \
--url https://dev.nicepay.co.id/nicepay/api/v1.0/transfer-va/create-va \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-timestamp: 2022-08-04T23:59:59+07:00' \
--header 'x-signature: RtZh3JLTde3laYpjI2zpLW854Dg7aPMXKH4PTnqVsgxUIOV0BVeBRQkG0CCpSSaJGKp16122ReEM9w2no4u4sg==' \
--header 'x-partner-id: IONPAYTEST' \
--header 'x-external-id: 20230804230101' \
--header 'channel-id: IONPAYTEST' \
--data '{
"partnerServiceId": "",
"virtualAccountNo": "",
"virtualAccountName": "",
"trxId": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-timestamp", "2022-08-04T23:59:59+07:00");
myHeaders.append("x-signature", "RtZh3JLTde3laYpjI2zpLW854Dg7aPMXKH4PTnqVsgxUIOV0BVeBRQkG0CCpSSaJGKp16122ReEM9w2no4u4sg==");
myHeaders.append("x-partner-id", "IONPAYTEST");
myHeaders.append("x-external-id", "20230804230101");
myHeaders.append("channel-id", "IONPAYTEST");
var raw = JSON.stringify({
"partnerServiceId": "",
"virtualAccountNo": "",
"virtualAccountName": "",
"trxId": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://dev.nicepay.co.id/nicepay/api/v1.0/transfer-va/create-va", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://dev.nicepay.co.id/nicepay/api/v1.0/transfer-va/create-va")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-timestamp"] = "2022-08-04T23:59:59+07:00"
request["x-signature"] = "RtZh3JLTde3laYpjI2zpLW854Dg7aPMXKH4PTnqVsgxUIOV0BVeBRQkG0CCpSSaJGKp16122ReEM9w2no4u4sg=="
request["x-partner-id"] = "IONPAYTEST"
request["x-external-id"] = "20230804230101"
request["channel-id"] = "IONPAYTEST"
request.body = JSON.dump({
"partnerServiceId": "",
"virtualAccountNo": "",
"virtualAccountName": "",
"trxId": ""
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://dev.nicepay.co.id/nicepay/api/v1.0/transfer-va/create-va"
payload = json.dumps({
"partnerServiceId": "",
"virtualAccountNo": "",
"virtualAccountName": "",
"trxId": ""
})
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-timestamp': '2022-08-04T23:59:59+07:00',
'x-signature': 'RtZh3JLTde3laYpjI2zpLW854Dg7aPMXKH4PTnqVsgxUIOV0BVeBRQkG0CCpSSaJGKp16122ReEM9w2no4u4sg==',
'x-partner-id': 'IONPAYTEST',
'x-external-id': '20230804230101',
'channel-id': 'IONPAYTEST'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful
{
"responseCode": "2002700",
"responseMessage": "Successful",
"virtualAccountData": {
"partnerServiceId": "",
"customerNo": "",
"virtualAccountNo": "7001400002007725",
"trxId": "2023123100000000000001",
"totalAmount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"bankCd": "BMRI",
"tXidVA": "TNICEVA02302202403061508052242",
"goodsNm": "Jhon Doe",
"vacctValidDt": "20240307",
"vacctValidTm": "150805",
"msId": "",
"msFee": "",
"msFeeType": "",
"mbFee": "",
"mbFeeType": ""
}
}
}GENERATED
// Successful
{
"responseCode": "2002700",
"responseMessage": "Successful",
"virtualAccountData": {
"partnerServiceId": "",
"customerNo": "",
"virtualAccountNo": "7001400002007725",
"trxId": "2023123100000000000001",
"totalAmount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"bankCd": "BMRI",
"tXidVA": "TNICEVA02302202403061508052242",
"goodsNm": "Jhon Doe",
"vacctValidDt": "20240307",
"vacctValidTm": "150805",
"msId": "",
"msFee": "",
"msFeeType": "",
"mbFee": "",
"mbFeeType": ""
}
}
}Successful
{
"responseCode": "2002700",
"responseMessage": "Successful",
"virtualAccountData": {
"partnerServiceId": "",
"customerNo": "",
"virtualAccountNo": "70014000091511466666",
"virtualAccountName": "Jhon Doe",
"trxId": "2023123100000000000001",
"totalAmount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"bankCd": "BMRI",
"tXidVA": "IONPAYTEST02202304271511466666",
"goodsNm": "John Doe",
"vacctValidDt": "20230429",
"vacctValidTm": "151146",
"msId": "",
"msFee": "",
"msFeeType": "",
"mbFee": "",
"mbFeeType": ""
}
}
}202
// Request In Progress
{
"responseCode": "202XX00",
"responseMessage": "Request In Progress"
}GENERATED
// Request In Progress
{
"responseCode": "202XX00",
"responseMessage": "Request In Progress"
}Request In Progress
{
"responseCode": "202XX00",
"responseMessage": "Request In Progress"
}409
// Duplicate partnerReferenceNo
{
"responseCode": "409XX01",
"responseMessage": "Duplicate partnerReferenceNo"
}GENERATED
// Duplicate partnerReferenceNo
{
"responseCode": "409XX01",
"responseMessage": "Duplicate partnerReferenceNo"
}Duplicate partnerReferenceNo
{
"responseCode": "409XX01",
"responseMessage": "Duplicate partnerReferenceNo"
}500
// General Error
{
"responseCode": "500XX00",
"responseMessage": "General Error"
}GENERATED
// General Error
{
"responseCode": "500XX00",
"responseMessage": "General Error"
}General Error
{
"responseCode": "500XX00",
"responseMessage": "General Error"
}504
// Request Timeout
{
"responseCode": "504XX00",
"responseMessage": "Request Timeout"
}GENERATED
// Request Timeout
{
"responseCode": "504XX00",
"responseMessage": "Request Timeout"
}Request Timeout
{
"responseCode": "504XX00",
"responseMessage": "Request Timeout"
}