NICEPAY API
...
Registration - API Credit Card
Full Payment & Installment - Registration API Credit Card
13 min
about full payment & installment registration api credit card full & installment type is a choice of types using a that pays a bill in full or installment (3, 6, or 12 months) full payment & installment registration api credit card api registration on is first step on doing docid\ s6jo6brhd9wgkkcj1ahmx with 180,558,117 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type request parameter for full payment & installment registration api credit card following is a list of s needed to request registration on 146,110,90,197,218 true unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type notes for credit card full payment & credit card installment for credit card full payment type, on instmnttype can fill with 1 or empty (null ) and on instmntmon can fill with 1 or empty (null) for credit card installment type, on instmnttype can fill with 2 and on instmntmon can fill with 3 (3 months), 6 (6 months) or 12 (12 months) cart data for full payment & installment registration api credit card cartdata on request at registration uses to cover goods or items will be paid to your including item detail and each item price 170,429,123 true unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type detail explaination on item 128,285,341 true unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type sample json cart data cartdata credit card registration { "count" "2", "item" \[ { "img url" "http //www merchant com/image goods1 jpg", "goods id" "niceprdid1", "goods name" "item 1 name", "goods detail" "item 1 detail", "goods amt" "1000" }, { "img url" "http //www merchant com/image goods2 jpg", "goods id" "niceprdid1", "goods name" "item 2 name", "goods detail" "item 2 detail", "goods amt" "1000" } ] } response parameter for full payment & installment registration api credit card following is response as result from request on registration 137,66,79,229,214,271 true unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type check docid\ taysz4wmthxupcvxy e48 to know common code also response code on or other s sample parameter for full payment & installment registration api credit card request parameter curl curl location 'https //dev nicepay co id/nicepay/direct/v2/registration' \\ \ header 'content type application/json' \\ \ data raw '{ "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" "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}", "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" }' node js const nicepayclient = require("nodejs nicepay"); let secondversion = new nicepayclient secondapiversion({ isproduction false, iscloudserver false, merchantkey "your merchant key", }); const parameter = { paymethod "01", currency "idr", amt "5000", referenceno "ordno20221202141217", 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", billingpostcd "12800", billingcountry "indonesia", description "testing registration credit card", dbprocessurl "http //ptsv2 com/t/merchant/post", userip "127 0 0 1", cartdata "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}", sellers "", bankcd "", useragent "mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0", mitracd "", instmntmon "1", instmnttype "1", shopid "", }; let endpoint = "/direct/v2/registration"; secondversion requestapi(parameter, endpoint); string reffno = "ordno20221202141217"; card requestdata = card builder() timestamp("20221202141217") imid("ionpaytest") paymethod("01") currency("idr") amt("5000") referenceno(reffno) 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") billingpostcd("12800") billingcountry("indonesia") dbprocessurl("http //ptsv2 com/t/merchant/post") userip("127 0 0 1") useragent("mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0") userlanguage("en") instmnttype("1") instmntmon("1") recurropt("") cartdata("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}") merchanttoken("20221202141217", "ionpaytest", reffno, "5000", merchantkey) build(); nicepayresponsev2 cardregistresponse = v2cardservice callv2cardregistration(requestdata, config); $useprod = false; $usecloud = false; $registration endpoint = "/nicepay/direct/v2/registration"; $url = httputil getnicepaydomain($useprod, $usecloud) $registration endpoint; $timestamp = "20221202141217"; $reference no = "ordno20221202141217"; $amt = "5000"; $merchant token = "c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae"; $body = \[ "timestamp" => $timestamp, "imid" => "ionpaytest", "paymethod" => "01", "currency" => "idr", "amt" => $amt, "merchanttoken" => $merchant token, "referenceno" => $reference no, "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" => "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}", "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" ]; $response = httputil postjsonrequest($url, $body); c# string merchantkey = config merkey; string clientid = config clientid; string timestamp = datetimeoffset now\ tostring("yyyymmddhhmmss"); string refno = $"ordno{timestamp}"; string amount = "5000"; bool isproduction = false; bool iscloudserver = false; var cartitem = new dictionary\<string, object> { { "goods id", "niceprdid1"}, { "img url", "http //www merchant com/image goods1 jpg" }, { "goods name", "testing transaction" }, { "goods detail", "testing transaction details" }, { "goods amt", "5000" } }; var cartdatabuilder = new buildercartdata() setcount("1") setitem(cartitem); var cartdata = cartdatabuilder build(); // generate merchant token var merchanttokenbuilder = new merchanttokenbuilder() settimestamp(timestamp) setimid(clientid) setrefno(refno) setamount(amount) setmerchantkey(merchantkey); string merchanttoken = merchanttokenbuilder buildmerchanttoken(); // build credit card request body var bodybuilder = new nicepayrequestbuilder() setcommonfields( imid clientid, timestamp timestamp, paymethod "01", // credit card currency "idr", amt amount, referenceno refno, goodsnm "testing transaction", merchanttoken merchanttoken ) setcreditcard( instmnttype "1", instmntmon "1", recurropt "" ) setbillinginfo( 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" ) setdbprocessurl("http //ptsv2 com/t/merchant/post") setcartdata(cartdata) setuserip("127 0 0 1") setuserlanguage("en") setuseragent("mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0"); apiendpoints apiendpoints = new apiendpoints(); // build payload and send dictionary\<string, object> payload = bodybuilder build(); string jsonpayload = newtonsoft json jsonconvert serializeobject(payload, newtonsoft json formatting indented); var registrationservice = new nicepayregistrationservice(apiendpoints, isproduction, iscloudserver); var result = await registrationservice sendpostasync(apiendpoints registv2, payload); vanilla js const registrationdata = { timestamp "20221202141217", paymethod "01", currency "idr", amt "5000", referenceno "ordno20221202141217", 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", billingpostcd "12800", billingcountry "indonesia", description "testing registration credit card", deliverynm "", deliveryphone "", deliveryaddr "", deliverycity "", deliverystate "", deliverypostcd "", deliverycountry "", dbprocessurl "http //ptsv2 com/t/merchant/post", merchanttoken "c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae", userip "127 0 0 1", cartdata "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}", useragent "mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0", instmntmon "1", instmnttype "1", }; const response = await nicepay registertransaction(registrationdata); laravel $useprod = false; $usecloud = false; $registration endpoint = "/nicepay/direct/v2/registration"; $url = httputil getnicepaydomain($useprod, $usecloud) $registration endpoint; $timestamp = "20221202141217"; $reference no = "ordno20221202141217"; $amt = "5000"; $merchant token = "c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae"; $body = \[ "timestamp" => $timestamp, "imid" => "ionpaytest", "paymethod" => "01", "currency" => "idr", "amt" => $amt, "merchanttoken" => $merchant token, "referenceno" => $reference no, "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" => "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}", "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" ]; $response = httputil postjsonrequest($url, $body); php native $config = nicepay builder() >setisproduction(false) >build(); $timestamp = "20221202141217"; $reffno = "ordno20221202141217"; $amount = "5000"; $parameter = card builder() >timestamp($timestamp) >imid("ionpaytest") >paymethod("01") >currency("idr") >amt($amount) >referenceno($reffno) >merchanttoken($timestamp, "ionpaytest", $reffno, $amount, $this >merchantkey) >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("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}") >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") >build(); $cardservice = new v2cardservice($config); var config nicepay? = nicepay builder() isproduction(false) clientsecret(testingconstants client secret) partnerid(testingconstants partner id) externalid(testingconstants external id) timestamp(testingconstants timestamp) privatekey(testingconstants private key) build() val request directv2card = directv2card builder() 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") userip("127 0 0 1") instmnttype("1") instmntmon("1") recurropt("") cartdata("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}") userlanguage("en") useragent("mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0") build() val response nicepayresponsev2 = v2cardservice registration(request, config)!! codeigniter $timestamp = "20221213101276"; $configbuilder = nicepay builder(); $config = $configbuilder >setisproduction(false) >setiscloudserver(true) >build(); $reffno = "ordno20221213101276"; $amount = "5000"; $cardbuilder = card builder(); $parameter = $cardbuilder >settimestamp($timestamp) >setimid("recurrtest") >setpaymethod("01") >setcurrency("idr") >setamt($amount) >setreferenceno($reffno) >setmerchanttoken($timestamp, "recurrtest", $reffno, $amount, $this >merchantkey) // ✅ unchanged logic >setgoodsnm("goods for testing") >setbillingnm("john doe") >setbillingphone("081288998899") >setbillingemail("john doe\@example com") >setbillingaddr("jln raya kasablanka kav 88") >setbillingcity("south jakarta") >setbillingstate("dki jakarta") >setbillingcountry("indonesia") >setbillingpostcd("12800") >setcartdata("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"testing transaction\\",\\"goods detail\\" \\"testing transaction details\\",\\"goods amt\\" \\"5000\\"}]}") >setdbprocessurl("http //ptsv2 com/t/merchant/post") >setuserip("127 0 0 1") >setinstmnttype("1") >setinstmntmon("1") >setrecurropt("") >setuserlanguage("en") >setuseragent("mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0") >build(); $cardservice = new v2cardservice($config); $response = $cardservice >registration($parameter); response parameter sample response { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest01202510080949037182", "referenceno" "ordno20221202141217", "paymethod" "01", "amt" "5000", "transdt" "20251008", "transtm" "094903", "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 } after you done integrate this , please continue to docid\ bliefzuf9etdz7mb9hmgw