NICEPAY API
...
Payment API
API E-Wallet
AstraPay Payment - API E-Wallet
15min
about api e wallet astrapay payment through {{the}} {{ewallet}} {{paymethod}} , {{nicepay}} offers you {{the}} convenience of cross application {{payment}} s (jump app) for your {{customer}} s notifications will be sent to {{customer}} s in real time as soon as {{customer}} s complete {{payment}} s {{please}} visit {{the}} e wallet payment flow docid\ cmd9efdsw7mptws1elyfc {{page}} to acknowledge {{the}} flow difference between {{the}} general {{ewallet}} with astrapay api e wallet astrapay payment {{paymentproduct}} using {{ewallet}} aims to activate {{the}} {{ewallet}} {{paymethod}} at {{merchant}} s, so that {{customer}} s can make {{payment}} {{transaction}} s using {{ewallet}} with {{merchant}} s this stage is to integrate {{the}} {{merchant}} {{system}} with {{the}} {{nicepay}} {{system}} 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/x www form urlencoded the {{payment}} {{process}} can only be {{proceed}} after going through {{the}} registration {{process}} , please learn further about astrapay registration {{api}} on astrapay registration api e wallet docid 8qytjgylymk7zndm8zncz {{page}} request parameter for e wallet astrapay payment the following is a list of {{parameter}} s for requesting registration of {{the}} {{ewallet}} astrapay {{paymethod}} this {{parameter}} is used through {{the}} {{api}} {{testing}} platform as one of {{the}} stages so that {{the}} {{merchant}} 's {{system}} can connect with {{service}} s from {{nicepay}} parameter type size description example / notes 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 payment method code docid\ ek 0djw7nuhytcda4sa3p 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 mitra code docid 0upx1lyg1o2f4biu3ssp 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 {{please}} visit e wallet docid\ mkxgm04 smrzpcmmynuk0 to learn general {{information}} about {{ewallet}} {{paymethod}} response parameter for e wallet astrapay payment following are {{the}} response {{parameter}} s from the results of {{the}} request {{parameter}} s for {{the}} {{payment}} of {{the}} astrapay {{ewallet}} {{paymethod}} parameter type size description example / notes resultcd n 4 result code docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 result message error code docid 4 fpewlvczfhcvygxwck9 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 payment method code docid\ ek 0djw7nuhytcda4sa3p 05 amt n 12 {{paymentproduct}} amount 2123 transdt n 8 transaction date ( yyyymmdd ) 20221214 transtm n 6 transaction time ( hh24miss ) 121608 mitracd a 4 mitra code docid 0upx1lyg1o2f4biu3ssp 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 in {{ewallet}} registration is useful for declaring what items will be checked out along with item details and {{the}} price per item parameter description example / notes count total from all card data 2 item divide into 4 {{parameter}} type, such as img url , goods name , goods detail and goods amt detailed explanation on item {{parameter}} s parameter description example / notes img url goods picture url (ukuran 50px x 50px) htttps\ //www merchant com/image goods1 jpg goods name goods name nama item 1 goods detail goods detail description detail item 1 goods amt goods price 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 when your callback already received callbackurl , {{nicepay}} recommended {{the}} {{merchant}} to do {{the}} {{status}} verification using {{the}} status inquiry api e wallet docid\ tegpdwiwlqpwiik9vv3r4 callback handling can be very helpful to minimize {{the}} occurrence of fraud, {{nicepay}} highly recommend {{the}} {{merchant}} to do {{the}} verification using 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