NICEPAY API
API Version 1 (V1)
V1 Check Transaction Status
11min
about v1 check transaction status this {{api}} is intends to check {{the}} {{status}} of {{the}} {{transaction}} when a {{notification}} received on {{the}} dbprocessurl , {{nicepay}} strongly recommend {{merchant}} to verify {{the}} {{notification}} using {{the}} v1 check transaction status docid\ b hqvi5gbns yxcexem2a when callbackurl is received, we strongly recommend {{merchant}} to verify {{the}} {{status}} by using {{the}} v1 check transaction status docid\ b hqvi5gbns yxcexem2a callback handling is very helpful to minimize fraud actions, we strongly recommend {{merchant}} s to verify {{the}} callback handling callback handling flow steps description {{merchant}} do {{checkout}} {{merchant}} request {{paymentproduct}} to {{nicepay}} {{nicepay}} send response callback and {{paymentproduct}} result ( callbackurl ) to {{merchant}} {{merchant}} check {{the}} {{status}} {{merchant}} send {{the}} {{status}} to {{nicepay}} {{nicepay}} return response (final status flag) to {{merchant}} api check transaction status api endpoint /nicepay/api/onepassstatus do request method application/x www form urlencoded application/x www form urlencoded post post description inquires {{transaction}} {{status}} to {{nicepay}} server merchant token sha256( imid + referenceno + amt + merchantkey ) notification handling it is very helpful to minimize fraud actions, we strongly recommend {{merchant}} s to verify {{the}} notification handling notification handling flow steps description {{merchant}} do {{checkout}} {{merchant}} send {{payment}} to {{nicepay}} {{nicepay}} send notification url ( dbprocessurl ) to {{merchant}} {{merchant}} check {{the}} {{status}} {{merchant}} send {{the}} {{status}} to {{nicepay}} {{nicepay}} return response (final {{status}} flag) to {{merchant}} request parameters check status check status request parameter // order status mandatory field nicepay settrxid("ionpaytest02201603091207051498"); nicepay setreferenceno("merchantreferencenumber001"); nicepay setamt("1000"); nicepay setmerchanttoken(nicepay maketoken(nicepay getamt(), nicepay getreferenceno())); // order status request nicepay orderstatus(); // order status response system out println("response string " + nicepay getresponsestring()); // json in string format nicepay gethtresponse(); // json in hashtable\<string, string> format string resultcd = nicepay get("resultcd"); string resultmsg = nicepay get("resultmsg"); string txid= nicepay get("txid "); string imid= nicepay get("imid"); string currency= nicepay get("currency"); string amount= nicepay get("amount"); string instmntmon= nicepay get("instmntmon"); string instmnttype= nicepay get("instmnttype"); string referenceno= nicepay get("referenceno"); string goodsnm = nicepay get("goodsnm"); string paymethod = nicepay get("paymethod"); string billingnm= nicepay get("billingnm"); string merchanttoken= nicepay get("merchanttoken"); string reqdt= nicepay get("reqdt"); string reqtm = nicepay get("reqtm"); string status = nicepay get("status"); string bankcd= nicepay get("bankcd"); string vacctvaliddt= nicepay get("vacctvaliddt"); string vacctvalidtm= nicepay get("vacctvalidtm"); string vacctno= nicepay get("vacctno"); parameter type size description example / notes imid required required an 10 {{merchant}} id ionpaytest merchanttoken required required an 255 {{merchant}} token 6cfccfc0046773c1b89d8e98c txid required required an 30 transaction id ionpaytest02201607291027025291 amt required required n 12 goods amount 15000 referenceno required required ans 40 {{merchant}} order number ordno123124 response object check status check status response parameter { "txid" "normaltest01202002031344071337", "imid" "normaltest", "currency" "idr", "amt" "12000", "instmntmon" "1", "instmnttype" "1", "referenceno" "ord20200203130299", "goodsnm" "testing normal full payment cc va", "paymethod" "01", "billingnm" "customer name", "reqdt" "20200203", "reqtm" "134407", "status" "9", "resultcd" "0000", "resultmsg" "init", "cardno" null, "preauthtoken" null, "acqubankcd" null, "issubankcd" null, "vacctvaliddt" null, "vacctvalidtm" null, "vacctno" null, "bankcd" null, "payno" null, "mitracd" null, "receiptcode" null, "cancelamt" null, "transdt" null, "transtm" null, "recurringtoken" null, "cctranstype" null, "payvaliddt" null, "payvalidtm" null, "mrefno" null, "acqustatus" null, "cardexpyymm" null, "acqubanknm" null, "issubanknm" null, "depositdt" null, "deposittm" null, "acquirerdata" { "rrn" "332510237487" } } parameter type size description resultcd n 4 v1 nicepay code docid logd 07e0vrfugu0nldf resultmsg an 255 v1 nicepay code docid logd 07e0vrfugu0nldf txid an 30 transaction id referenceno ans 40 {{merchant}} reference number paymethod n 2 v1 nicepay code docid logd 07e0vrfugu0nldf amt n 12 {{paymentproduct}} amount reqdt n 8 transaction date ( yyyymmdd ) reqtm n 6 transaction time ( hh24miss ) currency a 3 currency goodsnm an 100 goods name billingnm an 30 billing name status n 1 v1 nicepay code docid logd 07e0vrfugu0nldf instmntmon n 2 installment month instmnttype n 2 v1 nicepay code docid logd 07e0vrfugu0nldf acquirerdata array 20 a dynamic array consisting of a unique reference number rrn that is provided by {{the}} banking {{partner}} when a refund is {{process}} ed this reference number can be used by {{the}} {{customer}} to track {{the}} {{status}} of {{the}} refund with {{the}} {{bank}} additional response for virtual account parameter type size description vacctvaliddt n 8 va validity date ( yyyymmdd ) vacctvalidtm n 6 va validity time ( hh24miss ) vacctno n 16 va number bankcd a 4 v1 nicepay code docid logd 07e0vrfugu0nldf additional response for qris parameter type size description mitracd a 4 v1 nicepay code docid logd 07e0vrfugu0nldf (qris) cancelamt n 12 cancel amount paymenttrxsn an 32 {{paymentproduct}} transaction number paymentexpdt n 6 qr {{paymentproduct}} expired date ( yyyymmdd ) shopid an 32 shop id transtm n 6 transaction time ( hh24miss ) paymentexptm n 6 qr {{paymentproduct}} expired time ( hh24miss ) canceltrxsn an 32 cancel transaction number userid an 128 {{qris}} user id hash transdt n 8 transaction date ( yyyymmdd ) depositdt n 8 transaction deposit ( yyyymmdd ) deposittm n 6 transaction deposit time ( hh24miss ) additional response for others payment method parameter type size description mitracd a 4 v1 nicepay code docid logd 07e0vrfugu0nldf (cvs, e wallet, payloan) payno n 12 {{paymentproduct}} number (cvs) payvaliddt n 8 cvs {{paymentproduct}} expired date ( yyyymmdd ) payvalidtm n 6 cvs {{paymentproduct}} expired time ( hh24miss ) receiptcode ans 18 authorization number