NICEPAY API
...
API Credit Card
Registration - API Credit Card
Full Payment & Installment - Registration API Credit Card
11 min
about full payment & installment registration api credit card full {{paymentproduct}} & installment {{payment}} type is a choice of {{payment}} types using a {{cc}} that pays a bill in full or installment (3, 6, or 12 months) full payment & installment registration api credit card api registration on {{cc}} {{paymethod}} is {{the}} first step on doing payment api docid\ s6jo6brhd9wgkkcj1ahmx {{integration}} with {{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 credit card registration following is a list of {{parameter}} s needed to request {{the}} registration on {{api}} {{cc}} {{paymethod}} parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20221202141217 imid required required an 10 {{merchant}} id ionpaytest paymethod required required n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 01 currency required required a 3 currency idr amt required required n 12 amount (number not in float format) 10000 (sum amount total goods from cartdata ) referenceno required required ans 40 {{merchant}} 's reference number ordno20221202141217 goodsnm required required an 100 goods name testing transaction billingnm required required a 100 buyer name john doe billingphone required required n 15 buyer phone number 2112345678 billingemail required required ans 40 buyer e mail buyer\@merchant 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 14350 billingcountry required required a 10 billing country {{indonesia}} cartdata required required jsonstring 4000 cart data {} instmnttype required required n 2 installment type code docid\ wfsinjxqc2s9yubbybpep 1 instmntmon required required n 2 installment month 1 1 month/full {{paymentproduct}} , if instmnttype null/1 3 3 months 6 6 months 12 12 months 1 recurropt required required n 2 0 automatic cancel 1 do not cancel 2 do not make token 2 dbprocessurl required required ans 255 notification url https //merchant com/dbprocessurl userip required for cc, e wallet, payloan, qris required for cc, e wallet, payloan, qris an 15 user ip 127 0 0 1 merchanttoken required required an 255 {{merchant}} token c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae description an 100 transaction description test transaction usersessionid an 100 user session id usersessionid useragent ans 100 user agent mozilla userlanguage a 2 user language en us notes for credit card full payment & credit card installment for credit card full payment {{payment}} type, on instmnttype {{parameter}} can fill with 1 or empty (null ) and on instmntmon {{parameter}} can fill with 1 or empty (null) for credit card installment {{payment}} type, on instmnttype {{parameter}} can fill with 2 and on instmntmon {{parameter}} can fill with 3 (3 months), 6 (6 months) or 12 (12 months) cart data registration api credit card cartdata on request {{parameter}} at {{cc}} registration uses to cover {{the}} goods or items will be paid to your {{customer}} including {{the}} item detail and each item price parameter description example count total sum from {{the}} whole cart data 2 item divide into 4 types of {{parameter}} such as img url , goods name , goods detail and goods amt detail explaination on item {{parameter}} parameter description example img url url item picture (size 50px x 50px) htttps\ //www merchant com/image goods1 jpg goods name item name nama item 1 goods detail item detail description detail item 1 goods amt item price 1000 sample json cart data cartdata credit card 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" } ] } response parameter for credit card registration following is {{the}} response {{parameter}} as result from request {{parameter}} on {{cc}} registration {{api}} parameter type size description example / notes resultcd n 4 result code docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 result message error code docid 4 fpewlvczfhcvygxwck9 success txid an 30 transaction id ionpaytest01202212151029182023 referenceno ans 40 {{merchant}} reference number ordno20221215101254 paymethod n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 01 amt n 12 {{paymentproduct}} amount 10000 transdt n 8 transaction date ( yyyymmdd ) 20221212 transtm n 6 transaction time ( hh24miss ) 121212 description an 100 transaction description testing transaction {{cc}} bankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l null vacctno n 20 {{va}} null mitracd a 4 mitra code docid 0upx1lyg1o2f4biu3ssp null payno n 12 cvs {{paymentproduct}} number null currency a 3 currency idr goodsnm an 100 goods name goods for testing transaction billingnm a 100 buyer name john doe 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 {{please}} check nicepay code docid\ taysz4wmthxupcvxy e48 to know {{the}} common code also response code on {{cc}} {{paymethod}} or other {{nicepay}} {{paymethod}} s sample json registration api credit card json request { "timestamp" "20221202141217", "imid" "ionpaytest", "paymethod" "01", "currency" "idr", "amt" "5000", "merchanttoken" "c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae", "referenceno" "ordno20221202141217", "description" "testing registration credit card", "goodsnm" "testing transaction", "billingnm" "john doe", "billingphone" "081288998899", "billingemail" "john doe\@example com", "billingaddr" "jln raya kasablanka kav 88", "billingcity" "south jakarta", "billingstate" "dki jakarta", "billingcountry" "indonesia", "billingpostcd" "12800", "dbprocessurl" "http //ptsv2 com/t/merchant/post", "cartdata" "{}", "userip" "127 0 0 1", "instmnttype" "1", 	"instmntmon" "1", "recurropt" "", "userlanguage" "en", "useragent" "mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0" } json response { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest01202212021455054652", "referenceno" "ordno20221202141217", "paymethod" "01", "amt" "5000", "transdt" "20221202", "transtm" "145507", "description" "testing registration credit card", "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 //credit card registration// nicepay settimestamp("20221202141217"); nicepay setimid("ionpaytest"); nicepay setpaymethod("01"); nicepay setcurrency("idr"); nicepay setamt("5000"); nicepay setdesciption("testing registration credit card") nicepay setreferenceno("ordno20221202141217"); nicepay setinstmnttype("1"); nicepay setinstmntmon("1"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay setgoodsnm("testing transaction"); 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 credit card 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"); after you done integrate this {{api}} , please continue to {{the}} payment api credit card docid\ bliefzuf9etdz7mb9hmgw {{process}}