NICEPAY API
API Version 1 (V1)
V1 Professional
23 min
❕ this {{section}} contains reference of previous {{nicepay}} {{api}} version {{nicepay}} recommend {{merchant}} to use {{the}} newest {{api}} nicepay professional {{nicepay}} professional steps the {{customer}} registers {{the}} {{transaction}} {{nicepay}} redirects {{the}} {{customer}} to {{nicepay}} secure {{paymentproduct}} page finish {{the}} {{payment}} in {{nicepay}} secure {{paymentproduct}} page {{nicepay}} will redirect {{the}} {{customer}} to {{merchant}} callbackurl to give {{the}} {{payment}} {{information}} guide flow v1 professional steps description the {{customer}} sends a {{checkout}} request the {{customer}} sends card data to {{the}} {{merchant}} to create an {{order}} {{merchant}} sends {{the}} card data to {{nicepay}} {{nicepay}} will make {{paymentproduct}} page and txid {{nicepay}} sends {{the}} {{paymentproduct}} page and txid to {{the}} {{merchant}} the {{merchant}} receives {{the}} {{paymentproduct}} page and txid and then save txid into {{the}} database the {{customer}} will redirect to {{the}} {{paymentproduct}} page the {{customer}} visits {{nicepay}} {{paymentproduct}} page and inputs {{the}} {{transaction}} detail {{nicepay}} sends {{transaction}} detail to {{bank}} the {{bank}} sends {{transaction}} result {{nicepay}} receives {{transaction}} result the {{customer}} will view {{the}} {{paymentproduct}} result page {{nicepay}} sends a {{notification}} to {{merchant}} the {{merchant}} receives {{the}} {{notification}} and checks {{the}} {{payment}} {{status}} {{nicepay}} receives and sends {{the}} {{status}} response to {{the}} {{merchant}} the {{merchant}} receives {{the}} response {{status}} from {{nicepay}} the {{merchant}} updates {{the}} {{status}} into database the {{merchant}} sends {{the}} confirmation to {{the}} {{customer}} transaction registration registration api specifications 193,432,118 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 registration api parameters sample api request // payment mandatory field nicepay setpaymethod("01"); nicepay setcurrency("idr"); nicepay setamt("1000"); nicepay setinstmntmon("1"); nicepay setreferenceno("merchantreferencenumber001"); 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 delivery"); nicepay setdeliveryphone("081234567890"); nicepay setdeliveryaddr("billing address "); nicepay setdeliverycity("jakarta"); nicepay setdeliverystate("jakarta"); nicepay setdeliverypostcd("12345"); nicepay setdeliverycountry("indonesia"); nicepay setcallbackurl("https //merchant com/api/callbackurl"); nicepay setdbprocessurl("https //merchant com/api/dbprocessurl/notif"); nicepay setvat("0"); nicepay setfee("0"); nicepay setnotaxamt("0"); nicepay setdescription("description"); nicepay setuserip("127 0 0 1"); nicepay shopid("nicepay"); nicepay setmerchanttoken(nicepay maketoken(nicepay getamt(), nicepay getreferenceno())); nicepay setcartdata("{}"); nicepay setinstmntmon("1"); nicepay setinstmnttype("1"); nicepay setreccuropt("0"); // payment optional field nicepay setreqdt("20160301"); nicepay setreqtm("135959"); nicepay setreqdomain("www 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 setvacctvaliddt("20160303"); nicepay setvacctvalidtm("135959"); nicepay setpaymentexpirydt("20160303"); nicepay setpaymentexpirytm("135959"); // payment request nicepay paypage(); // 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 requesturl= nicepay get("requesturl"); sample api response { "apitype" "m0", "txid" "ionpaytest01202002130920175001", "requestdate" "20200213092017", "responsedate" "20200213092017", "data" { "txid" "ionpaytest01202002130920175001", "resultcd" "0000", "resultmsg" "success", "requesturl" "https //dev nicepay co id/nicepay/api/orderinquiry do" } } 146,72,61,183,296 trueleft 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 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 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 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 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 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 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 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 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 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 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 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type note for jenius {{please}} use imid tnicecp041 and paymethod 04 then request to staging for developmental purposes cart data api v1 { "count" "2", "item" \[ { "img url" "http //img aaa com/ima1 jpg", "goods name" "item 1 name", "goods detail" "item 1 detail", "goods amt" "700" }, { "img url" "http //img aaa com/ima2 jpg", "goods name" "item 2 name", "goods detail" "item 2 detail", "goods amt" "300" } ] } 176,383 trueleft 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 after {{the}} {{transaction}} registers successfully, don't forget to redirect your client to {{nicepay}} {{paymentproduct}} {{page}} nicepay secure payment page payment method selection when {{the}} {{customer}} click {{the}} change {{button}} , they can see {{the}} {{page}} above and change their preferred {{paymethod}} note for shopeepay {{ewallet}} in order to better user experience to {{the}} {{customer}} , please request give a warning message to {{the}} {{customer}} so they will open their mobile device payment method qris option confirm {{the}} {{payment}} after {{the}} {{customer}} open {{the}} {{ewallet}} application and scan {{the}} qr code then click process {{nicepay}} will redirect end user to {{merchant}} callbackurl to give {{the}} {{payment}} {{information}} payment method jenius option after {{the}} {{customer}} choose jenius and click process {{button}} , then input cashtag id after that confirmation, {{payment}} can be done via jenius application transaction payment payment api specifications 183,560,117 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type payment parameters 100,613,186 true unhandled content type unhandled content type sample api request if (nicepay get("resultcd") equals("0000")) { string site = nicepay get("requesturl") + "\&optdisplaycb=0" + "\&optdisplaybl=0"; response setstatus(response sc moved temporarily); response setheader("location", site); } 108,57,56,112,271 trueleft 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 to prevent your client changing {{the}} {{paymethod}} , set optdisplaycb = 1 payment response parameters sample response to callbackurl with parameter https //merchant com/result?resultcd=0000\&resultmsg=success\&bankvacctno=44779000090927472371\&txid=ionpaytest02202011050927472371\&referenceno=order%2020201105091192\&transdt=20201105\&transtm=092747\&amount=150000\&bankcd=cena\&description=payment+of+referenceno+order+20201105091192 note {{paymentproduct}} response parameter will be sent through callbackurl using url string query 133,87,79,100,100,184 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 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 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 reccuring token when {{the}} {{merchant}} signs contract as a recurring {{merchant}} , {{nicepay}} give a recurringtoken to {{the}} {{paymentproduct}} {{api}} response 183,560,117 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 token 156,60,55,133,293 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 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 response parameter for token 116,61,56,200,283 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 left unhandled content type when callback to your callbackurl is received, we strongly recommend {{merchant}} s to verify {{the}} status by using inquiry {{api}}