Convenience Store (CVS) - V1 Enterprise
8 min
convenience store menawarkan melalui ( ), seperti alfamart dan indomaret, akan mempermudah pengalaman berbelanja bagi supported cvs by nicepay alfamart indomaret lawson alfamidi dan+dan store cvs flow v1 alur cvs melakukan request checkout mengirimkan data kepada melakukan pendaftaran menggunakan api regist kepada melakukan validasi dan generate nomor mengirimkan nomor kepada mengirimkan nomor kepada memberikan nomor cvs kepada mengirimkan data nomor cvs kepada cvs mengirimkan data inquiry kepada melakukan inquiry mengirimkan inquiry kepada cvs melakukan mengirimkan kepada cvs cvs membuat bukti cvs mengirimkan bukti kepada cvs mengirim notifikasi kepada memperbarui mengirim kepada request pemeriksaan menggunakan kepada menerima request dikirimkan oleh mengirimkan response kepada menerima akhir mengirimkan hasil pesanan kepada cvs registration api specifications cvs registration api endpoint /nicepay/api/onepass do request method \<font color="#9900ef"> \</font> \<font color="#2166ae">application/x www form urlencoded\</font> \<font color="#3b9f0f">post\</font> description request payno untuk melakukan cvs di merchant token sha256( imid + referenceno + amt + merchantkey ) payment method 03 convenience store request parameter cvs registration convenience store registrasi request parameter // payment mandatory field nicepay setpaymethod("03"); nicepay setcurrency("idr"); nicepay setamt("1000"); nicepay setreferenceno("merchantreferencenumber001"); nicepay setmitracd("alma"); 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("{}"); // 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"); nicepay setpayvaliddt("20160303"); nicepay setpayvalidtm("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 payno= nicepay get("payno"); 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 tipe ukuran deskripsi contoh / catatan imid \<font color="#2166ae">required\</font> an 10 id ionpaytest paymethod \<font color="#2166ae">required \</font> n 2 payment method docid\ pnv6uw k42cisgzemke y 03 currency \<font color="#2166ae">required \</font> a 3 currency idr amt \<font color="#2166ae">required \</font> n 12 goods amount 1000 referenceno \<font color="#2166ae">required\</font> ans 40 order no merchantreferencenumber001 goodsnm \<font color="#2166ae">required \</font> an 100 goods name merchant goods 1 billingnm \<font color="#2166ae">required \</font> a a billing name john doe billingphone \<font color="#2166ae">required \</font> n 15 billing phone number 081234567890 billingemail \<font color="#2166ae">required \</font> ans 40 billing e mail buyer\@merchant com billingcity \<font color="#2166ae">required\</font> a 50 billing city jakarta billingstate \<font color="#2166ae">required \</font> a 50 billing state dki jakarta billingpostcd \<font color="#2166ae">required \</font> n 10 billing post number 12345 billingcountry \<font color="#2166ae">required \</font> a 10 billing country callbackurl \<font color="#2166ae">required \</font> ans 255 result url https //merchant com/callbackurl dbprocessurl \<font color="#2166ae">required \</font> ans 255 notif url https //merchant com/dbprocessurl description \<font color="#2166ae">required \</font> an 100 description test item merchanttoken \<font color="#2166ae">required \</font> an 255 token 6cfccfc0046773c1b589d8e98f8b596c284f3c70a4ecf86eba14c18944b74bcd userip \<font color="#2166ae">required\</font> ans 15 user ip ( ) 127 0 0 1 cartdata \<font color="#2166ae">required\</font> json object 4000 cart data (json format) {} mitracd \<font color="#2166ae">required\</font> a 4 mitra code docid\ pnv6uw k42cisgzemke y alma billingaddr an 255 billing address jln cendrawasih deliverynm a 30 delivery name john doe deliveryphone n 15 delivery phone 081234567890 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 payvaliddt n 8 cvs expiry date ( yyyymmdd ) 20160303 payvalidtm n 6 cvs expiry time ( hh24miss ) 135959 response parameter cvs registration { "resultcd" "0000", "amount" "10000", "goodsnm" "test transaction nicepay", "referenceno" "99997", "transtm" "110847", "mitracd" "alma", "txid" "testidtest03201803011108471311", "description" "payment of referenceno 99997,this description", "resultmsg" "success", "billingnm" "thomas alfa edison", "payno" "011108471311", "payvalidtm" "235959", "paymethod" "03", "callbackurl" "http //www merchant com/callbackurl", "payvaliddt" "20180308", "currency" "idr", "transdt" "20180301" } parameter tipe ukuran deksripsi contoh / catatan resultcd n 4 result code docid\ pnv6uw k42cisgzemke y 0000 resultmsg an 255 result message docid\ pnv6uw k42cisgzemke y 10000 goodsnm an 100 goods name test transaction txid an 30 transaction id testidtest03201803011108471311 referenceno ans 40 order number 99997 paymethod n 2 payment method docid\ pnv6uw k42cisgzemke y 03 amount n 12 amount 10000 transdt n 8 transaction date ( yyyymmdd ) 20180301 transtm n 6 transaction time ( hh24miss ) 110847 mitracd a 4 mitra code docid\ pnv6uw k42cisgzemke y alma payno n 12 cvs number 011108471311