NICEPAY API
...
Payment API
API Convenience Store
Cancel - API Convenience Store
14min
about api convenience store cancel this {{api}} uses by {{merchant}} s to integrate {{the}} cancel {{system}} for {{cvs}} 's {{paymethod}} used by {{the}} {{merchant}} transaction cancellation happens from either {{the}} {{customer}} side or {{the}} {{merchant}} if {{the}} {{customer}} changes their mind after {{proceed}} ing with {{the}} {{order}} and requests cancellation from {{the}} {{merchant}} before {{proceed}} ing with {{the}} {{payment}} {{process}} if there is a technical or non technical issue when {{the}} {{merchant}} {{process}} es {{the}} {{customer}} 's {{order}} {{merchant}} s can use this {{api}} so that {{the}} {{payment}} number issue can't be used anymore {{paymentproduct}} number can only canceled before being paid before {{the}} {{payment}} {{process}} is executed if {{the}} {{customer}} has {{proceed}} ed with {{the}} {{payment}} {{process}} , {{the}} paid bill can't be canceled or refunded to {{the}} {{customer}} through {{api}} api convenience store cancel the {{cvs}} cancel {{api}} uses for {{the}} cancel {{system}} for {{payment}} s through {{cvs}} api end point /nicepay/direct/v2/cancel request method post post header content type application/json merchant token sha256( timestamp + imid + txid + amt + merchantkey ) request format application/json payment methods available for cancel code paymethod 01 {{cc}} 02 {{va}} 03 convenience store convenience store 04 {{directdebit}} 05 {{ewallet}} 06 {{payloan}} 08 {{qris}} 09 {{gpn}} request parameters for convenience store cancel the following is a list of {{parameter}} s for activating {{the}} cancel {{system}} for {{the}} {{cvs}} {{paymethod}} these {{parameter}} s use via {{the}} {{api}} {{testing}} platform parameter type size description example / notes timestamp required required n 14 {{api}} request timestamp 20221212101278 txid required required an 30 transaction id ionpaytest03202212121030529316 imid required required an 10 {{merchant}} id ionpaytest paymethod required required n 2 payment method code docid\ ek 0djw7nuhytcda4sa3p 03 canceltype required required n 2 cancel type code docid\ ly9czdrbjtw3rjv3l7r6v 1 cancelmsg an 255 cancel message request cancel merchanttoken required required an 255 {{merchant}} token 49974dde3c4a311030bd2095431443ce3689d79c90caaa88f4186050abb77cf9 amt required required n 12 {{paymentproduct}} amount 10000 preauthtoken an 100 pre auth token response parameters for convenience store cancel following are {{the}} response {{parameter}} s from {{the}} results of {{the}} request {{parameter}} s for {{the}} {{integration}} of {{the}} {{cvs}} ancel 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 ionpaytest03202212121030529316 referenceno ans 40 {{merchant}} order number 815123412341 transdt n 8 transaction date 20221212 transtm n 6 transaction time 103052 description an 255 description test cancel amt n 12 amount 10000 response parameter for convenience store cancel json request { 	"timestamp" "20221212101278", 	"txid" "ionpaytest03202212121030529316", 	"imid" "ionpaytest", 	"paymethod" "03", 	"canceltype" "1", 	"cancelmsg" "request cancel", 	"merchanttoken" "49974dde3c4a311030bd2095431443ce3689d79c90caaa88f4186050abb77cf9", 	"preauthtoken" "", 	"amt" "10000" } json response { "txid" "ionpaytest03202212121030529316", "referenceno" "815123412341", "resultcd" "0000", "resultmsg" "success", "transdt" "20221212", "transtm" "103052", "description" "test cancel", "amt" "10000" } java request //cancel registration// nicepay settimestamp("20221208091279"); nicepay setimid("ionpaytest"); nicepay setamt("5"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay settxid("ionpaytest08202212080951090538"); nicepay setpaymethod("03"); nicepay setcanceltype("1"); nicepay setcancelmsg("request cancel"); // 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");