NICEPAY API
...
Checkout API
Registration - API Checkout
20 min
about registration api checkout the purpose of this step on registration api checkout is to register a request from your to us so that your can pay amount billed on provided by based on principle, all s on have same the difference is just on each when s with , s registration firsthand before can do on chosen through received link visit docid\ edzoz4vkv 1afv7hzbq5y to know further explanations related specific for registration api checkout (all payment method) to be able uses all s on , you are required to register with this registration here are s 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 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 payment method & bank/partner configuration for customers the paymethod enables you to manage which s are displayed to on 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 if you prefer to display all s as usual, simply use paymethod = '00' without adding bankcd or mitracd s the designated paymethod code to direct to a specific for certain s, you can specify which channel are using bankcd or mitracd s example shows all available s → paymethod = '00' shows only → paymethod = '01' shows only bca → paymethod = '02' , bankcd = 'cena' shows only dana → paymethod = '05' , mitracd = 'dana' important notes regarding the bank/mitra parameter the bankcd can only be used for ( 02 ) the mitracd can only be used for ( 03 ), ( 04 ), ( 05 ), dan ( 06 ) s the bankcd and mitracd s cannot be used for ( 01 ) and ( 08 ) s response parameters for api checkout registration 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 after your has been registered, direct your to our to with check docid\ edzoz4vkv 1afv7hzbq5y to view details 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); 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()); } 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); } 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 the card data on is useful for declaring what items will be checked out along with item details and prices per item this card data applies to all s, except using because has special cart data cart data for registration api checkout cartdata must be released in string form special characters are not supported in cartdata make sure that count is same as number of item object make sure that goods amt x goods quantity is same as 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 detailed explanation of the item parameters 155,163,235 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 312,340 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 is mandatory to be released in string form 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 is specifically for make sure count s are based on goods' type number make sure goods sellers id and goods sellers name are contained according to sellers on registration payloan sellers data for for registration api checkout 305,377 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" } } ]