NICEPAY API
...
Payment API
API GPN
Status Inquiry - API GPN
10 min
about api gpn status inquiry integration of {{the}} status inquiry {{api}} on {{gpn}} is required so that {{merchant}} s can check {{the}} current {{status}} of {{the}} {{transaction}} {{process}} carried out by {{the}} {{customer}} whether {{the}} {{status}} is success, fail, and others so that {{the}} {{system}} can have a report on that {{information}} api gpn status inquiry the {{integration}} of inquiry status on {{gpn}} aims to allow {{merchant}} s to connect with {{the}} {{api}} {{system}} to check {{the}} {{status}} of {{the}} {{gpn}} {{paymethod}} on a regular basis api endpoint /nicepay/direct/v2/inquiry request method post post description performs inquiry request to {{nicepay}} for status checking merchant token sha256( timestamp + imid + referenceno + amt + merchantkey ) request format application/json when your dbprocessurl received a {{notification}} , {{nicepay}} strongly encourage {{merchant}} s to verify {{the}} {{notification}} using {{the}} status inquiry api gpn docid\ z6mz313pnsr5weunylyta notification handling is very useful to minimize {{the}} occurrence of fraud we strongly encourage {{merchant}} s to verify notification handling you can read more detailed {{information}} about notification handling on notification api gpn docid 81hgsjsh3rqwpk1ldtbl6 request parameter for gpn status inquiry the following is a list of {{parameter}} s for requesting a {{status}} inquiry in {{the}} {{gpn}} {{transaction}} {{process}} parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20221114114338 txid required required an 30 transaction id ionpaytest01202212071629087180 imid required required an 10 {{merchant}} id ionpaytest referenceno required required ans 40 {{merchant}} order number 815123412341 amt required required n 12 transaction amount 10000 merchanttoken required required an 255 {{merchant}} token 4b11d820b0d2ef509715e7b923430643416efc0df4ca2ba2d4b66eb549e074bd response parameter for gpn status inquiry the following is a list of responses to request {{status}} inquiry on {{the}} {{gpn}} {{transaction}} {{process}} parameter type size description example / notes resultcd n 4 result code docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 result message error code docid 4 fpewlvczfhcvygxwck9 paid txid an 30 transaction id ionpaytest01202212071629087180 imid an 10 {{merchant}} id ionpaytest referenceno ans 40 {{merchant}} reference number 815123412341 paymethod n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 09 amt n 12 {{paymentproduct}} amount 10000 cancelamt n 12 cancel amount null reqdt n 8 transaction request date ( yyyymmdd ) 20221207 reqtm n 6 transaction request time ( hh24miss ) 162908 transdt n 8 transaction date ( yyyymmdd ) 20221207 transtm n 6 transaction time ( hh24miss ) 162908 depositdt n 8 transaction deposit date ( yyyymmdd ) null deposittm n 6 transaction deposit time ( hh24miss ) null currency a 3 currency idr goodsnm an 100 goods name test transaction {{nicepay}} billingnm a 100 buyer name john doe status n 1 payment status code docid\ allhyf9mj hw8 mpz4tmu 0 instmnttype n 2 installment type code docid\ wfsinjxqc2s9yubbybpep 1 instmntmon n 2 installment month 1 cardno n 20 card number 62210082 0590 preauthtoken an 64 pre auth token null issubankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l othr acqubankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l bnin vacctvaliddt n 8 va expiry date ( yyyymmdd ) null vacctvalidtm n 6 va expiry time ( hh24miss ) null vacctno n 20 va number null bankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l null payno n 12 {{paymentproduct}} number null mitracd a 4 mitra code docid 0upx1lyg1o2f4biu3ssp null receiptcode ans 20 authorization number null recurringtoken an 255 recurring token (needed for recurring {{paymentproduct}} ) null cctranstype n 2 payment status code docid 7pas vd5ylg4vdurmygwo 1 payvaliddt n 8 cvs expiry date ( yyyymmdd ) (cvs) null payvalidtm n 6 cvs expiry time ( hh24miss ) (cvs) null mrefno an 20 {{bank}} reference number ( {{directdebit}} ) null acqustatus n 2 status {{bank}} acquiring 20 cardexpyymm n 4 expiry ( yymm ) 2612 acqubanknm a 255 acquiring {{bank}} name bni issubanknm a 255 issuing {{bank}} name other paymentexpdt n 6 qr {{paymentproduct}} expiry date ( yyyymmdd ) null paymentexptm n 6 qr {{paymentproduct}} expiry time ( hh24miss ) null paymenttrxsn an 32 {{paymentproduct}} transaction number null canceltrxsn an 128 cancel transaction number null userid an 128 {{qris}} user id hash null shopid an 32 shop id null additional response parameter for others status inquiry the following is additional response list {{information}} from request {{status}} inquiry in other {{transaction}} {{process}} es parameter type size description example / notes mitracd a 4 mitra code docid 0upx1lyg1o2f4biu3ssp (cvs, {{directdebit}} , {{ewallet}} , {{payloan}} ) null payno n 12 cvs number (cvs) null payvaliddt n 8 cvs expiry date ( yyyymmdd ) (cvs) null payvalidtm n 6 cvs expiry time ( hh24miss ) (cvs) null receiptcode ans 20 authorization code (cvs) null mrefno an 20 {{bank}} reference number ( {{directdebit}} ) nul sample json for gpn status inquiry json request { 	"timestamp" "20221114114338", 	"txid" "ionpaytest01202212071629087180", 	"imid" "ionpaytest", 	"referenceno" "815123412341", 	"amt" "10000", 	"merchanttoken" "4b11d820b0d2ef509715e7b923430643416efc0df4ca2ba2d4b66eb549e074bd" } json response { "txid" "ionpaytest01202212071629087180", "imid" "ionpaytest", "currency" "idr", "amt" "10000", "instmntmon" "1", "instmnttype" "1", "referenceno" "815123412341", "goodsnm" "test transaction nicepay", "paymethod" "09", "billingnm" "john doe", "reqdt" "20221207", "reqtm" "162908", "status" "0", "resultcd" "0000", "resultmsg" "paid", "cardno" "62210082 0590", "preauthtoken" null, "acqubankcd" "bnin", "issubankcd" "othr", "vacctvaliddt" null, "vacctvalidtm" null, "vacctno" null, "bankcd" null, "payno" null, "mitracd" null, "receiptcode" null, "cancelamt" null, "transdt" "20221207", "transtm" "162908", "recurringtoken" null, "cctranstype" "1", "payvaliddt" null, "payvalidtm" null, "mrefno" null, "acqustatus" "10", "cardexpyymm" "2612", "acqubanknm" "bni", "issubanknm" "other", "depositdt" null, "deposittm" null, "paymentexpdt" null, "paymentexptm" null, "paymenttrxsn" null, "canceltrxsn" null, "userid" null, "shopid" null } java request //inquiry registration// nicepay settimestamp("20221114114338"); nicepay setimid("ionpaytest"); nicepay setamt("10000"); nicepay setreferenceno("ordno20221202141217"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay settxid("ionpaytest01202212071629087180"); // request inquiry nicepay inquiry(); // 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 status = nicepay get("status") string amt = nicepay get("amt"); string transdt = nicepay get("transdt"); string transtm = nicepay get("transtm");