NICEPAY API
...
Registration - API Credit Card
Recurring - Registration API Credit Card
13 min
tentang recurring registration api credit card pembayaran tipe recurring adalah pilihan tipe {{pembayaran}} menggunakan {{kartukredit}} {{yang}} melakukan {{pembayaran}} suatu tagihan secara berkala dengan nominal {{yang}} sama seperti {{yang}} ditagihkan pada awal {{pembayaran}} {{api}} {{yang}} digunakan pada tahap pendaftaran sama dengan {{api}} untuk mendaftarkan tipe full {{paymentproduct}} & installment, namun terdapat perbedaan pada request {{parameter}} {{yang}} dikirimkan pelajari mengenai fitur {{cc}} {{paymentproduct}} dengan recurring di docid\ cglxg10p9zmvtux b7ga {{silakan}} mengunjungi {{halaman}} docid 1phq xu3dpep4hzx41lqg untuk mempelajari {{informasi}} umum seputar {{kartukredit}} recurring registration api credit card 182,562,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 recurring registration api credit card berikut ini adalah daftar {{parameter}} untuk melakukan {{proses}} {{integrasi}} recurring untuk {{metodebayar}} {{kartukredit}} 146,110,71,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 cart data for recurring registration api credit card cartdata pada request {{parameter}} di registrasi {{kartukredit}} berguna untuk meliputi barang atau item apa saja {{yang}} akan dibayarkan oleh {{pelanggan}} {{anda}} berserta rincian dan harga per item parameter deskripsi contoh count total jumlah dari keseluruhan cart data 2 item terbagi menjadi 5 macam {{parameter}} , yaitu img url , goods id , goods name , goods detail , dan goods amt penjelasan detil pada {{parameter}} item parameter deskripsi contoh img url url gambar barang (ukuran 50px x 50px) htttps\ //www merchant com/image goods1 jpg goods id id barang niceprdid1 goods name nama barang nama item 1 goods detail deskripsi detail barang detail item 1 goods amt harga barang 1000 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 recurring registration api credit card berikut adalah response {{parameter}} dari hasil request {{parameter}} untuk {{proses}} {{integrasi}} recurring pada {{kartukredit}} 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 sample parameter for recurring 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" "20221213101276", "imid" "recurrtest", "paymethod" "01", "currency" "idr", "amt" "5000", "merchanttoken" "ed9c8640b6260c8fa7070aa4e38df87896f9777899af354ee6d3d61f64626c0c", "referenceno" "ordno20221213101276", "goodsnm" "goods for testing", "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", "cartdata" "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"goods for testing\\",\\"goods detail\\" \\"goods for testing details\\",\\"goods amt\\" \\"5000\\",\\"goods quantity\\" \\"1\\"}]}", "dbprocessurl" "http //ptsv2 com/t/merchant/post", "userip" "127 0 0 1", "instmnttype" "1", 	"instmntmon" "1", "recurropt" "1", "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 = { timestamp "20221213101276", imid "recurrtest", paymethod "01", currency "idr", amt "5000", referenceno "ordno20221213101276", goodsnm "goods for testing", 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", cartdata "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"goods for testing\\",\\"goods detail\\" \\"goods for testing details\\",\\"goods amt\\" \\"5000\\",\\"goods quantity\\" \\"1\\"}]}", dbprocessurl "http //ptsv2 com/t/merchant/post", userip "127 0 0 1", instmnttype "1", instmntmon "1", recurropt "1", userlanguage "en", useragent "mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0", }; 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") description("testing registration credit card") deliverynm("") deliveryphone("") deliveryaddr("") deliverycity("") deliverystate("") deliverypostcd("") deliverycountry("") 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") instmnttype("1") instmntmon("1") recurropt("1") cartdata("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"goods for testing\\",\\"goods detail\\" \\"goods for testing details\\",\\"goods amt\\" \\"5000\\",\\"goods quantity\\" \\"1\\"}]}") merchanttoken("20221202141217", "ionpaytest", reffno, "5000", merchantkey) build(); nicepayresponsev2 cardregistresponse = v2cardservice callv2cardregistration(requestdata, config); amt = 1000 itemcartdata = { "goods id" "niceprdid1", "goods detail" "bb12345678", "goods name" "market", "goods amt" amt, "goods url" "https //merchant com/cellphones/iphone5s 64g", } bodycartdata = ( buildercartdata buildcartdata() setcount("1") setitem(itemcartdata) build() ) bodycreditcard = ( buildercreditcard buildcreditcard() setpaymethod(constantsgeneral getpaymethodcreditcard()) setrecurropt("1") setinstmntmon("1") setinstmnttype("1") setamt(str(amt)) build() ) environment = ( builderenvironment buildenvironment() iscloud(false) isproduction(false) build() ) c# string merchantkey = config merkey; string clientid = config clientid; string timestamp = "20221213101276"; string refno = "ordno20221213101276"; string amount = "5000"; bool isproduction = false; bool iscloudserver = false; // 1️⃣ generate merchant token var merchanttokenbuilder = new merchanttokenbuilder() settimestamp(timestamp) setimid(clientid) setrefno(refno) setamount(amount) setmerchantkey(merchantkey); string merchanttoken = merchanttokenbuilder buildmerchanttoken(); // 2️⃣ build cart data var cartitem = new dictionary\<string, object> { {"goods id", "ionpaytestprd1"}, { "img url", "http //www merchant com/image goods1 jpg" }, { "goods name", "goods for testing" }, { "goods detail", "goods for testing details" }, { "goods amt", "5000" } }; var cartdatabuilder = new buildercartdata() setcount("1") setitem(cartitem); var cartdata = cartdatabuilder build(); // 3️⃣ build credit card request body var bodybuilder = new nicepayrequestbuilder() setcommonfields( imid "recurrtest", timestamp timestamp, paymethod "01", currency "idr", amt amount, referenceno refno, goodsnm "goods for testing", 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(); // 4️⃣ 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\\" \\"goods for testing\\",\\"goods detail\\" \\"goods for testing details\\",\\"goods amt\\" \\"5000\\",\\"goods quantity\\" \\"1\\"}]}", useragent "mozilla/5 0 (windows nt 6 1; win64; x64; rv 47 0) gecko/20100101 firefox/47 0", instmntmon "1", instmnttype "1", recurropt "1" }; // example payment data object if needed (adjust per your code) const paymentdata = { cardno "4811111111111114", expmonth "12", expyear "2025", cvv "123", }; (async () => { try { const response = await nicepay registertransaction(registrationdata, paymentdata); console log("transaction response ", response); } catch (error) { console error("registration failed ", error); } })(); laravel $useprod = false; $usecloud = false; $registration endpoint = "/nicepay/direct/v2/registration"; $url = httputil getnicepaydomain($useprod, $usecloud) $registration endpoint; $timestamp = "20221213101276"; $reference no = "ordno20221213101276"; $amt = "5000"; $merchant token = "ed9c8640b6260c8fa7070aa4e38df87896f9777899af354ee6d3d61f64626c0c"; $body = \[ "timestamp" => $timestamp, "imid" => "recurrtest", "paymethod" => "01", "currency" => "idr", "amt" => $amt, "merchanttoken" => $merchant token, "referenceno" => $reference no, "goodsnm" => "goods for testing", "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", "cartdata" => "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"goods for testing\\",\\"goods detail\\" \\"goods for testing details\\",\\"goods amt\\" \\"5000\\",\\"goods quantity\\" \\"1\\"}]}", "dbprocessurl" => "http //ptsv2 com/t/merchant/post", "userip" => "127 0 0 1", "instmnttype" => "1", "instmntmon" => "1", "recurropt" => "1", "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() >settimestamp($timestamp) >setimid("ionpaytest") >setpaymethod("01") >setcurrency("idr") >setamt($amount) >setreferenceno($reffno) >setmerchanttoken($timestamp, "ionpaytest", $reffno, $amount, $this >merchantkey) >setdescription("testing registration credit card") >setgoodsnm("testing transaction") >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") >setdbprocessurl("http //ptsv2 com/t/merchant/post") >setcartdata("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"goods for testing\\",\\"goods detail\\" \\"goods for testing details\\",\\"goods amt\\" \\"5000\\",\\"goods quantity\\" \\"1\\"}]}") >setuserip("127 0 0 1") >setinstmnttype("1") >setinstmntmon("1") >setrecurropt("1") >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); 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") 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") 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("1") cartdata("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"goods for testing\\",\\"goods detail\\" \\"goods for testing details\\",\\"goods amt\\" \\"5000\\",\\"goods quantity\\" \\"1\\"}]}") merchantkey(default merchant key) build() val response nicepayresponsev2 = v2cardservice registration(request, config)!! codeigniter $timestamp = "20221202141217"; $configbuilder = nicepay builder(); $config = $configbuilder >setisproduction(false) >setiscloudserver(iscloudserver true) >build(); $reffno = "ordno20221202141217"; $amount = "5000"; $cardbuilder = card builder(); $parameter = $cardbuilder >settimestamp($timestamp) >setimid("ionpaytest") >setpaymethod("01") >setcurrency("idr") >setamt($amount) >setreferenceno($reffno) >setmerchanttoken($timestamp, "ionpaytest", $reffno, $amount, $this >merchantkey) >setdescription("testing registration credit card") >setgoodsnm("testing transaction") >setbillingnm("john doe") >setbillingphone("081288998899") >setbillingemail("john doe\@example com") >setbillingaddr("jln raya kasablanka kav 88") >setbillingcity("south jakarta") >setbillingstate("dki jakarta") >setbillingpostcd("12800") >setbillingcountry("indonesia") >setdbprocessurl("http //ptsv2 com/t/merchant/post") >setcartdata("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"niceprdid1\\",\\"img url\\" \\"http //www merchant com/image goods1 jpg\\",\\"goods name\\" \\"goods for testing\\",\\"goods detail\\" \\"goods for testing details\\",\\"goods amt\\" \\"5000\\",\\"goods quantity\\" \\"1\\"}]}") >setuserip("127 0 0 1") >setinstmnttype("1") >setinstmntmon("1") >setrecurropt("1") >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" "recurrtest01202510081035159576", "referenceno" "ordno20221213101276", "paymethod" "01", "amt" "5000", "transdt" "20251008", "transtm" "103515", "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 }