NICEPAY API
...
Payment API
API Direct Debit
Status Inquiry - API Direct Debit
8 min
about api direct debit status inquiry integration of {{the}} status inquiry {{api}} on {{directdebit}} 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 direct debit status inquiry the {{integration}} of inquiry status on {{directdebit}} aims to allow {{merchant}} s to connect with {{the}} {{api}} {{system}} to check {{the}} {{status}} of {{the}} {{directdebit}} {{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 recommend {{merchant}} to verify {{the}} {{notification}} using {{the}} status inquiry api direct debit docid\ b6ctfh0si5ntzuljbwtnd notification handling is very useful to minimize {{the}} risk of fraud we strongly encourage {{merchant}} s to verify notification handling you can read more detailed {{information}} about notification handling on notification api direct debit docid\ patmvczps9jddevwkn0ws request parameter for direct debit status inquiry the following is a list of {{parameter}} s for requesting a {{status}} inquiry in {{the}} {{directdebit}} {{transaction}} {{process}} parameter type size description example / notes timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20220521144206 txid required required an 30 transaction id tnicecp04104202205191442060467 imid required required an 10 {{merchant}} id tnicecp041 referenceno required required ans 40 {{merchant}} order number 20220519144204 amt required required n 12 transaction amount 2000 merchanttoken required required an 255 {{merchant}} token 415c63ed51b7fd1f8fb39b48138cd15d8edf301309b2330f7548970196a0073c response parameter for direct debit status inquiry the following is a list of responses to request status inquiry on the direct debit 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 unpaid txid an 30 transaction id tnicecp04104202205191442060467 imid an 10 {{merchant}} id tnicecp041 referenceno ans 40 {{merchant}} reference number 20220519144204 paymethod n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 04 amt n 12 {{paymentproduct}} amount 2000 cancelamt n 12 cancel amount null reqdt n 8 transaction request date ( yyyymmdd ) 20220519 reqtm n 6 transaction request time ( hh24miss ) 144206 transdt n 8 transaction date ( yyyymmdd ) null transtm n 6 transaction time ( hh24miss ) null depositdt n 8 transaction deposit date ( yyyymmdd ) null deposittm n 6 transaction deposit time ( hh24miss ) null mitracd a 4 mitra code docid 0upx1lyg1o2f4biu3ssp null instmntmon n 2 installment month null instmnttype n 2 installment type code docid\ wfsinjxqc2s9yubbybpep 1 cardno n 20 {{cc}} number null preauthtoken an 64 pre auth token null acqubankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l null issubankcd a 4 bank code docid\ qbeq29lj53z vbvxtvb7l null 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 cvs number (cvs) null receiptcode ans 20 authorization number null recurringtoken an 64 recurring {{paymentproduct}} token null cctranstype n 2 payment status code docid 7pas vd5ylg4vdurmygwo null payvaliddt n 8 expiry date ( yyyymmdd ) null payvalidtm n 6 expiry time ( hh24miss ) null mrefno an 18 {{bank}} reference number null acqustatus n 2 purchase status 1 normal 2 recurring 3 pre auth 4 capture null cardexpyymm n 4 card expiration ( yymm ) null acqubanknm a 255 acquiring {{bank}} name null issubanknm a 255 issuing {{bank}} name null depositdt n 8 deposit date ( yyyymmdd ) null deposittm n 6 deposit time ( hh24miss ) null paymentexpdt n 6 qr {{paymentproduct}} expiry date ( yyyymmdd ) null paymentexptm n 6 qr {{paymentproduct}} expiry time ( hh24miss ) null paymenttrxsn n 32 {{paymentproduct}} transaction number null cancelamt n 12 cancel amount null canceltrxsn an 32 cancel transaction number null currency a 3 currency idr goodsnm an 100 goods name test transaction billingnm a 100 buyer name john doe status n 1 payment status code docid\ allhyf9mj hw8 mpz4tmu 9 userid an 128 {{qris}} user id hash null shopid an 32 shop id null sample json for direct debit status inquiry json request { 	"timestamp" "20220521144206", 	"txid" "tnicecp04104202205191442060467", 	"imid" "tnicecp041", 	"referenceno" "20220519144204", 	"amt" "2000", 	"merchanttoken" "415c63ed51b7fd1f8fb39b48138cd15d8edf301309b2330f7548970196a0073c" } json response { "txid" "tnicecp04104202205191442060467", "imid" "tnicecp041", "currency" "idr", "amt" "2000", "instmntmon" null, "instmnttype" "1", "referenceno" "20220519144204", "goodsnm" "test transaction", "paymethod" "04", "billingnm" "john doe", "reqdt" "20220519", "reqtm" "144206", "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, "paymentexpdt" null, "paymentexptm" null, "paymenttrxsn" null, "canceltrxsn" null, "userid" null, "shopid" null } java request //inquiry registration// nicepay settimestamp("20220521144206"); nicepay setimid("tnicecp041"); nicepay setamt("2000"); nicepay setreferenceno("20220519144204"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay settxid("tnicecp04104202205191442060467"); // 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"); string shopid = nicepay get("shopid");