NICEPAY API
...
API Virtual Account
Registration - API Virtual Account
11 min
about api virtual account registration virtual account is one of {{the}} {{paymethod}} s offered at {{nicepay}} {{customer}} s have more {{payment}} options via atm, sms {{bank}} ing, internet {{bank}} ing, and mobile {{bank}} ing using this method there are real time {{notification}} s that are sent automatically to {{the}} {{customer}} as soon as {{the}} {{customer}} completes {{the}} {{payment}} if you want to see a general explanation of {{va}} {{paymethod}} s, you can visit docid\ ie9rxfmm gpysjakmrbvl for {{integration}} settings for fix open and {{niva}} features, you can visit {{the}} docid\ cadfseimkqmertral3p4u {{page}} virtual account length number specification as explained on {{the}} docid\ zf1ak3ppg5z1my1oevy7a , {{the}} length of {{the}} va number that can be created varies from each {{bank}} the length of {{the}} va can be determined according to {{business}} needs as long as {{the}} va number does not exceed {{the}} maximum length capacity that includes {{the}} {{nicepay}} and {{bank}} prefix the following is a table of requirements for va length number for some {{bank}} s bank nicepay + bank prefix length max total va bca 8 23 bri 8 18 mandiri 8 19 maybank 8 16 bni 7 16 permata & syariah 7 16 cimb 7 19 danamon 7 16 hana 7 16 bjb 7 16 bnc 11 19 dki 9 16 note {{nicepay}} + {{bank}} prefix length is {{the}} number length requirement for {{nicepay}} and {{bank}} prefix numbers a case study if you as a {{merchant}} want to integrate mandiri {{bank}} va, then you are required to provide a space of 8 digits for {{the}} va prefix which consists of {{the}} {{nicepay}} and {{bank}} prefix later, {{the}} number after {{the}} prefix will be divided into 2 types according to {{the}} type of va you want to create fixed va you can customize {{the}} number after {{the}} va prefix number that {{nicepay}} refers to as {{the}} {{customer}} id or merfixacctid with a note that {{the}} number is no longer than {{the}} maximum 19 digits length for va numbers from {{bank}} mandiri normal va you cannot customize {{the}} number after {{the}} va prefix number because that number will be generated automatically and randomly by {{the}} {{system}} with a note that {{the}} number is no longer than {{the}} maximum 19 digits length for va numbers from {{bank}} mandiri the default length of va number is 16 digits unless there are a special schemes from {{bank}} s, {{nicepay}} , and {{merchant}} s although each {{bank}} may have different length of {{the}} va number, {{merchant}} s are considered to be able to accommodate a va number lengths maximum of 30 digits in a row api virtual account registration {{va}} registration aims so that {{the}} {{merchant}} can connect to a {{va}} {{payment}} {{system}} with a {{system}} from {{nicepay}} so, {{the}} {{payment}} {{system}} that has to provide and hosted from {{the}} {{merchant}} side can integrate with {{the}} {{system}} from {{nicepay}} api endpoint /nicepay/direct/v2/registration request method post post description performs transaction regist to {{nicepay}} merchant token sha256( timestamp + imid + referenceno + amt + merchantkey ) request format application/json request parameter for registration virtual account the following is a list of {{parameter}} s for requesting registration of {{the}} {{va}} {{paymethod}} this {{parameter}} is used through {{the}} {{api}} {{testing}} platform as one of {{the}} stages so that {{the}} {{merchant}} 's {{system}} can connect with {{service}} s from {{nicepay}} parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20221214151286 imid required required an 10 {{merchant}} id normaltest paymethod required required n 2 docid\ ek 0djw7nuhytcda4sa3p 02 currency required required a 3 currency idr amt required required n 12 amount 10000 referenceno required required ans 40 {{merchant}} 's reference number ordno20221214151286 goodsnm required required an 100 goods name goods for testing {{va}} billingnm required required a 100 buyer name john doe billingphone required required n 15 buyer phone number 081288998899 billingemail required required ans 40 buyer e mail john doe\@example com billingaddr required required an 100 buyer address jln raya kasablanka kav 88 billingcity required required a 50 buyer city south jakarta billingstate required required a 50 billing state dki jakarta billingpostcd required required n 10 billing post number 12800 billingcountry required required a 10 billing country {{indonesia}} cartdata jsonstring 4000 cart data {} bankcd required for va required for va a 4 docid\ qbeq29lj53z vbvxtvb7l cena vacctvaliddt required required n 8 va expiry date ( yyyymmdd ) 20221231 vacctvalidtm required required n 6 va expiry time ( hh24miss ) 235959 merfixacctid required required for va type fixclose for va type fixclose an 40 {{merchant}} reserved va id userip required for cc, e wallet, payloan,qris required for cc, e wallet, payloan,qris an 15 user ip 127 0 0 1 dbprocessurl required required ans 255 notification url https //ptsv2 com/t/merchant/post/ merchanttoken required required an 255 {{merchant}} token c94d31f554faea1c5f28617dd0a9de70fcb4dc8de55a343bb887d032d95dd60a deliverynm a 30 delivery name delivery\@example com deliveryphone n 15 delivery phone 081288998899 deliveryaddr an 100 delviery address jln raya kasablanka kav 88 deliverycity a 50 delivery city south jakarta deliverystate a 50 delivery state dki jakarta deliverypostcd n 10 delivery post code 12800 deliverycountry a 10 delivery country {{indonesia}} description an 100 transaction description testing registration {{va}} reqdomain ans 100 request domain merchant com reqserverip ans 15 request server ip 127 0 0 1 usersessionid an 100 user session id 697d6922c961070967d3ba1ba5699c2c useragent ans 100 user agent mozilla userlanguage a 2 user language en us {{please}} visit docid\ zf1ak3ppg5z1my1oevy7a {{section}} to learn general {{information}} about {{va}} {{paymethod}} s the {{parameter}} s below contain additional {{information}} regarding {{va}} registration {{information}} response parameter for registration virtual account the following is a {{parameter}} response from {{the}} request {{parameter}} results to register {{the}} {{va}} {{paymethod}} parameter type size description example / notes resultcd n 14 docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 result message docid 4 fpewlvczfhcvygxwck9 success txid an 30 transaction id normaltest02202212141509411648 referenceno ans 40 {{merchant}} reference number ordno20221214151286 paymethod n 2 docid\ ek 0djw7nuhytcda4sa3p 02 amt n 12 {{paymentproduct}} amount 1000 transdt n 8 transaction date ( yyyymmdd ) 20221214 transtm n 6 transaction time ( hh24miss ) 150941 description an 100 description testing registration {{va}} bankcd an 4 docid\ qbeq29lj53z vbvxtvb7l cena vacctno n 20 va number 9912304000001486 mitracd an 4 docid 0upx1lyg1o2f4biu3ssp null payno n 12 payment number null currency an 3 currency idr goodsnm an 100 goods name goods for testing {{va}} billingnm a 100 buyer name john doe vacctvaliddt n 8 va expiry date ( yyyymmdd ) 20221231 vacctvalidtm n 6 va expiry time ( hh24miss ) 235959 payvaliddt n 8 expiry date ( yyyymmdd ) null payvalidtm n 6 expiry time ( hh24miss ) null requesturl ans 360 request url null paymentexpdt n 8 qr {{paymentproduct}} expiry date ( yyyymmdd ) null paymentexptm n 6 qr {{paymentproduct}} expiry time ( hh24miss ) null qrcontent ans 360 qr string in plain text null qrurl ans 360 url for qr image, valid for 5 minutes null sample json registrasi virtual account json request { "timestamp" "20221214151286", "imid" "normaltest", "paymethod" "02", "currency" "idr", "bankcd" "cena", "amt" "10000", "referenceno" "ordno20221214151286", "merchanttoken" "c94d31f554faea1c5f28617dd0a9de70fcb4dc8de55a343bb887d032d95dd60a", "vacctvaliddt" "20221231", "vacctvalidtm" "235959", "merfixacctid" "", "dbprocessurl" "https //ptsv2 com/t/merchant/post/", "mitracd" "", "goodsnm" "goods for testing virtual account", "cartdata" "{}", "billingnm" "john doe", "billingphone" "081288998899", "billingemail" "john doe\@example com", "billingaddr" "jln raya kasablanka kav 88", "billingcity" "south jakarta", "billingstate" "dki jakarta", "billingpostcd" "12800", "billingcountry" "indonesia", "deliverynm" "delivery\@example com", "deliveryphone" "081288998899", "deliveryaddr" "jln raya kasablanka kav 88", "deliverycity" "south jakarta", "deliverystate" "dki jakarta", "deliverypostcd" "12800", "deliverycountry" "indonesia", "description" "testing registration virtual account", "reqdomain" "merchant com", "reqserverip" "127 0 0 1", "userip" "127 0 0 1", "usersessionid" "697d6922c961070967d3ba1ba5699c2c", "useragent" "mozilla/5 0 (windows nt 10 0; win64; x64) applewebkit/537 36 (khtml,like gecko) chrome/60 0 3112 101 safari/537 36", "userlanguage" "ko kr,en us;q=0 8,ko;q=0 6,en;q=0 4" } json response { "resultcd" "0000", "resultmsg" "success", "txid" "normaltest02202212141509411648", "referenceno" "ordno20221214151286", "paymethod" "02", "amt" "10000", "transdt" "20221214", "transtm" "150941", "description" "testing registration virtual account", "bankcd" "cena", "vacctno" "9912304000001486", "mitracd" null, "payno" null, "currency" "idr", "goodsnm" "goods for testing virtual account", "billingnm" "john doe", "vacctvaliddt" "20221231", "vacctvalidtm" "235959", "payvaliddt" null, "payvalidtm" null, "requesturl" null, "paymentexpdt" null, "paymentexptm" null, "qrcontent" null, "qrurl" null } java request //virtual account registration// nicepay settimestamp("20221202141217"); nicepay setimid("ionpaytest"); nicepay setpaymethod("02"); nicepay setcurrency("idr"); nicepay setamt("5000"); nicepay setreferenceno("ordno20221202141217"); nicepay setinstmnttype("1"); nicepay setinstmntmon("1"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay setgoodsnm("testing registration virtual account"); nicepay setbillingnm("john doe"); nicepay setbillingphone("081288998899"); nicepay setbillingemail("john doe\@example com"); nicepay setbillingaddr("jln raya kasablanka kav 88"); nicepay setbillingcity("south jakarta"); nicepay setbillingstate("dki jakarta"); nicepay setbillingcountry("indonesia"); nicepay setbillingpostcd("12800"); nicepay setdbprocessurl("http //ptsv2 com/t/merchant/post"); // request virtual account registration nicepay ccregist(); // response string // system out println("final response string " + nicepay getresponsestring()); string resultcd = nicepay get("resultcd"); string resultmsg = nicepay get("resultmsg"); string txid = nicepay get("txid"); string referenceno = nicepay get("referenceno"); string paymethod = nicepay get("paymethod"); string amt = nicepay get("amt"); string transdt = nicepay get("transdt"); string transtm = nicepay get("transtm");