NICEPAY API
...
API GPN
Registration - API GPN
11 min
about api for gpn registration on {{the}} {{gpn}} {{paymethod}} , {{the}} {{customer}} gets a lot of benefits other than accessibility and efficiency because {{the}} {{customer}} can use an atm card with {{the}} {{gpn}} logo for any {{bank}} {{transaction}} using an edc machine from any {{bank}} throughout {{indonesia}} api for gpn registration {{gpn}} registration aims to connect {{the}} {{merchant}} to {{the}} {{gpn}} {{api}} {{paymentproduct}} {{system}} available on {{nicepay}} so {{the}} {{payment}} {{system}} that prepares and hosts from {{the}} {{merchant}} side can integrate 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 {{the}} docid\ e4q7ba jvpfrfbuijrryy {{section}} to learn general {{information}} related {{the}} {{gpn}} {{paymethod}} request parameter for gpn registration the following is a list of {{parameter}} s for requesting registration of {{the}} {{gpn}} {{paymethod}} this {{parameter}} is used through {{the}} {{api}} {{testing}} platform as one of {{the}} stages so that {{the}} {{merchant}} 's {{system}} can connect with {{nicepay}} {{service}} s the cartdata detail {{information}} is optional to be added parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20200813103605 imid required required an 10 {{merchant}} id ionpaytest paymethod required required n 2 docid\ ek 0djw7nuhytcda4sa3p 09 currency required required a 3 currency idr amt required required n 12 amount 1000 referenceno required required ans 40 {{merchant}} 's reference number order12345 goodsnm required required an 100 goods name testing normal full payment {{gpn}} billingnm required required a 100 buyer name {{customer}} name billingphone required required n 15 buyer phone number 12345678 billingemail required required ans 40 buyer e mail email\@merchant com 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 required required jsonstring 4000 cart data optional instmnttype required required n 2 docid\ wfsinjxqc2s9yubbybpep 1 instmntmon required required n 2 installment month 1 recurropt required required n 2 0 automatic cancel 1 do not cancel 2 do not make token 2 dbprocessurl ans 255 notification url https //ptsv2 com/t/rizal/post merchanttoken an 255 {{merchant}} token 129b8f6ce5c94e7c6200dee63a42a05caa4175ba4523068651d3e17a3208772c userip an 15 user ip 127 0 0 1 response parameter for gpn registration the following is {{the}} response {{parameter}} from {{the}} result of {{the}} request {{parameter}} to register on {{the}} {{gpn}} {{paymethod}} parameter type size description example / notes resultcd n 4 docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 result message docid 4 fpewlvczfhcvygxwck9 success txid an 30 transaction id ionpaytest09202212070935176733 referenceno ans 40 {{merchant}} reference number order12345 paymethod n 2 docid\ ek 0djw7nuhytcda4sa3p 09 amt n 12 {{paymentproduct}} amount 1000 transdt n 8 transaction date ( yyyymmdd ) 20221207 transtm n 6 transaction time ( hh24miss ) 093518 description an 100 transaction description null vacctno n 20 va number null mitracd a 4 docid 0upx1lyg1o2f4biu3ssp null payno n 12 cvs {{paymentproduct}} number null currency a 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 6 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 gpn registration json request { "timestamp" "20200813103605", "imid" "ionpaytest", "paymethod" "09", "currency" "idr", "amt" "1000", "referenceno" "order12345", "goodsnm" "testing normal full payment gpn", "billingnm" "customer name", "billingphone" "12345678", "billingemail" "email\@merchant com", "billingcity" "jakarta", "billingstate" "dki jakarta", "billingpostcd" "12345", "billingcountry" "indonesia", "dbprocessurl" "https //ptsv2 com/t/rizal/post", "merchanttoken" "129b8f6ce5c94e7c6200dee63a42a05caa4175ba4523068651d3e17a3208772c", "userip" "127 0 0 1", "instmnttype" "1", 	"instmntmon" "1", 	"recurropt" "1" } json response { 	"resultcd" "0000", 	"resultmsg" "success", 	"txid" "ionpaytest09202212070935176733", 	"referenceno" "order12345", 	"paymethod" "09", 	"amt" "1000", 	"transdt" "20221207", 	"transtm" "093518", 	"description" null, 	"bankcd" null, 	"vacctno" null, 	"mitracd" null, 	"payno" null, 	"currency" null, 	"goodsnm" null, 	"billingnm" null, 	"vacctvaliddt" null, 	"vacctvalidtm" null, 	"payvaliddt" null, 	"payvalidtm" null, 	"requesturl" null, 	"paymentexpdt" null, 	"paymentexptm" null, 	"qrcontent" null, 	"qrurl" null } java request //gpn registration// nicepay settimestamp("20221202141217"); nicepay setimid("ionpaytest"); nicepay setpaymethod("09"); nicepay setcurrency("idr"); nicepay setamt("5000"); nicepay setreferenceno("ordno20221202141217"); nicepay setdecription("test gpn"); nicepay setinstmnttype("1"); nicepay setinstmntmon("1"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay setgoodsnm("testing registration gpn"); 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"); nicepay setcarddata("{\\"count\\" 1,\\"item\\" \[{\\"img url\\" \\"http \\\\\\/\\\\\\/www jamgora com\\\\\\/media\\\\\\/avatar\\\\\\/noimage png\\",\\"goods name\\" \\"hoodie\\",\\"goods detail\\" \\"hoodie\\",\\"goods amt\\" \\"5000\\"}]}"); // request gpn registration nicepay gpnregist(); // 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"); cart data gpn registration cartdata in {{gpn}} registration is useful for declaring what items will be checked out along with item details and {{the}} price for each item parameter description example count the total number of all card data 2 item it is divided into 4 kinds of {{parameter}} s, namely img url , goods name , goods detail , and goods amt detailed explanation on item {{parameter}} s parameter description example img url url goods picture (size 50px x 50px) htttps\ //www merchant com/image goods1 jpg goods name goods name nama item 1 goods detail goods detail description detail item 1 goods amt goods price 1000 cartdata gpn registration { "count" "2", "item" \[ { "img url" "http //www merchant com/image goods1 jpg", "goods name" "item 1 name", "goods detail" "item 1 detail", "goods amt" "1000" }, { "img url" "http //www merchant com/image goods2 jpg", "goods name" "item 2 name", "goods detail" "item 2 detail", "goods amt" "1000" } ] }