NICEPAY API
API Versi 1
V1 Cancel Transaction
6 min
tentang cancel transaction {{api}} ini digunakan untuk membatalkan {{transaksi}} {{yang}} sudah terdaftar baik sudah melewati waktu {{settlement}} maupun {{yang}} belum api specifications cancel order api endpoint /nicepay/api/onepassallcancel do request method application/x www form urlencoded application/x www form urlencoded post post description mengajukan pembatalan transaksi ke {{nicepay}} merchant token sha256( imid + txid + amt + merchantkey ) request parameters cancel order nicepay setcancelmsg("cancel message"); nicepay setamt("1000"); nicepay setfee("0"); nicepay setvat("0"); nicepay setnotaxamt("0"); nicepay setreqserverip("127 0 0 1"); nicepay setcanceluserid(""); nicepay setuserip("127 0 0 1"); nicepay setcanceluserinfo("customer cancel transaction"); nicepay setcancelretrycnt("3"); nicepay setworker(""); // cancel mandatory field nicepay settrxid("ionpaytest02201603091207051498"); nicepay setpaymethod("02"); nicepay setcanceltype("1"); nicepay setmerchanttoken(nicepay maketoken(nicepay getamt(), nicepay gettrxid())); // cancel request nicepay cancel(); // cancel 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 referenceno= nicepay get("referenceno"); string transdt= nicepay get("transdt"); string transtm= nicepay get("transtm"); string description= nicepay get("description"); string amount= nicepay get("amount"); parameter tipe ukuran deskripsi contoh / catatan imid required required an 10 {{merchant}} id ionpaytest merchanttoken required required an 255 {{merchant}} token c69fd0a2e36fb9d97fc8418f6b22699143a1177e570769dac2cf4d2008558946 txid required required an 30 transaction id ionpaytest02201603091207051498 paymethod required required n 2 v1 nicepay code docid\ pnv6uw k42cisgzemke y 01 canceltype required required n 2 v1 nicepay code docid\ pnv6uw k42cisgzemke y 1 amt required required n 12 cancellation amount 1000 cancelmsg an 255 cancellation message cancel message fee n 12 service fee 0 vat n 12 {{vat}} number 0 cancelserverip ans 15 server ip address 127 0 0 1 canceluserid an 30 user id canceluserip ans 15 user ip address 127 0 0 1 canceluserinfo an 100 user information {{customer}} cancel transaction cancelretrycnt n 2 retry count for cancel 2 worker n 10 worker response parameter cancel order { "acquirerdata" { "rrn" "332510237487" }, "txid" "ionpaytest02201603091207051498", "referenceno" "ordno20160525000 52104", "resultcd" "0000", "resultmsg" "success", "transdt" "20160303", "transtm" "135959", "description" "payment of ordno20160525000 52104", "amount" "1000", "canceltxid" "ionpaytest02201603091207051499" } parameter tipe ukuran deskripsi contoh / catatan acquirerdata array 20 a dynamic array consisting of a unique reference number rrn that is provided by {{the}} {{bank}} ing {{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}} "acquirerdata" { "rrn" "332510237487" } txid an 30 transaction id ionpaytest02201603091207051498 referenceno ans 40 {{merchant}} order number ordno20160525000 52104 resultcd n 4 v1 nicepay code docid\ pnv6uw k42cisgzemke y 0000 resultmsg an 255 v1 nicepay code docid\ pnv6uw k42cisgzemke y success transdt n 8 transaction date 20160303 transtm n 6 transaction time 135959 description an 255 description {{paymentproduct}} of ordno20160525000 52104 amount n 8 amount 1000 canceltxid an 30 cancel transaction id ionpaytest02201603091207051499 canceltrxsn an 32 cancel transaction number