NICEPAY API
...
Checkout API
Registration - API Checkout
20 min
tentang registration api checkout langkah pada registration api checkout ini berfungsi untuk mendaftarkan sebuah request checkout belanja dari kepada kami sehingga dapat membayar jumlah yang ditagihkan pada payment page sediakan pada prinsipnya, semua pada memiliki sama hanya saja membedakan adalah pada setiap pada saat melakukan , melakukan pendaftaran pesanan sebelum dapat melakukan pada diinginkan melalui tautan didapatkan kunjungi docid\ iewj7vv ejtgaa2m7o5p2 untuk mengetahui penjelasan lebih rinci terkait khusus registration api checkout (all payment method) untuk dapat menggunakan seluruh pada kecuali , diperlukan untuk mendaftarkan tersebut dengan registrasi ini berikut nya 330,331 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 registration api checkout 157,68,71,190,206 true unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type konfigurasi payment method & bank/mitra untuk pelanggan parameter paymethod memungkinkan untuk mengatur ditampilkan kepada pada true 330,330left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type jika ingin menampilkan seluruh seperti biasa, silakan gunakan paymethod = '00' tanpa perlu menambahkan bankcd maupun mitracd kode paymethod yang sesuai digunakan untuk mengarahkan ke tertentu pada beberapa , juga dapat menentukan kanal secara spesifik menggunakan bankcd atau mitracd contoh menampilkan semua yang tersedia → paymethod = '00' hanya menampilkan → paymethod = '01' hanya menampilkan bca → paymethod = '02' , bankcd = 'cena' hanya menampilkan dana → paymethod = '05' , mitracd = 'dana' catatan penting mengenai penggunaan parameter bank/mitra parameter bankcd hanya dapat digunakan untuk ( 02 ) parameter mitracd hanya dapat digunakan untuk ( 03 ), ( 04 ), ( 05 ), dan ( 06 ) parameter bankcd dan mitracd tidak dapat digunakan pada ( 01 ) dan ( 08 ) response parameters for registration api checkout 170,77,73,100,191 true unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type unhandled content type left unhandled content type left unhandled content type unhandled content type unhandled content type setelah sudah didaftarkan, arahkan langsung menuju kami untuk melakukan periksa docid\ iewj7vv ejtgaa2m7o5p2 untuk mengetahui penjelasan lebih rinci sample parameter for registration api checkout request parameter curl curl location 'https //dev nicepay co id/nicepay/redirect/v2/registration' \\ \ header 'content type application/json' \\ \ data raw '{ "timestamp" "20251110141120", "imid" "ionpaytest", "paymethod" "00", "currency" "idr", "referenceno" "ordno20251110141120", "merchanttoken" "9da3d4c498aab78d9aa5f320713d3fffad1d50acd4d2d1ea9d18bb164bbf0d60", "mitracd" "", "amt" "10000", "instmnttype" "1", "instmntmon" "1", "callbackurl" "https //dev nicepay co id/ionpay client/paymentresult jsp", "dbprocessurl" "https //ptsv2 com/t/sibedul/post", "goodsnm" "goods", "billingnm" "hantu kesorean", "billingphone" "081234567890", "billingemail" "sample\@mail com", "billingaddr" "jl sample address", "billingcity" "south jakarta", "billingstate" "dki jakarta", "billingcountry" "indonesia", "billingpostcd" "12800", "deliverynm" "john doe", "deliveryphone" "081234567890", "deliveryaddr" "jln sample address", "deliverycity" "west jakarta", "deliverystate" "dki jakarta", "deliverycountry" "indonesia", "deliverypostcd" "12800", "description" "testing checkout api", "userip" "127 0 0 1", "userlanguage" "ko kr,en us;q=0 8,ko;q=0 6,en;q=0 4", "cartdata" "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"bb12345678\\",\\"goods detail\\" \\"bb123456\\",\\"goods name\\" \\"iphone5s\\",\\"goods amt\\" \\"10000\\",\\"goods type\\" \\"smartphone\\",\\"goods url\\" \\"http //merchant com/cellphones/iphone5s 64g\\",\\"goods quantity\\" \\"1\\",\\"goods sellers id\\" \\"sel123\\",\\"goods sellers name\\" \\"sellers1\\"}]}", "sellers" "\[{\\"sellersid\\" \\"sel123\\",\\"sellersnm\\" \\"sellers1\\",\\"sellersemail\\" \\"sellers\@test com\\",\\"sellersurl\\" \\"http //nicestore store\\",\\"sellersaddress\\" {\\"sellernm\\" \\"sellers\\",\\"sellerlastnm\\" \\"1\\",\\"selleraddr\\" \\"jalanberbangsa1\\",\\"sellercity\\" \\"jakartabarat\\",\\"sellerpostcd\\" \\"12344\\",\\"sellerphone\\" \\"08123456789\\",\\"sellercountry\\" \\"id\\"}}]", "msid" "", "msfee" "", "msfeetype" "", "escrowcl" "" }' node js const secondapiversion = require(" /lib/secondapiversion js"); const config = { isproduction false, iscloudserver false, merchantkey "your merchant key", }; const parameter = { timestamp "20251110141120", imid "ionpaytest", paymethod "00", currency "idr", referenceno "ordno20251110141120", mitracd "", amt "10000", instmnttype "1", instmntmon "1", callbackurl "https //dev nicepay co id/ionpay client/paymentresult jsp", dbprocessurl "https //ptsv2 com/t/sibedul/post", goodsnm "goods", billingnm "hantu kesorean", billingphone "081234567890", billingemail "sample\@mail com", billingaddr "jl sample address", billingcity "south jakarta", billingstate "dki jakarta", billingcountry "indonesia", billingpostcd "12800", deliverynm "john doe", deliveryphone "081234567890", deliveryaddr "jln sample address", deliverycity "west jakarta", deliverystate "dki jakarta", deliverycountry "indonesia", deliverypostcd "12800", description "testing checkout api", userip "127 0 0 1", userlanguage "ko kr,en us;q=0 8,ko;q=0 6,en;q=0 4", cartdata '{"count" "1","item" \[{"goods id" "bb12345678","goods detail" "bb123456","goods name" "iphone5s","goods amt" "10000","goods type" "smartphone","goods url" "http //merchant com/cellphones/iphone5s 64g","goods quantity" "1","goods sellers id" "sel123","goods sellers name" "sellers1"}]}', sellers '\[{"sellersid" "sel123","sellersnm" "sellers1","sellersemail" "sellers\@test com","sellersurl" "http //nicestore store","sellersaddress" {"sellernm" "sellers","sellerlastnm" "1","selleraddr" "jalanberbangsa1","sellercity" "jakartabarat","sellerpostcd" "12344","sellerphone" "08123456789","sellercountry" "id"}}]', msid "", msfee "", msfeetype "", escrowcl "", }; let secondversion = new secondapiversion(config); let response = secondversion requestapi(parameter, "/redirect/v2/registration");config = nicepay builder() isproduction(false) iscloudserver(false) build(); string timestamp = "20251110141120"; string imid = "ionpaytest"; string reffno = "ordno20251110141120"; string amount = "10000"; redirect request = redirect builder() timestamp(timestamp) imid(imid) paymethod("00") currency("idr") amt(amount) referenceno(reffno) goodsnm("goods") billingnm("hantu kesorean") billingphone("081234567890") billingemail("sample\@mail com") billingaddr("jl sample address") billingcity("south jakarta") billingstate("dki jakarta") billingpostcd("12800") billingcountry("indonesia") deliverynm("john doe") deliveryphone("081234567890") deliveryaddr("jln sample address") deliverycity("west jakarta") deliverystate("dki jakarta") deliverypostcd("12800") deliverycountry("indonesia") dbprocessurl("https //ptsv2 com/t/sibedul/post") callbackurl("https //dev nicepay co id/ionpay client/paymentresult jsp") vat("") fee("") notaxamt("") description("testing checkout api") merchanttoken(timestamp, imid, reffno, amount, merchant key) reqtm("") reqdt("") reqdomain("") reqserverip("") reqclientver("") userip("127 0 0 1") usersessionid("") useragent("") userlanguage("ko kr,en us;q=0 8,ko;q=0 6,en;q=0 4") cartdata("{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"bb12345678\\",\\"goods detail\\" \\"bb123456\\",\\"goods name\\" \\"iphone5s\\",\\"goods amt\\" \\"10000\\",\\"goods type\\" \\"smartphone\\",\\"goods url\\" \\"http //merchant com/cellphones/iphone5s 64g\\",\\"goods quantity\\" \\"1\\",\\"goods sellers id\\" \\"sel123\\",\\"goods sellers name\\" \\"sellers1\\"}]}") sellers("\[{\\"sellersid\\" \\"sel123\\",\\"sellersnm\\" \\"sellers1\\",\\"sellersemail\\" \\"sellers\@test com\\",\\"sellersurl\\" \\"http //nicestore store\\",\\"sellersaddress\\" {\\"sellernm\\" \\"sellers\\",\\"sellerlastnm\\" \\"1\\",\\"selleraddr\\" \\"jalanberbangsa1\\",\\"sellercity\\" \\"jakartabarat\\",\\"sellerpostcd\\" \\"12344\\",\\"sellerphone\\" \\"08123456789\\",\\"sellercountry\\" \\"id\\"}}]") mitracd("") instmnttype("1") instmntmon("1") recurropt("") bankcd("") vacctvaliddt("") vacctvalidtm("") payvaliddt("") paymentexptm("") merfixacctid("") paymentexpdt("") payvalidtm("") shopid("") msid("") msfee("") msfeetype("") escrowcl("") build(); nicepayresponsev2 response = v2redirectservice callv2redirectregistration(request, config);amt = "10000" itemcartdata = { "goods id" "bb12345678", "goods name" "iphone5s", "goods detail" "bb123456", "goods amt" amt, "goods quantity" "1", "goods type" "smartphone", "goods url" "http //merchant com/cellphones/iphone5s 64g", "goods sellers id" "sel123", "goods sellers name" "sellers1" } itemsellersaddress = { "sellernm" "sellers", "sellerlastnm" "1", "selleraddr" "jalanberbangsa1", "sellercity" "jakartabarat", "sellerpostcd" "12344", "sellercountry" "id", "sellerphone" "08123456789" } bodycartdata = ( buildercartdata buildcartdata() setcount("1") setitem(itemcartdata) build() ) bodysellers = ( buildersellers buildsellers() setsellerid("sel123") setsellernm("sellers1") setselleremail("sellers\@test com") setsellerurl("http //nicestore store") setselleraddress(itemsellersaddress) build() ) bodyrequest = ( builderrequest buildrequest() setpaymethod("00") setinstmnttype("1") setinstmntmon("1") setrecurropt("") setbankcd("") setmitracd("") setvacctvaliddt("") setvacctvalidtm("") setmerfixacctid("") setpayvaliddt("") setpayvalidtm("") setpaymentexpdt("") setpaymentexptm("") setamt(amt) build() ) environment = (builderenvironment buildenvironment() iscloud(false) isproduction(false) build()) response = servicenicepay serviceredirect(datagenerator gettransactionbody(bodyrequest jsonrequest(), bodycartdata jsoncartdata(), bodysellers jsonsellers()), environment) c# string merchantkey = "your merchant key"; string clientid = "ionpaytest"; string timestamp = "20251110141120"; string refno = "ordno20251110141120"; string amount = "10000"; bool isproduction = false; bool iscloudserver = false; var builder = new merchanttokenbuilder() settimestamp(timestamp) setimid(clientid) setrefno(refno) setamount(amount) setmerchantkey(merchantkey); // act menghasilkan merchanttoken string merchanttoken = builder buildmerchanttoken(); var cartdata = new { count = "1", item = new\[] { new { goods id = "bb12345678", goods detail = "bb123456", goods name = "iphone5s", goods amt = amount, goods type = "smartphone", goods url = "http //merchant com/cellphones/iphone5s 64g", goods quantity = "1", goods sellers id = "sel123", goods sellers name = "sellers1" } } }; string cartdatajson = jsonconvert serializeobject(cartdata); string sellersjson = "\[{\\"sellersid\\" \\"sel123\\",\\"sellersnm\\" \\"sellers1\\",\\"sellersemail\\" \\"sellers\@test com\\",\\"sellersurl\\" \\"http //nicestore store\\",\\"sellersaddress\\" {\\"sellernm\\" \\"sellers\\",\\"sellerlastnm\\" \\"1\\",\\"selleraddr\\" \\"jalanberbangsa1\\",\\"sellercity\\" \\"jakartabarat\\",\\"sellerpostcd\\" \\"12344\\",\\"sellerphone\\" \\"08123456789\\",\\"sellercountry\\" \\"id\\"}}]"; var bodybuilder = new nicepayrequestbuilder() // base request mandatory setcommonfields( imid clientid, timestamp timestamp, paymethod "00", currency "idr", amt amount, referenceno refno, goodsnm "goods", merchanttoken merchanttoken ) setuserinfo( userip "127 0 0 1", usersessionid "", useragent "", userlanguage "ko kr,en us;q=0 8,ko;q=0 6,en;q=0 4" ) setcallbackurl(callbackurl "https //dev nicepay co id/ionpay client/paymentresult jsp") setdbprocessurl("https //ptsv2 com/t/sibedul/post") setcartdata(cartdata cartdatajson) setsellers(sellersjson) // assuming a setsellers() method exists setbillinginfo( billingnm "hantu kesorean", billingphone "081234567890", billingemail "sample\@mail com", billingaddr "jl sample address", billingcity "south jakarta", billingstate "dki jakarta", billingpostcd "12800", billingcountry "indonesia" ) // for va setbankcd(bankcd "") setvaexpiry( vacctvaliddt "", vacctvalidtm "" ) // for ewallet setmitracd(mitracd "") //for cc setcreditcard( instmnttype "1", instmntmon "1", recurropt "" ) //for qris setpaymentexp( paymentexpdt "", paymentexptm "" ) setdeliveryinfo( deliverynm "john doe", deliveryphone "081234567890", deliveryaddr "jln sample address", deliverycity "west jakarta", deliverystate "dki jakarta", deliverypostcd "12800", deliverycountry "indonesia" ); apiendpoints apiendpoints = new apiendpoints(); dictionary\<string, object> payload = bodybuilder build(); string jsonpayload = newtonsoft json jsonconvert serializeobject(payload); var registrationservice = new nicepayregistrationservice(apiendpoints, isproduction, iscloudserver); var result = await registrationservice sendpostasync(apiendpoints registredirectv2, payload); laravel $url = httputil getnicepaydomain($this >useprod, $this >usecloud) $this >registration endpoint; $timestamp = "20251110141120"; $reference no = "ordno20251110141120"; $amt = $this >amt; $merchant token = $this >generatemerchanttoken($timestamp, $this >imid, $reference no, $amt, $this >mer key); $cartdata = '{"count" "1","item" \[{"goods id" "bb12345678","goods detail" "bb123456","goods name" "iphone5s","goods amt" "10000","goods type" "smartphone","goods url" "http //merchant com/cellphones/iphone5s 64g","goods quantity" "1","goods sellers id" "sel123","goods sellers name" "sellers1"}]}'; $sellers = '\[{"sellersid" "sel123","sellersnm" "sellers1","sellersemail" "sellers\@test com","sellersurl" "http //nicestore store","sellersaddress" {"sellernm" "sellers","sellerlastnm" "1","selleraddr" "jalanberbangsa1","sellercity" "jakartabarat","sellerpostcd" "12344","sellerphone" "08123456789","sellercountry" "id"}}]'; $body = \[ "timestamp" => $timestamp, "imid" => $this >imid, "paymethod" => "00", "currency" => "idr", "referenceno" => $reference no, "merchanttoken" => $merchant token, "mitracd" => "", "amt" => $this >amt, "instmnttype" => "1", "instmntmon" => "1", "callbackurl" => "https //dev nicepay co id/ionpay client/paymentresult jsp", "dbprocessurl" => "https //ptsv2 com/t/sibedul/post", "goodsnm" => "goods", "billingnm" => "hantu kesorean", "billingphone" => "081234567890", "billingemail" => "sample\@mail com", "billingaddr" => "jl sample address", "billingcity" => "south jakarta", "billingstate" => "dki jakarta", "billingcountry" => "indonesia", "billingpostcd" => "12800", "deliverynm" => "john doe", "deliveryphone" => "081234567890", "deliveryaddr" => "jln sample address", "deliverycity" => "west jakarta", "deliverystate" => "dki jakarta", "deliverycountry" => "indonesia", "deliverypostcd" => "12800", "description" => "testing checkout api", "userip" => "127 0 0 1", "userlanguage" => "ko kr,en us;q=0 8,ko;q=0 6,en;q=0 4", "cartdata" => $cartdata, "sellers" => $sellers, "msid" => "", "msfee" => "", "msfeetype" => "", "escrowcl" => "" ]; try { $response = httputil postjsonrequest($url, $body); } catch (throwable $th) { return httputil generateerrorresponse($th); } php native $timestamp = helper getformattedtimestampv2(); $referenceno = "ordno20251110141120"; $amount = "10000"; $config = nicepay builder() >setisproduction(false) >settimestamp($timestamp) >build(); $parameter = redirect builder() >settimestamp($timestamp) >setimid(testconst $imid test) >setpaymethod("00") >setcurrency("idr") >setreferenceno($referenceno) >setamt($amount) >setmerchanttoken($timestamp, testconst $imid test, $referenceno, $amount, $this >merchantkey) >setcallbackurl("https //dev nicepay co id/ionpay client/paymentresult jsp") >setdbprocessurl("https //ptsv2 com/t/sibedul/post") >setgoodsnm("goods") >setbillingnm("hantu kesorean") >setbillingphone("081234567890") >setbillingemail("sample\@mail com") >setbillingaddr("jl sample address") >setbillingcity("south jakarta") >setbillingstate("dki jakarta") >setbillingcountry("indonesia") >setbillingpostcd("12800") >setdeliverynm("john doe") >setdeliveryphone("081234567890") >setdeliveryaddr("jln sample address") >setdeliverycity("west jakarta") >setdeliverystate("dki jakarta") >setdeliverycountry("indonesia") >setdeliverypostcd("12800") >setdescription("testing checkout api") >setuserip("127 0 0 1") >setuserlanguage("ko kr,en us;q=0 8,ko;q=0 6,en;q=0 4") >setcartdata( "{\\"count\\" \\"1\\",\\"item\\" \[{\\"goods id\\" \\"bb12345678\\",\\"goods detail\\" \\"bb123456\\",\\"goods name\\" \\"iphone5s\\",\\"goods amt\\" \\"10000\\",\\"goods type\\" \\"smartphone\\",\\"goods url\\" \\"http //merchant com/cellphones/iphone5s 64g\\",\\"goods quantity\\" \\"1\\",\\"goods sellers id\\" \\"sel123\\",\\"goods sellers name\\" \\"sellers1\\"}]}" ) >setsellers("\[{\\"sellersid\\" \\"sel123\\",\\"sellersnm\\" \\"sellers1\\",\\"sellersemail\\" \\"sellers\@test com\\",\\"sellersurl\\" \\"http //nicestore store\\",\\"sellersaddress\\" {\\"sellernm\\" \\"sellers\\",\\"sellerlastnm\\" \\"1\\",\\"selleraddr\\" \\"jalanberbangsa1\\",\\"sellercity\\" \\"jakartabarat\\",\\"sellerpostcd\\" \\"12344\\",\\"sellerphone\\" \\"08123456789\\",\\"sellercountry\\" \\"id\\"}}]") >setmitracd("") >setinstmnttype("1") >setinstmntmon("1") >build(); $v2redirectservice = new v2redirectservice($config); try { $response = $v2redirectservice >registration($parameter); } catch (nicepayerror $e) { $this >fail("exception thrown " $e >getmessage()); } codeigniter $timestamp = "20251110141120"; $configbuilder = nicepay builder(); $config = $configbuilder >setisproduction(false) >setiscloudserver(false) >build(); $reffno = "ordno20251110141120"; $amount = "10000"; $cartdata = \[ "count" => "1", "item" => \[\[ "goods id" => "bb12345678", "goods detail" => "bb123456", "goods name" => "iphone5s", "goods amt" => $amount, // replace dynamically if needed "goods type" => "smartphone", "goods url" => "http //merchant com/cellphones/iphone5s 64g", "goods quantity" => "1", "goods sellers id" => "sel123", "goods sellers name" => "sellers1" ]] ]; $sellers = "\[{\\"sellersid\\" \\"sel123\\",\\"sellersnm\\" \\"sellers1\\",\\"sellersemail\\" \\"sellers\@test com\\",\\"sellersurl\\" \\"http //nicestore store\\",\\"sellersaddress\\" {\\"sellernm\\" \\"sellers\\",\\"sellerlastnm\\" \\"1\\",\\"selleraddr\\" \\"jalanberbangsa1\\",\\"sellercity\\" \\"jakartabarat\\",\\"sellerpostcd\\" \\"12344\\",\\"sellerphone\\" \\"08123456789\\",\\"sellercountry\\" \\"id\\"}}]"; $redirectbuilder = redirect builder(); $parameter = $redirectbuilder >settimestamp($timestamp) >setimid("ionpaytest") >setpaymethod("00") >setcurrency("idr") >setdescription("testing checkout api") >setbankcd("") >setamt($amount) >setreferenceno($reffno) >setmerchanttoken($timestamp, $this >imidtest, $reffno, $amount, $this >merchantkey) // unchanged as requested >setvacctvaliddt("") >setvacctvalidtm("") >setmerfixacctid("") >setdbprocessurl("https //ptsv2 com/t/sibedul/post") >setcallbackurl("https //dev nicepay co id/ionpay client/paymentresult jsp") >setgoodsnm("goods") >setcartdata(json encode($cartdata)) >setsellers($sellers) >setbillingnm("hantu kesorean") >setbillingphone("081234567890") >setbillingemail("sample\@mail com") >setbillingaddr("jl sample address") >setbillingcity("south jakarta") >setbillingstate("dki jakarta") >setbillingpostcd("12800") >setbillingcountry("indonesia") >setuserip("127 0 0 1") >setuserlanguage("ko kr,en us;q=0 8,ko;q=0 6,en;q=0 4") >setdeliverynm("john doe") >setdeliveryphone("081234567890") >setdeliveryaddr("jln sample address") >setdeliverycity("west jakarta") >setdeliverystate("dki jakarta") >setdeliverypostcd("12800") >setdeliverycountry("indonesia") >setinstmnttype("1") >setinstmntmon("1") >setmitracd("") >setmsid("") >setmsfee("") >setmsfeetype("") >setescrowcl("") >build(); $v2vaservice = new v2redirectservice($config); try { $response = $v2vaservice >registration($parameter); } response parameter sample response { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest00202511101446495037", "referenceno" "ordno20251110141120", "paymethod" "00", "amt" "10000", "transdt" "20251110", "transtm" "144649", "description" "testing checkout api", "currency" "idr", "goodsnm" "goods", "billingnm" "hantu kesorean", "payvaliddt" null, "payvalidtm" null, "bankcd" null, "mitracd" null, "paymenturl" "https //dev nicepay co id/nicepay/redirect/v2/payment" } cart data, payloan cart data, & payloan seller data for registration api checkout cart data pada berguna untuk mendeklarasikan item apa saja akan di checkout beserta rincian dan harga per item cart data ini berlaku untuk semua , kecuali menggunakan dikarenakan memiliki cart data khusus cart data for registration api checkout cartdata harus dilepas dalam bentuk string karakter spesial tidak didukung dalam cartdata pastikan bahwa count sama dengan jumlah object item pastikan bahwa goods amt x goods quantity sama dengan amt 152,436,152 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 penjelasan detail pada parameter item 140,195,227 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 card data { "count" "2", "item" \[ { "img url" "http //img aaa com/ima1 jpg", "goods name" "item 1 name", "goods detail" "item 1 detail", "goods amt" "700", "goods quantity" "1" }, { "img url" "http //img aaa com/ima2 jpg", "goods name" "item 2 name", "goods detail" "item 2 detail", "goods amt" "300", "goods quantity" "1" } ] } payloan cart data for registration api checkout 257,290 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type cartdata wajib dilepas dalam format string payloan cart data { "count" "2", "item" \[ { "goods id" "bb12345678", "goods detail" "bb123456", "goods name" "iphone 5s", "goods amt" "6000000", "goods type" "smartphone", "goods url" "http //merchant com/cel lphones/iphone5s 64g", "goods quantity" "1", "goods sellers id" "sel123", "goods sellers name" "sellers 1" }, { "goods id" "az14565678", "goods name" "hailee sneakers blink silver", "goods amt" "250000", "goods url" "http //merchant com/fashion/shoes/sneakers blinkshoes", "goods type" "sneakers", "goods quantity" "2", "goods sellers id" "sel124", "goods sellers name" "sellers 2" } ] } cartdata secara spesifik untuk pastikan count berdasarkan dengan nomor tipe barang barang pastikan goods sellers id dan goods sellers name berisi sesuai dengan sellers pada registration payloan sellers data for registration api checkout 310,370 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type payloan sellers data \[ { "sellersid" "sel123", "sellersnm" "sellers 1", "sellersemail" "sellers\@test com", "sellersurl" "http //nicestore store", "sellersaddress" { "sellernm" "sellers", "sellerlastnm" "1", "selleraddr" "jalan berbangsa 1", "sellercity" "jakarta barat", "sellerpostcd" "12344", "sellerphone" "08123456789", "sellercountry" "id" } }, { "sellersid" "sel124", "sellersnm" "sellers 2", "sellersemail" "sellers2\@test com", "sellersurl" "http //nicestore store", "sellersaddress" { "sellernm" "sellers", "sellerlastnm" "2", "selleraddr" "jalan berkelok 3", "sellercity" "jakarta utara", "sellerpostcd" "12222", "sellerphone" "081255556789", "sellercountry" "id" } } ]