NICEPAY API
...
API E-Wallet
AstraPay Registration - API E-Wallet
10 min
about api for e wallet astrapay registration there are several specific differences for astrapay, like on url and token s the stages of in are same however, there are significant differences in of astrapay especially for astrapay registration and payment visit docid\ rui2t2t 97vn3ke51qpvp and docid\ cwfabl4melc4hn5z3fxmd to know other on other api for e wallet astrapay registration the astrapay registration uses so that s can connect their astrapay account with provided by so, that has been provided and hosted from side can integrate with from the following can use for astrapay api end point /nicepay/api/linkenable do request method pop up, redirect, submit pop up, redirect, submit description connecting account to header content type application/form merchant token sha256 ( imid + referenceno + billingphone + merchantkey ) request format application/json this can only be implemented for astrapay visit docid\ xvpxic xuenkuvyqkcsxm to know specific for astrapay request parameter for e wallet astra pay registration the following is a list of s for requesting registration for astrapay request register using call form url this uses through platform as one of stages so that 's can connect to s from parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20220101123456 imid required required an 10 id test referenceno required required ans 40 's reference number ord12345 paymethod n 2 docid\ ek 0djw7nuhytcda4sa3p 05 billingnm required required a 100 buyer name john doe billingphone required required n 15 buyer phone number 082111111111 billingemail required required ans 40 buyer e mail email\@merchant com mitracd required required a 4 docid 0upx1lyg1o2f4biu3ssp astr dbprocessurl required required ans 255 notification url https //merchant com/api/dbprocessurl/notif merchanttoken required required an 255 token 6cfccfc0046773c1b589d8e 98f8b596c284f3c70a4ecf8 6eba14c18944b74bcd 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 usersessionid visit docid\ mkxgm04 smrzpcmmynuk0 to learn general about s response parameter for e wallet astrapay registration following are response s from results of request s for registering astrapay parameter type size description example / notes resultcd n 4 docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 result message docid 4 fpewlvczfhcvygxwck9 success txid an 30 transaction id ionpaytest05202212121533119647 referenceno ans 40 reference number ncpy20221212153313 paymethod n 2 docid\ ek 0djw7nuhytcda4sa3p 05 amt n 12 amount null transdt n 8 transaction date ( yyyymmdd ) 20221212 transtm n 6 transaction time ( hh24miss ) 153313 mitracd a 4 docid 0upx1lyg1o2f4biu3ssp astr paymentexpdt n 6 qr expiry date ( yyyymmdd ) null paymentexptm n 6 qr expiry time ( hh24miss ) null redirecturlhttp ans 255 redirect to page https //sandbox astrapay com/merchant service/link?clientid=1baf55ad 2130 4d46 bf48 91b0b01004a1\&merchantuserid=2212124f0ccbef5a913058 redirecturlapp an 100 redirect url apps null redirecttoken an 100 redirect token null sample json for e wallet registration form urlencode request timestamp={timestamp} imid={imid} referenceno={referenceno} paymethod={paymethod} billingnm={billingnm} billingphone={billingphone} billingemail={billingemail} callbackurl={callbackurl} dbprocessurl={dbprocessurl} description={description} merchanttoken={merchanttoken} userip={userip} mitracd={mitracd} returnjsonformat={returnjsonformat} json response { "resultcd" "0000", "resultmsg" "success", "txid" "ionpaytest05202212121533119647", "referenceno" "ncpy20221212153313", "paymethod" "05", "amt" null, "transdt" "20221212", "transtm" "153313", "mitracd" "astr", "paymentexpdt" null, "paymentexptm" null, "redirecturlhttp" "https //sandbox astrapay com/merchant service/link?clientid=1baf55ad 2130 4d46 bf48 91b0b01004a1\&merchantuserid=2212124f0ccbef5a913058", "redirecturlapp" null, "redirecttoken" null } java request // ewallet astrapay registration // // ewallet astrapay registration mandatory field nicepay settimestamp("20220101123456"); nicepay setimid("testewallet"); nicepay setpaymethod("05"); nicepay setcurrency("idr"); nicepay setamt("10000"); nicepay setreferenceno("ord12345"); nicepay setbillingnm("john doe"); nicepay setbillingphone("082111111111"); nicepay setbillingemail("email\@merchant com"); nicepay setdescription("test transaction"); nicepay setcallbackurl("https //merchant com/api/dbprocessurl/notif"); nicepay setdbprocessurl("https //merchant com/api/dbprocessurl/notif"); nicepay setmitracd("astr"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken())); // request ewallet astrapay registration nicepay ewalletregist(); // 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 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"); string paymentexpdt = nicepay get("paymentexpdt"); string paymentexptm = nicepay get("paymentexptm"); string redirecturlhttp = nicepay get("redirecturlhttp"); string redirecturlapp = nicepay get("redirecturlapp"); string redirecttoken = nicepay get("redirecttoken"); callback handling e wallet astrapay registration callback handling on registration obtained on url format after registration is success url callback https //www nicepay co id/ionpay client/paymentresult jsp?string=\&resultcd=0000\&resultmsg=success\&txid=ionpaytest05202212151804213115\&mandateid=ionpaytest085695655721\&referenceno=ord20221215181255\&paymethod=05\&transdt=20221215\&transtm=180517\&mitracd=astr