NICEPAY API
...
API Convenience Store
Registration - API Convenience Store
10 min
about api convenience store registration {{nicepay}} provides department stores (indomaret and alfamart group) as a {{paymethod}} so {{customer}} s can {{proceed}} with {{payment}} s through department store partners outlets throughout {{indonesia}} real time {{notification}} s will send directly when {{the}} {{payment}} is successful {{nicepay}} department store {{partner}} s alfamart indomaret lawson alfamidi dan+dan store api convenience store registration this {{api}} uses to activate {{the}} {{cvs}} {{paymethod}} s for {{merchant}} s, so {{the}} {{customer}} can {{proceed}} with {{payment}} {{transaction}} s using {{the}} {{cvs}} with {{merchant}} s this stage uses to integrate {{the}} {{merchant}} {{system}} with {{the}} {{nicepay}} {{system}} 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 {{please}} visit docid\ taysz4wmthxupcvxy e48 {{page}} to find out a list of code terms related to {{the}} {{api}} {{system}} request parameter for convenience store registration the following is a list of {{parameter}} s for requesting registration of {{the}} {{cvs}} {{paymethod}} this {{parameter}} uses in {{the}} {{api}} {{testing}} platform as one of {{the}} stages so that {{the}} {{merchant}} 's {{system}} can connect with {{nicepay}} {{service}} s parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20221202152801 imid required required an 10 {{merchant}} id ionpaytest paymethod required required n 2 docid\ ek 0djw7nuhytcda4sa3p 03 currency required required a 3 currency idr amt required required n 12 amount 5000 referenceno required required ans 40 {{merchant}} 's reference number order12345 goodsnm required required an 100 goods name test transaction {{nicepay}} billingnm required required a 100 buyer name john doe billingphone required required n 15 buyer phone number 081214714045 billingemail required required ans 40 buyer e mail email\@merchant com billingaddr required required an 100 buyer address jalan bukit berbunga 22 billingcity required required a 50 buyer city jakarta billingstate required required a 50 billing state dki jakarta billingpostcd required required n 10 billing post number 12345 billingcountry required required a 10 billing country {{indonesia}} cartdata jsonstring 4000 cart data mitracd required required a 4 docid 0upx1lyg1o2f4biu3ssp alma userip an 15 user ip 127 0 0 1 dbprocessurl required required ans 255 notification url https //ptsv2 com/t/test nicepay v2 merchanttoken required required an 255 {{merchant}} token fa79a58a73bf9f6d07ce84daaabb8f23da6ca61d478d4e917d2e259d5c7e1106 deliverynm a 30 delivery name {{customer}} @merchant com deliveryphone n 15 delivery phone 12345678 deliveryaddr an 100 delviery address jalan bukit berbunga 22 deliverycity a 50 delivery city jakarta deliverystate a 50 delivery state dki jakarta deliverypostcd n 10 delivery post code 12345 deliverycountry a 10 delivery country {{indonesia}} description an 100 transaction description reqdomain ans 100 request domain merchant com reqserverip ans 15 request server ip 127 0 0 1 reqclientver ans 50 client version usersessionid an 100 user session id 697d6922c961070967d3ba1ba5699c2c {{please}} visit docid\ k8kqx3hogmslt273cgmo4 {{section}} to learn general {{information}} about {{cvs}} {{paymethod}} s additional information request for convenience store registration the {{parameter}} s below contain additional {{information}} regarding {{cvs}} registration {{information}} parameter type size description example / notes paymethod required required n 2 {{cvs}} 03 mitracd required required a 4 {{merchant}} id ionpaytest payvaliddt required required n 8 cvs expiry date ( yyyymmdd ) 20221212 payvalidtm required required n 6 cvs expiry time ( hh24miss ) 201012 response parameter for convenience store registration the following is a list of responses to requests for {{status}} inquiry in {{the}} {{cvs}} {{transaction}} {{process}} 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 ionpaytest03202212021529034686 referenceno ans 40 {{merchant}} reference number order12345 paymethod n 2 docid\ ek 0djw7nuhytcda4sa3p 03 amt n 12 {{paymentproduct}} amount 5000 transdt n 8 transaction date ( yyyymmdd ) 20221202 transtm n 6 transaction time ( hh24miss ) 152903 description an 100 description null bankcd an 4 docid\ qbeq29lj53z vbvxtvb7l null vacctno n 20 va number null mitracd an 4 docid 0upx1lyg1o2f4biu3ssp alma payno n 12 {{paymentproduct}} number 9041021529034686 currency an 3 currency null goodsnm an 100 goods name null billingnm a 100 buyer name null vacctvaliddt n 8 va expiry date ( yyyymmdd ) null vacctvalidtm n 6 va expiry time ( hh24miss ) null 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 for convenience store registration json request { 	"timestamp" "20221202152801", 	"imid" "ionpaytest", 	"paymethod" "03", 	"currency" "idr", 	"amt" "5000", 	"referenceno" "order12345", 	"goodsnm" "test transaction nicepay", 	"billingnm" "john doe", 	"billingphone" "081214714045", 	"billingemail" "email\@merchant com", 	"billingaddr" "jalan bukit berbunga 22", 	"billingcity" "jakarta", 	"billingstate" "dki jakarta", 	"billingpostcd" "12345", 	"billingcountry" "indonesia", 	"deliverynm" "customer\@merchant com", 	"deliveryphone" "12345678", 	"deliveryaddr" "jalan bukit berbunga 22", 	"deliverycity" "jakarta", 	"deliverystate" "dki jakarta", 	"deliverypostcd" "12345", 	"deliverycountry" "indonesia", 	"dbprocessurl" "https //ptsv2 com/t/test nicepay v2", 	"description" "", 	"merchanttoken" "fa79a58a73bf9f6d07ce84daaabb8f23da6ca61d478d4e917d2e259d5c7e1106", 	"reqdt" "", 	"reqtm" "", 	"reqdomain" "merchant com", 	"reqserverip" "127 0 0 1", 	"reqclientver" "", 	"userip" "127 0 0 1", 	"usersessionid" "697d6922c961070967d3ba1ba5699c2c", 	"mitracd" "alma" } json response { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest03202212021529034686", "referenceno" "order12345", "paymethod" "03", "amt" "5000", "transdt" "20221202", "transtm" "152903", "description" null, "bankcd" null, "vacctno" null, "mitracd" "alma", "payno" "9041021529034686", "currency" null, "goodsnm" null, "billingnm" null, "vacctvaliddt" null, "vacctvalidtm" null, "payvaliddt" "20221209", "payvalidtm" "235959", "requesturl" null, "paymentexpdt" null, "paymentexptm" null, "qrcontent" null, "qrurl" null } java request //csv registration// nicepay settimestamp("20180123100505"); nicepay setimid("ionpaytest"); nicepay setpaymethod("03"); nicepay setcurrency("idr"); nicepay setamt("5"); nicepay setreferenceno("ord54321"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay setgoodsnm("test transaction nicepay"); nicepay setbillingnm("andi pamungkas"); nicepay setbillingphone("081234567890"); nicepay setbillingemail("email\@merchant com"); nicepay setbillingaddr("jln raya kasablanka kav 88"); nicepay setbillingcity("south jakarta"); nicepay setbillingstate("dki jakarta"); nicepay setbillingcountry("indonesia"); nicepay setbillingpostcd("12800"); nicepay setdbprocessurl("https //ptsv2 com/t/rizal/post"); nicepay setmirtacd("alma"); nicepay setcarddata("{\\"count\\" 1,\\"item\\" \[{\\"img url\\" \\"http \\\\\\/\\\\\\/www jamgora com\\\\\\/media\\\\\\/avatar\\\\\\/noimage png\\",\\"goods name\\" \\"hoodie\\",\\"goods detail\\" \\"hoodie\\",\\"goods amt\\" \\"5\\"}]}"); nicepay setpayvaliddt("20231101"); nicepay setpayvalidtm("190000"); // request csv registration nicepay qrisregist(); // 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");