NICEPAY API
...
API Payloan
Cancel - API Payloan
13 min
about api payloan cancel this uses to cancel a that has been paid if cancels before settlement is complete, is considered void, and funds will return to api payloan cancel the cancel uses for cancel for s via 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 02 03 04 05 06 payloan payloan 08 09 request parameters for payloan cancel the following is a list of s for requesting of cancel on these s are used via platform parameter type size description example / notes timestamp required required n 14 request timestamp 20221213141266 txid required required an 30 transaction id payloantes00202212131410560896 imid required required an 10 id payloantes paymethod required required n 2 docid\ ek 0djw7nuhytcda4sa3p 06 canceltype required required n 2 docid\ ly9czdrbjtw3rjv3l7r6v 1 cancelmsg an 255 cancel message request cancel merchanttoken required required an 255 token 9d1835e8bf87b51b44de9b2455fa37e733a87b12644b9cd4546e2ec2de651863 amt required required n 12 amount 12000 canceluserid an 30 user id admin response parameter for payloan cancel following are response s from results of request s for canceling handling parameter type size description example/notes txid an 30 transaction id payloantes00202212131410560896 referenceno ans 40 order number ord20200910170911 transdt n 8 transaction date 20221213 transtm n 6 transaction time 141056 amt n 12 amount 12000 resultcd n 4 docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 255 result message docid 4 fpewlvczfhcvygxwck9 success sample json for payloan cancel json request { 	"timestamp" "20221213141266", 	"txid" "payloantes00202212131410560896", 	"imid" "payloantes", 	"paymethod" "06", 	"canceltype" "1", 	"cancelmsg" "request cancel", 	"merchanttoken" "9d1835e8bf87b51b44de9b2455fa37e733a87b12644b9cd4546e2ec2de651863", 	"amt" "12000", "canceluserid" "admin" } json response { "txid" "payloantes00202212131410560896", "referenceno" "ord20200910170911", "resultcd" "0000", "resultmsg" "success", "transdt" "20221213", "transtm" "141056", "amt" "12000" } java request //cancel registration// nicepay settimestamp("20221213141266"); nicepay setimid("payloantes"); nicepay setamt("12000"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay settxid("payloantes00202212131410560896"); nicepay setpaymethod("06"); nicepay setcanceltype("1"); nicepay setcancelmsg("request cancel"); nicepay setcancaluserid("admin"); // 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");