NICEPAY API
...
Payment API
API Direct Debit
Registration - API Direct Debit
10 min
about api direct debit registration {{nicepay}} provides {{directdebit}} as a {{payment}} feature {{directdebit}} supported {{nicepay}} are jenius pay however, there are some specific differences for jenius, which locates in {{the}} addition of {{the}} request parameters, and also for request staging in jenius, which is done via https api for direct debit registration 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 direct debit registration the following is a list of {{parameter}} s for requesting registration of {{the}} {{directdebit}} {{paymethod}} this {{parameter}} uses 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 ) 20221212155200 imid required required an 10 {{merchant}} id ionpaytest paymethod required required n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 04 currency required required a 3 currency idr amt required required n 12 amount 5000 referenceno required required ans 40 {{merchant}} 's reference number order20221212155200 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 required required jsonstring 4000 cart data {} sellers json string 4000 seller data instmnttype n 2 installment type code docid\ wfsinjxqc2s9yubbybpep 2 instmntmon n 2 installment month required for cc 1 recurropt n 2 0 automatic cancel 1 do not cancel 2 do not make token 0 bankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l vacctvaliddt n 8 va expiry date ( yyyymmdd ) 20200303 vacctvalidtm n 6 va expiry time ( hh24miss ) merfixacctid an 40 {{merchant}} reserved va id mitracd a 4 mitra code docid 0upx1lyg1o2f4biu3ssp jenc userip an 15 user ip 127 0 0 1 dbprocessurl required required ans 255 notification url https //merchant com/dbprocessurl merchanttoken required required an 255 {{merchant}} token 6cfccfc0046773c1b589d8e 98f8b596c284f3c70a4ecf8 6eba14c18944b74bcd deliverynm a 30 delivery name dobleh\@merchant com deliveryphone n 15 delivery phone 081214714045 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}} vat n 12 {{vat}} 0 fee n 12 service fee 0 notaxamt n 12 tax free amount description an 100 transaction description testing merchanttoken an 255 {{merchant}} token 0dd1393f41bccbc33ed82cb514138aa5a46c24a6e55730868d264f3d80fb4fc1 reqdt n 8 request date ( yyyymmdd ) reqtm n 6 request time ( hh24miss ) reqdomain ans 100 request domain merchant com reqserverip ans 15 request server ip 127 0 0 1 userip required required an 15 user ip address 127 0 0 1 reqclientver ans 50 client version 1 0 usersessionid an 100 user session id usersessionid useragent ans 100 user agent mozilla userlanguage a 2 user language en us shopid an 32 shop id nicepay useragent required required ans 100 user agent information mozilla recurropt n 2 0 automatic cancel 1 do not cancel 2 do not make token 2 {{please}} visit direct debit docid\ pi11vnp1cqfszgtnf46cb {{section}} to learn general {{information}} about {{the}} {{directdebit}} {{paymethod}} additional information request for direct debit registration the {{parameter}} s below contain additional {{information}} regarding {{directdebit}} registration {{information}} parameter type size description example / notes paymethod required required n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 04 mitracd required required a 4 mitra code docid 0upx1lyg1o2f4biu3ssp jenc mrefno required required an 18 {{directdebit}} jenius reference number response parameter for direct debit registration the following is a list of response {{parameter}} s from registration requests in {{the}} {{directdebit}} {{transaction}} {{process}} parameter type size decription example / notes resultcd n 14 result code docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 result message error code docid 4 fpewlvczfhcvygxwck9 success txid an 30 transaction id ionpaytest04202212121554299694 referenceno ans 40 {{merchant}} reference number order20221212155200 paymethod n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 04 amt n 12 {{paymentproduct}} amount 5000 transdt n 8 transaction date ( yyyymmdd ) 20221212 transtm n 6 transaction time ( hh24miss ) 155431 description an 100 description testing bankcd an 4 bank code docid\ qbeq29lj53z vbvxtvb7l null vacctno n 20 va number null mitracd an 4 mitra code docid 0upx1lyg1o2f4biu3ssp jenc payno n 12 {{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 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 direct debit registration json request { 	"timestamp" "20221212155200", 	"imid" "ionpaytest", 	"paymethod" "04", 	"currency" "idr", 	"amt" "5000", 	"referenceno" "order20221212155200", 	"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" "jhon d", 	"deliveryphone" "081214714045", 	"deliveryaddr" "jalan bukit berbunga 22", 	"deliverycity" "jakarta", 	"deliverystate" "dki jakarta", 	"deliverypostcd" "12345", 	"deliverycountry" "indonesia", 	"dbprocessurl" "https //ptsv2 com/t/test nicepay v2", 	"vat" "", 	"fee" "", 	"notaxamt" "", 	"description" "testing", 	"merchanttoken" "0dd1393f41bccbc33ed82cb514138aa5a46c24a6e55730868d264f3d80fb4fc1", 	"reqdt" "", 	"reqtm" "", 	"reqdomain" "merchant com", 	"reqserverip" "127 0 0 1", 	"reqclientver" "", 	"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", 	"cartdata" "{\\"count\\" \\"1\\",\\"item\\" \[{\\"img url\\" \\"http //img aaa com/ima1 jpg\\",\\"goods name\\" \\"sepatu\\",\\"goods detail\\" \\"item 1 detail\\",\\"goods amt\\" \\"10000\\",\\"goods quantity\\" \\"2\\"}]}", "sellers" "\[{\\"sellersid\\" \\"nicepay namamerchant\\",\\"sellersnm\\" \\"nicepayshop\\",\\"sellersurl\\" \\"http //nicestore store/product/beanie/\\",\\"sellersemail\\" \\"nicepay\@nicepay co id\\",\\"sellersaddress\\" {\\"sellernm\\" \\"nicepayshop\\",\\"sellerlastnm\\" \\"nicepayshop\\",\\"selleraddr\\" \\"jln kasablanka kav 88\\",\\"sellercity\\" \\"jakarta\\",\\"sellerpostcd\\" \\"14350\\",\\"sellerphone\\" \\"082111111111\\",\\"sellercountry\\" \\"id\\"}}]", 	"instmnttype" "2", 	"instmntmon" "1", 	"recurropt" "0", 	"bankcd" "", 	"vacctvaliddt" "", 	"vacctvalidtm" "", 	"merfixacctid" "", 	"mitracd" "jenc" } json response { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest04202212121554299694", "referenceno" "order20221212155200", "paymethod" "04", "amt" "5000", "transdt" "20221212", "transtm" "155431", "description" "testing", "bankcd" null, "vacctno" null, "mitracd" "jenc", "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 //clickpay registration// nicepay settimestamp("20180123100505"); nicepay setimid("ionpaytest"); nicepay setpaymethod("04"); nicepay setcurrency("idr"); nicepay setamt("5000"); nicepay setreferenceno("ord54321"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay setgoodsnm("test transaction nicepay"); nicepay setbillingnm("john doe"); 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("jenc"); 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 clickpay 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");