NICEPAY API
...
Payment API
API QRIS

Cancel - API QRIS

13min
about api qris cancel this {{api}} uses to cancel a {{transaction}} that has been paid if {{the}} {{transaction}} cancels before {{the}} settlement {{process}} is complete, {{the}} {{transaction}} is considered void, and {{the}} {{transaction}} funds will return to {{the}} {{customer}} api qris cancel the {{qris}} cancel {{api}} uses for {{the}} cancel {{system}} for {{payment}} s via {{qris}} api end point /nicepay/direct/v2/cancel request method post post header content type application/json merchant token sha256( timestamp + imid + txid + amt + merchantkey ) payment methods available for cancel code paymethod 01 {{cc}} 02 {{va}} 03 {{cvs}} 04 {{directdebit}} 05 {{ewallet}} 06 {{payloan}} 08 qris qris 09 {{gpn}} request parameters for qris cancel the following is a list of {{parameter}} s for requesting {{integration}} of {{the}} cancel {{payment}} {{process}} on {{the}} {{qris}} {{paymethod}} these {{parameter}} s are used via {{the}} {{api}} {{testing}} platform parameter type size description example / notes timestamp required required n 14 {{api}} request timestamp 20221208091279 txid required required an 30 transaction id ionpaytest08202212080951090538 imid required required an 10 {{merchant}} id ionpaytest paymethod required required n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 08 canceltype required required n 2 cancel type code docid\ ly9czdrbjtw3rjv3l7r6v 1 merchanttoken required required an 255 {{merchant}} token 4f875d8ea982affbf29b11cf0d3811918dcd4400298eccadb929711d1f6f24d6 amt required required n 12 {{paymentproduct}} amount 5 cancelmsg an 255 cancel message request cancel cancelserverip an 15 server ip canceluserid an 30 user id admin canceluserip an 15 user ip canceluserinfo an 100 user information request cancel cancelretrycnt 	 n 2 retry count worker an 10 worker {{nicepay}} response parameter for qris cancel following are {{the}} response {{parameter}} s from {{the}} results of {{the}} request {{parameter}} s for canceling {{qris}} handling 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 ionpaytest08202212080951090538 referenceno ans 40 {{merchant}} order number ord54321 transdt n 8 transaction date 20221208 transtm n 6 transaction time 095155 amt n 12 amount 5 sample json for qris cancel json request { 	"timestamp" "20221208091279", 	"txid" "ionpaytest08202212080951090538", 	"imid" "ionpaytest", 	"paymethod" "08", 	"canceltype" "1", 	"cancelmsg" "request cancel", 	"merchanttoken" "4f875d8ea982affbf29b11cf0d3811918dcd4400298eccadb929711d1f6f24d6", 	"amt" "5", 	"cancelserverip" "", 	"canceluserid" "admin", 	"canceluserip" "", 	"canceluserinfo" "request cancel", 	"cancelretrycnt" "", 	"worker" "nicepay" } json response { "txid" "ionpaytest08202212080951090538", "referenceno" "ord54321", "resultcd" "0000", "resultmsg" "success", "transdt" "20221208", "transtm" "095155", "amt" "5" } java request //cancel registration// nicepay settimestamp("20221208091279"); nicepay setimid("ionpaytest"); nicepay setamt("5"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay settxid("ionpaytest08202212080951090538"); nicepay setpaymethod("08"); nicepay setcanceltype("1"); nicepay setcancelmsg("request cancel"); nicepay setcancelserverip("127 0 0 1"); // request cancel nicepay cancel(); // 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 amt = nicepay get("amt"); string cancelreferenceno = nicepay get("cancelreferenceno");