NICEPAY API
...
API Credit Card
Payment - API Credit Card
Recurring - Payment API Credit Card
17 min
about recurring payment api credit card {{paymentproduct}} recurring type is another {{cc}} feature that can pay a particular bill from your {{customer}} periodically with {{the}} same amount similar to {{the}} initial bill {{payment}} the {{api}} used in this {{payment}} stage is similar to {{the}} {{api}} for full {{paymentproduct}} & installment and pre auth & capture {{payment}} types however, there are differences in {{the}} sent {{parameter}} request {{nicepay}} will give a recurringtoken as {{paymentproduct}} {{api}} response {{parameter}} called recurring token making {{merchant}} can use recurringtoken on {{the}} later {{paymentproduct}} {{api}} request without using cardno and cardexpyymm recurring payment api credit card (first payment) to activate {{the}} {{cc}} recurring type {{transaction}} , you mandatory pay {{the}} created {{transaction}} to receive {{the}} recurringtoken beforehand api endpoint /nicepay/direct/v2/payment request method application/x www form urlencoded application/x www form urlencoded post post description recurring merchant token sha256( timestamp + imid + referenceno + amt + merchantkey ) the used {{api}} specification is similar to {{the}} recurring registration api credit card docid\ ab8bqpp59um1jm7jupz8i request payment for credit card recurring (first payment) the following is a request {{payment}} on recurring to gain recurringtoken which where you need to finish {{the}} recurring registration api credit card docid\ ab8bqpp59um1jm7jupz8i beforehand you still need cardno , cardexpyymm , cardcvv , cardholdernm & cardholderemail from {{the}} {{customer}} on {{the}} first {{payment}} on this recurring scheme parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20230522080502 txid required required an 30 transaction id ionpaytest01202305220041509298 referenceno required required ans 40 {{merchant}} order number merchantreferencenumber001 merchanttoken required required an 255 {{merchant}} token ff139e49606387091cd9baeadff3161aff6afd9406e1f481e0fdb8b46d1ae5ae cardno required required n 20 {{cc}} number 51234500 0000 cardexpyymm required required a 4 card expiry ( yymm ) 3901 cardcvv required required n 4 card cvv 100 cardholdernm required required an 45 card holder name john doe only alphabet allowed cardholderemail required required ans 100 card holder email johndoe\@gmail com callbackurl required required ans 255 {{paymentproduct}} result url https //www nicepay co id/ionpay client/paymentresult jsp response parameter for credit card recurring (first payment) below is {{the}} detailed response you get {{please}} perform save & store {{the}} recurringtoken gain to execute {{the}} recurring feature {{process}} on {{the}} next {{transaction}} with {{the}} same {{customer}} {{cc}} parameter type size description example / notes timestamp n 14 response date ( yyyymmddhh24miss ) 20230520135959 resultcd n 4 result code docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 error code docid 4 fpewlvczfhcvygxwck9 success txid an 30 transaction id ionpaytest01202305161007570327 referenceno ans 40 {{merchant}} order number merchantreferencenumber001 paymethod n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 01 when success amount n 12 {{paymentproduct}} amount 10000 when success currency an 3 currency idr when success goodsnm an 100 goods name {{merchant}} goods 1 when success billingnm an 100 buyer name john doe when success transdt n 8 transaction date ( yyyymmdd ) 20230516 when success transtm n 6 transaction time ( hh24miss ) 135959 when success description an 100 transaction description this is the description of the {{paymentproduct}} when success authno n 10 approval number 123456 when success issubankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l cena (refer {{bank}} code) when success acqubankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l bnia (refer {{bank}} code) when success cardno an 20 card number (masked) 51234500 0008 when success cardexpyymm n 4 card expiry ( yymm ) 3901 when success instmntmon n 1 installment month 1 when success instmnttype n 2 installment type code docid\ wfsinjxqc2s9yubbybpep 1 when success cctranstype an 2 payment status code docid 7pas vd5ylg4vdurmygwo 1 normal 2 recurring 3 pre auth 4 capture 2 when success vat n 12 value added tax ( {{vat}} ) 0 when success fee n 12 service fee 0 when success notaxamt n 12 tax free amount 0 when success recurringtoken an 64 token that using recurring payment f19e3128784d0b33c189d5df21321c781b5bd107b185587fd8a54781aa845c84 acqubanknm a 255 acquiring {{bank}} name cimb issubanknm a 255 issuing {{bank}} name bca sample for credit card recurring (first payment) sample request recurring payment timestamp "20230522080502" txid "ionpaytest01202305220041509298" referenceno "merchantreferencenumber001" merchanttoken "ff139e49606387091cd9baeadff3161aff6afd9406e1f481e0fdb8b46d1ae5ae" cardno "5123450000000008" cardexpyymm "3901" cardcvv "100" cardholdernm "john doe" cardholderemail "johndoe\@gmail com" callbackurl "https //www nicepay co id/ionpay client/paymentresult jsp" sample response recurring payment { "resultcd" "0000", "resultmsg" "success", "authno" "063471", "txid" "ionpaytest01202305161007570327", "referenceno" "merchantreferencenumber001", "transdt" "20230522", "transtm" "224343", "amount" "10000", "recurringtoken" "f19e3128784d0b33c189d5df21321c781b5bd107b185587fd8a54781aa845c84", "cardno" "51234500 0008", "acqubankcd" "bnia", "issubankcd" "cena", "acqubanknm" "cimb", "issubanknm" "bca" } java request //credit card recurring issue //initialize parameters nicepay settimestamp("20221202141217"); nicepay settxid("ionpaytest01202212021455054652"); nicepay setreferenceno("merchantreferencenumber001"); nicepay setmerchanttoken("ff139e49606387091cd9baeadff3161aff6afd9406e1f481e0fdb8b46d1ae5ae"); nicepay setcardno("512345000000008"); nicepay setcardexpyymm("3901"); nicepay setcardcvv("100"); nicepay setcardholdernm("john doe"); nicepay setcardholderemail("johndoe\@gmail com"); nicepay setcallbackurl("https //www merchant com/callbackurl/"); //request credit card recurring issue nicepay ccrecurringissue(); //response credit card recurring issue system out println("response " + nicepay getresponsestring()); string resultcd = nicepay get("resultcd"); string resultmsg = nicepay get("resultmsg"); string authno = nicepay get("authno"); string txid = nicepay get("txid"); string referenceno = nicepay get("referenceno"); string transdt = nicepay get("transdt"); string transtm = nicepay get("transtm"); string amount = nicepay get("amount"); string recurringtoken = nicepay get("recurringtoken"); string cardno = nicepay get("cardno"); string acqubankcd = nicepay get("acqubankcd"); string issubankcd = nicepay get("issubankcd"); string acqubanknm = nicepay get("acqubanknm"); string issubanknm = nicepay get("issubanknm"); continual recurring payment api credit card after {{proceed}} ing with {{the}} first {{payment}} and already receiving recurringtoken on recurring payment api credit card docid\ ap1yivfhqa0ah6khecv g you can use that recurringtoken to pay another bill using a similar {{customer}} {{cc}} credential to implement recurring (subscription) {{payment}} mechanism however, to {{proceed}} this {{payment}} continual recurring, you still need to beforehand do {{the}} {{transaction}} registration on recurring registration api credit card docid\ ab8bqpp59um1jm7jupz8i the following is {{the}} request and response detail used on {{the}} later {{payment}} using {{the}} same recurring token api endpoint /nicepay/direct/v2/payment request method application/x www form urlencoded application/x www form urlencoded post post description recurring continual {{paymentproduct}} {{cc}} merchant token sha256( timestamp + imid + referenceno + amt + merchantkey ) {{api}} specification used is similar to {{the}} recurring registration api credit card docid\ ab8bqpp59um1jm7jupz8i request payment for credit card recurring you only need to use recurringtoken on {{paymentproduct}} {{api}} recurring for this next request without using cardno and cardexpyymm {{parameter}} parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20230522080502 txid required required an 30 transaction id ionpaytest01202305220041509298 referenceno required required ans 40 {{merchant}} order number merchantreferencenumber001 merchanttoken required required an 255 {{merchant}} token ff139e49606387091cd9baeadff3161aff6afd9406e1f481e0fdb8b46d1ae5ae recurringtoken required required an 64 token that using recurring payment when success f19e3128784d0b33c189d5df21321c781b5bd107b185587fd8a54781aa845c84 cardcvv required required n 4 card cvv 100 cardholdernm required required an 45 card holder name john doe only alphabet allowed cardholderemail required required ans 100 card holder email johndoe\@gmail com callbackurl required required ans 255 {{paymentproduct}} result url https //www nicepay co id/ionpay client/paymentresult jsp include cardcvv on every {{transaction}} depending on {{the}} mid type of cvv or non cvv response payment for credit card recurring parameter type size description example / notes timestamp n 14 response date ( yyyymmddhh24miss ) 20230520135959 resultcd n 4 result code docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 error code docid\ wpcemazro xvnxz 1zaib success txid an 30 transaction id ionpaytest01202305161007570327 referenceno ans 40 {{merchant}} order number merchantreferencenumber001 paymethod n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 01 when success amount n 12 {{paymentproduct}} amount 10000 when success currency an 3 currency idr when success goodsnm an 100 goods name {{merchant}} goods 1 when success billingnm an 100 buyer name john doe when success transdt n 8 transaction date ( yyyymmdd ) 20230522 when success transtm n 6 transaction time ( hh24miss ) 224343 when success description an 100 transaction description this is the description of the {{paymentproduct}} when success authno n 10 approval number 123456 when success issubankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l cena (refer {{bank}} code) when success acqubankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l bnia (refer {{bank}} code) when success cardno an 20 card number (masked) 51234500 0008 when success cardexpyymm n 4 card expiry ( yymm ) 3901 when success instmntmon n 1 installment month 1 when success instmnttype n 2 installment type code docid\ wfsinjxqc2s9yubbybpep 1 when success cctranstype an 2 payment status code docid 7pas vd5ylg4vdurmygwo 1 normal 2 recurring 3 pre auth 4 capture 2 when success vat n 12 value added tax ( {{vat}} ) 0 when success fee n 12 service fee 0 when success notaxamt n 12 tax free amount 0 when success acqubanknm a 255 acquiring {{bank}} name cimb issubanknm a 255 issuing {{bank}} name bca sample json for credit card recurring payment sample request continual payment timestamp "20230522080502" txid "ionpaytest01202305220041509298" referenceno "merchantreferencenumber001" merchanttoken "ff139e49606387091cd9baeadff3161aff6afd9406e1f481e0fdb8b46d1ae5ae" recurringtoken "f19e3128784d0b33c189d5df21321c781b5bd107b185587fd8a54781aa845c84" cardcvv "100" callbackurl "https //www nicepay co id/ionpay client/paymentresult jsp" sample response continual payment { "resultcd" "0000", "resultmsg" "success", "authno" "063471", "txid" "ionpaytest01202305161007570327", "referenceno" "merchantreferencenumber001", "transdt" "20230522", "transtm" "224343", "amount" "10000", "cardno" "51234500 0008", "acqubankcd" "bnia", "issubankcd" "cena", "acqubanknm" "cimb", "issubanknm" "bca" } sample java request continual //credit card recurring continual //initialize parameters nicepay settimestamp("20221202141217"); nicepay settxid("ionpaytest01202212021455054652"); nicepay setreferenceno("merchantreferencenumber001"); nicepay setmerchanttoken("ff139e49606387091cd9baeadff3161aff6afd9406e1f481e0fdb8b46d1ae5ae"); nicepay setrecurringtoken("f19e3128784d0b33c189d5df21321c781b5bd107b185587fd8a54781aa845c84"); nicepay setcardcvv("100"); nicepay setcallbackurl("https //www merchant com/callbackurl/"); //request credit card recurring issue nicepay ccrecurringissue(); //response credit card recurring issue system out println("response " + nicepay getresponsestring()); string resultcd = nicepay get("resultcd"); string resultmsg = nicepay get("resultmsg"); string authno = nicepay get("authno"); string txid = nicepay get("txid"); string referenceno = nicepay get("referenceno"); string transdt = nicepay get("transdt"); string transtm = nicepay get("transtm"); string amount = nicepay get("amount"); string recurringtoken = nicepay get("recurringtoken"); string cardno = nicepay get("cardno"); string acqubankcd = nicepay get("acqubankcd"); string issubankcd = nicepay get("issubankcd"); string acqubanknm = nicepay get("acqubanknm"); string issubanknm = nicepay get("issubanknm"); callback handling for credit card payment txid will never similar with {{the}} request hold capture {{process}} will ensure that {{the}} capture amount value won't exceed {{the}} owned funds when your callback already received callbackurl , we recommended {{the}} {{merchant}} to do {{the}} {{status}} verification using {{the}} status inquiry api credit card 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" }