NICEPAY API
...
V1 Enterprise
Direct Debit - V1 Enterprise
8 min
about direct debit offers as this method allows to use channel from various s real time notification will be sent when completed supported direct debit by nicepay cimb clicks jenius pay direct debit flow v1 description steps does the requests to the requests registration to registers data sends response to displays to the inputs id or cashing the sends data to sends data to requests to processing authentication sends to the makes authentication the requests charge to generates sends to sends to updates sends to sends to direct debit registration api specifications direct debit registration api endpoint /nicepay/api/onepass do request method application/x www form urlencoded application/x www form urlencoded post post description request transaction on page merchant token sha256( imid + referenceno + amt + merchantkey ) payment method 04 request parameter direct debit registration direct debit registration request parameter // payment mandatory field nicepay setpaymethod("04"); nicepay setcurrency("idr"); nicepay setamt("1000"); nicepay setreferenceno("merchantreferencenumber001"); nicepay setmitracd("mdrc"); nicepay setgoodsnm("merchant goods 1"); nicepay setbillingnm("john doe"); nicepay setbillingemail("buyer\@merchant com"); nicepay setbillingphone("081234567890"); nicepay setbillingaddr("billing address"); nicepay setbillingcity("jakarta"); nicepay setbillingstate("jakarta"); nicepay setbillingpostcd("12345"); nicepay setbillingcountry("indonesia"); nicepay setdeliverynm("john doe"); nicepay setdeliveryphone("081234567890"); nicepay setdeliveryaddr("billing address "); nicepay setdeliverycity("jakarta "); nicepay setdeliverystate("jakarta "); nicepay setdeliverypostcd("12345"); nicepay setdeliverycountry("indonesia "); nicepay setcallbackurl(merchantdomain + "callback"); nicepay setdbprocessurl(merchantdomain + "dbprocess"); nicepay setvat("0"); nicepay setfee("0"); nicepay setnotaxamt("0"); nicepay setdescription("description"); nicepay setuserip("127 0 0 1"); nicepay setmerchanttoken(nicepay maketoken(nicepay getamt(), nicepay getreferenceno())); nicepay setcartdata("{}"); nicepay setclickpayno("1234567890123456"); nicepay setclickpaytoken("000000"); nicepay setdatafield3("3"); // payment optional field nicepay setreqdt("20160301"); nicepay setreqtm("135959"); nicepay setreqdomain("merchant com"); nicepay setreqserverip("127 0 0 1"); nicepay setreqclientver("1 0"); nicepay setusersessionid("usersessionid"); nicepay setuseragent("mozilla"); nicepay setuserlanguage("en us"); nicepay setmerfixacctid("9999000000000001"); nicepay setpaymentexpirydt("20160303"); nicepay setpaymentexpirytm("135959"); // payment request nicepay payment(); // payment response system out println("response string " + nicepay getresponsestring()); // json in string format string resultcd = nicepay get("resultcd"); string resultmsg = nicepay get("resultmsg"); string txid= nicepay get("txid "); string referenceno= nicepay get("referenceno"); string receiptcode= nicepay get("receiptcode"); string paymethod= nicepay get("paymethod"); string amount= nicepay get("amount"); string transdt = nicepay get("transdt "); string transtm = nicepay get("transtm "); string description= nicepay get("description"); string callbackurl= nicepay get("callbackurl"); string mitracd= nicepay get("mitracd"); parameter type size description example / notes imid required required an 10 id ionpaytest paymethod required required n 2 docid logd 07e0vrfugu0nldf 04 currency required required a 3 currency idr amt required required n 12 goods amount 15000 referenceno required required ans 40 order number ordno123124 goodsnm required required an 100 goods name test goods billingnm required required a a billing name john doe billingphone required required n 15 billing phone number 081249195 billingemail required required ans 40 billing e mail test\@merchant com billingcity required required a 50 billing city jakarta billingstate required required a 50 billing state dki jakarta billingpostcd required required n 10 billing post number 14350 billingcountry required required a 10 billing country callbackurl required required ans 255 result page https //merchant com/callbackurl dbprocessurl required required ans 255 notif url https //merchant com/dbprocessurl description required required an 100 description test item merchanttoken required required an 255 token 6cfccfc0046773c1b589d8e 98f8b596c284f3c70a4ecf8 6eba14c18944b74bcd userip required required ans 15 user ip ( ) 127 0 0 1 cartdata required required json object 4000 cart data (json format) {} mitracd required required a 4 docid logd 07e0vrfugu0nldf jenc clickpayno required required n 16 clickpay card number datafield3 required required n 16 token 3 for clickpaytoken required required n 6 response token billingaddr an 255 billing address jln cendrawasih deliverynm a 30 delivery name john doe deliveryphone n 15 delivery phone 08125912342 deliveryaddr an 100 delivery address jln merak deliveryemail ans 100 delivery e mail test\@merchant com deliverycity a 50 delivery city jakarta deliverystate a 50 delivery state dki jakarta deliverypostcd a 10 delivery post code 14350 deliverycountry a 10 delivery country vat n 12 0 fee n 12 service tax 0 notaxamt n 12 tax free amount 0 reqdt n 8 request date ( yyyymmdd ) 20160301 reqtm n 6 request time ( hh24miss ) 135959 reqdomain ans 100 request domain merchant com reqserverip ans 15 request server ip 127 0 0 1 reqclientver ans 50 request client version 1 0 usersessionid an 100 user session id usersessionid useragent ans 100 user agent mozilla userlanguage ans 2 user language en us cashtag required for jenius required for jenius an 100 cashtagid (with $) $johndoe note for jenius, please use imid tnicecp041 and paymethod 04 then request to staging for developmental purposes response parameter direct debit registration direct debit registrasi response parameter { "resultcd" "0000", "amount" "10000", "goodsnm" "test transaction nicepay", "referenceno" "99997", "transtm" "113152", "mitracd" "mdrc", "txid" "testidtest04201803011131521855", "description" "payment of referenceno 99997", "resultmsg" "success", "billingnm" "customer name", "paymethod" "04", "callbackurl" "http //www merchant com/callbackurl", "currency" "idr", "transdt" "20180301" } parameter type size description example / notes resultcd n 4 docid logd 07e0vrfugu0nldf 0000 resultmsg an 255 docid logd 07e0vrfugu0nldf success txid an 30 transaction id testidtest04201803011131521855 referenceno ans 40 order number 99997 paymethod n 2 docid logd 07e0vrfugu0nldf 04 amount n 12 amount 10000 transdt n 8 transaction date ( yyyymmdd ) 20180301 transtm n 6 transction time ( hh24miss ) 113152 description ans 100 transaction description of reference number 99997 callbackurl ans 100 callback url http //www merchant com/callbackurl currency a 3 currency idr goodsnm an 100 goods name test transaction billingnm n 30 buyer name name mitracd a 4 docid logd 07e0vrfugu0nldf mdrc