NICEPAY API
...
Payment - API Credit Card
Full Payment & Installment - Payment API Credit Card
12 min
about full payment & installment payment api credit card this {{api}} uses after finishing {{the}} {{api}} docid 5yfvvdriig 2j8ksuel9g {{api}} used in this stage is similar to {{the}} {{api}} for {{the}} recurring token and pre auth & capture {{payment}} type however, there are several differences in {{the}} sent request {{parameter}} full payment & installment payment api credit card api endpoint /nicepay/direct/v2/payment request method post post description full {{paymentproduct}} & installment {{paymentproduct}} {{api}} {{cc}} merchant token sha256( timestamp + imid + referenceno + amt + merchantkey ) request format application/x www form urlencoded on {{the}} {{cc}} {{payment}} , if 3ds authentication is needed, your {{customer}} will direct to {{the}} 3ds card issuer {{bank}} {{page}} to input {{the}} otp (one time password) code to finish {{the}} {{transaction}} {{process}} request parameter for full payment & installment payment api credit card the following is {{the}} list of request {{parameter}} s to {{process}} {{the}} {{payment}} {{transaction}} on {{the}} {{cc}} full {{paymentproduct}} & installment {{paymethod}} request parameter {{proceed}} s through form url with {{the}} following detailed {{parameter}} parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20221202141217 txid required required an 30 transaction id ionpaytest01202212021455054652 referenceno n 40 reference number for {{paymentproduct}} ordno20221202141217 cardno required for cc required for cc n 20 {{cc}} number 4434260000000008 cardexpyymm required for cc required for cc a 4 card expiry ( yymm ) 3901 cardcvv required for cc required for cc n 4 card cvv 101 cardholdernm required required an 45 card holder name john doe only alphabet allowed cardholderemail required required ans 100 card holder email johndoe\@gmail com merchanttoken required required an 255 {{merchant}} token c91e6531f6c84869439bc5ebe5389bd71e7752c054fc9dbfe193d087a1b797ae callbackurl required required ans 255 {{paymentproduct}} result url https //merchant com/callbackurl parameter needed in {{the}} {{transaction}} {{process}} is {{the}} your {{customer}} credit/debit card data such as cardno , cardexpyymm , cardcvv , cardholdernm & cardholderemail so, to do {{the}} {{transaction}} {{process}} , we suggest you get {{the}} card data from your {{customer}} beforehand before doing {{the}} {{paymentproduct}} {{api}} {{process}} include cardcvv on every {{transaction}} depending on {{the}} mid type of cvv or non cvv response parameter for full payment & installment payment api credit card after you request, you will get a response from url callback with {{the}} following detailed response {{parameter}} parameter type size description example / notes resultcd n 14 docid 2r5sr3xvppu1eju1nitg resultmsg an 255 result message docid 4 fpewlvczfhcvygxwck9 txid an 30 transaction id when success referenceno ans 40 {{merchant}} order number when success paymethod n 2 docid\ ek 0djw7nuhytcda4sa3p when success amt n 12 {{paymentproduct}} amount when success currency an 3 currency when success goodsnm a 100 goods name when success billingnm a 100 buyer name when success transdt n 8 transaction date ( yyyymmdd ) when success transtm n 6 transaction time ( hh24miss ) when success description an 100 transaction description when success authno n 10 approval number when success, cc issubankcd a 4 docid\ qbeq29lj53z vbvxtvb7l when success, cc acqubankcd a 4 docid\ qbeq29lj53z vbvxtvb7l when success, cc cardno ans 20 masked card no when success, cc cardexpyymm n 4 card expiry ( yymm ) when success, cc instmntmon n 2 installment month when success, cc instmnttype n 2 docid\ wfsinjxqc2s9yubbybpep when success, cc cctranstype n 2 docid 7pas vd5ylg4vdurmygwo 1 normal 2 recurring 3 pre auth 4 capture when success, cc sample parameter for full payment & installment payment api credit card request parameter curl curl location 'https //www nicepay co id/nicepay/direct/v2/payment' \\ \ header 'content type application/x www form urlencoded' \\ \ data urlencode 'timestamp=20250922143200' \\ \ data urlencode 'txid=ionpaytest8108202509221432005539' \\ \ data urlencode 'referenceno=reffno20250922143200' \\ \ data urlencode 'merchanttoken=020c4c90a89a388206d057cffe7c83df2ec1ead78ec17656544e4a58430ab7ea' \\ \ data urlencode 'cardno=5123450000000008' \\ \ data urlencode 'cardexpyymm=3601' \\ \ data urlencode 'cardcvv=100' \\ \ data urlencode 'cardholdernm=test' \\ \ data urlencode 'callbackurl=https //www nicepay co id/ionpay client/paymentresult jsp' node js let secondversion = new secondapiversion(config); let parameterpayment = { amt "1000", referenceno "reffno20250922143200", txid "ionpaytest8108202509221432005539", cardno "5123450000000008", callbackurl "https //www nicepay co id/ionpay client/paymentresult jsp", cardexpyymm "2901", cardcvv "100", recurringtoken "", cardholdernm "nicepay test", preauthtoken "", cardholderemail "test\@email com", }; let response = secondversion requestpayment(parameterpayment);nicepay config = nicepay builder() isproduction(false) // set to true for production build(); card requestdata = card builder() timestamp("20250922143200") // current timestamp (yyyymmddhhmmss) txid("ionpaytest8108202509221432005539") // transaction id from registration imid("ionpaytest") // your nicepay imid referenceno("reffno20250922143200") // unique order reference amt("1000") // payment amount merchanttoken(timestamp, imid, reffno, amount, merchant key) // secure token generation cardno("5123450000000008") // test card number cardexpyymm("2908") // card expiry date (yymm) cardcvv("100") // 3 digit cvv cardholdernm("nicepay test") // cardholder name callbackurl("https //www nicepay co id/ionpay client/paymentresult jsp") // callback url recurringtoken("") // leave empty if not recurring preauthtoken("") // leave empty if not pre auth build(); string responsehtml = v2cardservice callv2cardpaymentrequest(requestdata, config); bodypayment = ( builderpayment buildpayment() settimestamp(datetime now() strftime("%y%m%d%h%m%s")) # current timestamp (yyyymmddhhmmss) settxid("ionpaytest8108202509221432005539") # transaction id from registration setreferenceno("reffno20250922143200") # unique order reference setcashtag("") # leave empty if not using cashtag setcardno("5123450000000008") # test card number setcardexpyymm("3901") # card expiry date (yymm) setcardcvv("100") # 3 digit cvv setrecurringtoken("") # leave empty if not recurring setpreauthtoken("") # leave empty if not pre auth setamt("1000") # payment amount build() ) environment = ( builderenvironment buildenvironment() iscloud(false) # set to true if using nicepay cloud isproduction(false) # set to true for production build() ) response = servicenicepay servicepayment( datagenerator getpaymentbody(bodypayment datapayment()), environment ) vanilla js const paymentdata = { cardno "5123450000000008", // test card number cardexpyymm "2901", // card expiry in yymm format cardcvv "100", // 3 digit cvv cardholderemail "customer\@example com", // cardholder email cardholdernm "john doe", // cardholder name callbackurl "https //your domain com/callback", // callback url after payment txid "ionpaytest8108202509221432005539", // transaction id from registration merchanttoken "020c4c90a89a388206d057cffe7c83df2ec1ead78ec17656544e4a58430ab7ea", // secure token recurringtoken "", // leave empty if not recurring }; const response = await nicepay paymenttransaction(paymentdata); laravel $url = httputil getnicepaydomain($this >useprod, $this >usecloud) $this >payment endpoint; // request body parameters $txid = "ionpaytest8108202509221432005539"; $timestamp = carbon now() >format("ymdhis"); // current timestamp (yyyymmddhhmmss) $reference no = "reffno20250922143200"; $amt = "1000"; // generate secure merchant token $merchant token = $this >generatemerchanttoken( $timestamp, $this >imid, $reference no, $amt, $this >mer key ); $param = \[ "timestamp" => $timestamp, // current timestamp "txid" => $txid, // transaction id from registration "merchanttoken" => $merchant token, // secure hash token "cardno" => "5123450000000008", // test card number "cardexpyymm" => "3901", // card expiry date (yymm) "cardcvv" => "100", // 3 digit cvv "callbackurl" => "https //www nicepay co id/ionpay client/paymentresult jsp", // callback url "returnjsonformat"=> "1", // force json response format ]; $response = httputil redirectwithqueryparams($url, $param); php native $config = nicepay builder() >setisproduction(true) // set to false for sandbox/testing >build(); $parameter = card builder() >timestamp($timestamp) // current timestamp (yyyymmddhhmmss) >imid("ionpaytest") // your nicepay imid >txid("ionpaytest8108202509221432005539") // transaction id from registration >referenceno("reffno20250922143200") // unique order reference >merchanttoken( $timestamp, $imid, $newcctrx >getreferenceno(), $newcctrx >getamt(), $this >merchantkey ) // generate secure token >cardno(testconst $card no) // test card number from constants >cardexpyymm(testconst $card exp yymm) // card expiry date (yymm) >cardcvv(testconst $card cvv) // 3 digit cvv >cardholdernm("nicepay test") // cardholder name >callbackurl("https //dev nicepay co id/ionpay client/paymentresult jsp?") // callback url after payment >build(); $cardservice = new v2cardservice($config); $response = $cardservice >payment($parameter); var config nicepay? = nicepay builder() isproduction(true) // set to false for sandbox/testing build() val request directv2requestpaymentcard = directv2requestpaymentcard builder() timestamp("20250922143200") // current timestamp (yyyymmddhhmmss) txid("ionpaytest8108202509221432005539") // transaction id from registration imid("ionpaytest") // your nicepay imid merchantkey(merchant key) // secret merchant key referenceno("reffno20250922143200") // unique order reference number amt("1000") // payment amount callbakurl("https //www nicepay co id/ionpay client/paymentresult jsp") // callback url after payment cardno("5123450000000008") // test card number cardcvv("123") // 3 digit cvv (sample) cardexpyymm("2512") // card expiry date (yymm) build() val response = paymentservice registration(request, config)!! response parameter sample response 	 		 	 		 		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 		 	 	 callback handling for full payment & installment payment api credit card after {{the}} {{transaction}} occurs, you will get a {{notification}} from us based on {{the}} inputted callback url in {{the}} request {{parameter}} on docid\ bliefzuf9etdz7mb9hmgw when your callback already received callbackurl , we recommended {{the}} {{merchant}} to do {{the}} {{status}} verification using {{the}} docid\ fc bkdwkevwf2h9usoc8k callback handling is very important to minimize {{the}} fraud act, we highly recommend {{the}} {{merchant}} to do {{the}} verification using callback handling url callback "callbackurl" "https //www merchant com/callbackurl/" response callback { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest01202212141112221428", "referenceno" "", "paymethod" "01", "amt" "10000", "transdt" "20221212", "transtm" "121212", "description" "testing credit card transaction", "authno" "080623", "issubankcd" "othr" "acqubankcd" "bmri", "cardno" "453211 1111", "goodsnm" "test transaction nicepay" "billingnm" "john doe", "currency" "idr", "timestamp" "20221212121212", "merchanttoken" "2035d2295d9578fffb40137186f0203474142ae3e57992d4847826c5fcaffce6", "cardexpyymm" "2712", "instmntmon" "1", "instmnttype" "1", "cctranstype" "1" }