NICEPAY API
...
API E-Wallet
AstraPay Payment - API E-Wallet
15 min
tentang api e wallet astrapay payment melalui {{metodebayar}} {{ewallet}} , {{nicepay}} menawarkan {{anda}} kemudahan {{pembayaran}} lintas aplikasi ( jump app ) untuk {{pelanggan}} {{anda}} notifikasi akan dikirimkan ke {{pelanggan}} secara real time sesaat setelah {{pelanggan}} menyelesaikan {{pembayaran}} {{silakan}} kunjungi {{halaman}} docid\ saeozisjllcke5s4qvnhw untuk mengetahui perbedaan alur {{ewallet}} secara umum dengan astrapay api e wallet astrapay payment {{api}} ini bertujuan supaya mengaktifkan {{metodebayar}} {{ewallet}} astrapay pada {{merchant}} , sehingga {{pelanggan}} dapat melakukan {{transaksi}} {{pembayaran}} menggunakan {{ewallet}} dengan {{merchant}} tahapan ini untuk mengintegrasikan {{sistem}} dari {{merchant}} dengan {{sistem}} dari {{nicepay}} api url nicepay/api/linkinitiate do request method pop up, redirect, submit pop up, redirect, submit description performs {{paymentproduct}} request to {{nicepay}} header content type application/form merchant token sha256( imid + referenceno + amt + merchantkey ) request format application/json proses {{pembayaran}} hanya dapat berjalan setelah melalui {{proses}} registrasi, silakan pelajari lebih lengkap mengenai {{api}} registrasi astrapay pada {{halaman}} docid\ vso dkrqtg3j08wsbyvrz request parameter for e wallet astrapay payment berikut ini adalah daftar {{parameter}} untuk melakukan request registrasi {{metodebayar}} {{ewallet}} astrapay parameter ini digunakan melalui platform pengujian {{api}} sebagai salah satu tahapan supaya {{sistem}} milik {{merchant}} dapat terhubung dengan {{layanan}} dari {{nicepay}} parameter tipe ukuran deskripsi contoh / catatan timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20210315112359 imid required required an 10 {{merchant}} id ionpaytest mandateid required required n 40 mandate id ionpaytest123412345 paymethod required required n 2 docid\ iifmsruuw7j9vmwefjz97 05 currency an 3 currency idr amt n 12 {{paymentproduct}} amount 10000 goodsnm an 100 goods name john doe referenceno required required ans 40 {{merchant}} 's reference number ord54321 billingnm required required a 100 buyer name john doe billingphone required required n 15 buyer phone number 08123456789 billingemail required required ans 40 buyer email email\@merchant com billingaddr an 100 buyer address jln merdeka 123 billingcity a 50 buyer city jakarta selatan billingstate 1 50 billing state dki jakarta billingpostcd n 10 billing post number 14350 billingcountry a 10 billing country {{indonesia}} deliverynm a 30 delivery name john doe deliveryphone n 15 delivery phone 8124125931 deliveryaddr an 100 delivery address jln merdeka riau 161 deliverycity a 50 delivery city riau deliverystate a 50 delivery state riau deliverypostcd n 10 delivery post code 14350 deliverycountry a 10 delivery country {{indonesia}} cartdata required required jsonstring 4000 cart data {"count" 1,"item" \[{"goods name" "casandra blush on","goods detail" "casandra blush on","goods amt" "{{amt}}","goods quantity" "1","img url" " https //image freepik com/free psd/simple black men s tee mockup 53876 57893 jpg "}]} mitracd required required a 4 docid\ tm257gq3dxgzf98uz0l33 astr userip required required an 15 user ip 127 0 0 1 dbprocessurl required required ans 255 notification url https //merchant com/dbprocessurl merchanttoken required required an 255 {{merchant}} token a45e163042746131307bad89ef6cc0c517c136895a6cfe6cb77c4a62ce1ee5b3 description an 100 transaction description test transaction userip required required an 15 user ip address 127 0 0 1 returnjsonformat an 100 return json format 1 return redirect url app and redirect url http or empty/ 0 return html to redirect callbackurl an 255 result page {{silakan}} kunjungi {{bagian}} docid\ ijbzxzkxctritccmseikb untuk mempelajari {{informasi}} umum mengenai {{metodebayar}} {{ewallet}} response parameter for e wallet astrapay payment berikut adalah response parameter dari hasil request parameter untuk {{metodebayar}} {{ewallet}} astrapay parameter tipe ukuran deskripsi contoh / catatan resultcd n 4 docid 7o8nl7guqp asiwfdqi3v 0000 resultmsg an 255 result message docid\ wpcemazro xvnxz 1zaib success txid an 30 transaction id ionpaytest05202212121533119647 mandateid an 40 instead of signature token ionpaytest085695655726 referenceno ans 40 {{merchant}} reference number ncpy20221214121608 paymethod n 2 docid\ iifmsruuw7j9vmwefjz97 05 amt n 12 {{paymentproduct}} amount 2123 transdt n 8 transaction date ( yyyymmdd ) 20221214 transtm n 6 transction time ( hh24miss ) 121608 mitracd a 4 docid\ tm257gq3dxgzf98uz0l33 astr redirecturlhttp ans 255 redirect to {{mitra}} page https //apis astrapay com/merchant service/payments/e574e878 d37f 491e ba78 08e55de73d7 sample json for e wallet astrapay payment form urlencode request timestamp={timestamp} imid={imid} mandateid={mandateid} referenceno={referenceno} paymethod={paymethod} currency={currency} amt={amt} goodsnm={goodsnm} billingnm={billingnm} billingphone={billingphone} billingemail={billingemail} billingaddr={billingaddr} billingcity={billingcity} billingstate={billingstate} billingpostcd={billingpostcd} billingcountry={billingcountry} deliverynm={deliverynm} deliveryphone={deliveryphone} deliveryaddr={deliveryaddr} deliverycity={deliverycity} deliverystate={deliverystate} deliverypostcd={deliverypostcd} deliverycountry={deliverycountry} description={description} userip={userip} cartdata={cartdata} callbackurl={callbackurl} dbprocessurl={dbprocessurl} merchanttoken={merchanttoken} mitracd={mitracd} returnjsonformat={returnjsonformat} json response { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest05202212141216111291", "mandateid" "ionpaytest085695655726", "referenceno" "ncpy20221214121608", "paymethod" "05", "amt" "2123", "transdt" "20221214", "transtm" "121608", "mitracd" "astr", "redirecturlhttp" "https //apis astrapay com/merchant service/payments/e574e878 d37f 491e ba78 08e55de73d78" } java request //e wallet astrapay payment// nicepay settimestamp("20221214065959"); nicepay setimid("ionpaytest"); nicepay setmandateid("082111111111"); nicepay setpaymethod("05"); nicepay setcurrency("idr"); nicepay setamt("2000"); nicepay setreferenceno("ordno20221214065959"); nicepay setdecription("test ewallet astrapay"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay setgoodsnm("testing payment astrapay"); nicepay setbillingnm("john doe"); nicepay setbillingphone("082111111111"); nicepay setbillingemail("john doe\@example com"); nicepay setbillingaddr("jln raya kasablanka kav 88"); nicepay setbillingcity("south jakarta"); nicepay setbillingstate("dki jakarta"); nicepay setbillingcountry("indonesia"); nicepay setbillingpostcd("12800"); nicepay setcallbackurl("http //ptsv2 com/t/merchant/post"); nicepay setdbprocessurl("http //ptsv2 com/t/merchant/post"); nicepay setcarddata("{\\"count\\" 1,\\"item\\" \[{\\"img url\\" \\"http \\\\\\/\\\\\\/www jamgora com\\\\\\/media\\\\\\/avatar\\\\\\/noimage png\\",\\"goods name\\" \\"hoodie\\",\\"goods detail\\" \\"hoodie\\",\\"goods amt\\" \\"2000\\"}]}"); nicepay setmitracd("astr"); nicepay setreturnjsonformat("1"); // request e wallet astrapay payment nicepay ewalletastrapayment(); // response string // system out println("final response string " + nicepay getresponsestring()); string resultcd = nicepay get("resultcd"); string resultmsg = nicepay get("resultmsg"); string txid = nicepay get("txid"); string mandateid = nicepay get("mandateid"); string referenceno = nicepay get("referenceno"); string paymethod = nicepay get("paymethod"); string amt = nicepay get("amt"); string transdt = nicepay get("transdt"); string transtm = nicepay get("transtm"); string mitracd = nicepay get("mitracd"); cart data e wallet astrapay payment cartdata pada registrasi {{ewallet}} berguna untuk mendeklarasikan item apa saja {{yang}} dibeli agar bisa dilihat pada rincian item dan harga per barangnya parameter deskripsi contoh / catatan count total jumlah dari keseluruhan card data 2 item terbagi menjadi 4 macam {{parameter}} , yaitu img url , goods name , goods detail , dan goods amt penjelasan rincian pada {{parameter}} item parameter deskripsi contoh img url url gambar barang (ukuran 50px x 50px) htttps\ //www merchant com/image goods1 jpg goods name nama barang nama item 1 goods detail deskripsi detail barang detail item 1 goods amt harga barang 1000 cartdata e wallet astrapay payment { "count" "2", "item" \[ { "img url" "http //www merchant com/image goods1 jpg", "goods name" "item 1 name", "goods detail" "item 1 detail", "goods amt" "1000", "goods quantity" "1" }, { "img url" "http //www merchant com/image goods2 jpg", "goods name" "item 2 name", "goods detail" "item 2 detail", "goods amt" "1000" "goods quantity" "1" } ] } callback e wallet astrapay payment saat callbackurl sudah diterima oleh {{merchant}} , {{nicepay}} sangat menganjurkan {{merchant}} untuk melakukan verifikasi {{status}} menggunakan docid s9ys jjpqyzt9varbhsb callback handling dapat sangat membantu untuk meminimalisir terjadinya fraud , {{nicepay}} sangat merekomendasikan {{merchant}} untuk melakukan verifikasi callback handling request body { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest05202212141753501704", "mandateid" "ionpaytest082111111111" "referenceno" "ncpy20221214175347", "paymethod" "05", "amt" "10000", "transdt" "20221214", "transtm" "113441", "mitracd" "astr" } url callback https //merchant co id/nicepay callback?string=\&resultcd=0000\&resultmsg=success\&txid=ionpaytest05202212141753501704\&mandateid=ionpaytest085695655726\&referenceno=ncpy20221214175347\&paymethod=05\&transdt=20221214\&transtm=175350\&mitracd=astr\&amt=10