NICEPAY API
...
API Versi 2
Checkout API
Cancel - API Checkout
7min
tentang api checkout cancel {{api}} ini digunakan untuk membatalkan {{transaksi}} {{yang}} akan berjalan khusus untuk va, {{transaksi}} hanya dapat dibatalkan sebelum melakukan {{proses}} {{pembayaran}} setelah {{transaksi}} dibatalkan, {{pelanggan}} harus kembali melakukan pendaftaran dari awal melalui registration api checkout docid\ fqje 48 bzdt4uimqbfcx api checkout cancel api url /nicepay/direct/v2/cancel request method post header content type application/json merchant token sha256 ( timestamp + imid + txid + amt + merchantkey ) request parameters parameter tipe ukuran deskripsi contoh / catatan timestamp required required n 14 {{api}} request timestamp 20221219111294 txid required required an 30 transaction id normaltest00202212191104443483 imid required required an 10 {{merchant}} id normaltest paymethod required required n 2 payment method code docid\ iifmsruuw7j9vmwefjz97 02 canceltype required required n 2 cancel type code docid\ puggd4 zfloaf97oadv07 1 merchanttoken required required an 255 {{merchant}} token 63d44f80942cc915f6d736995797470ac2918a9f88b6fb762608541145e65bd8 amt required required n 12 {{paymentproduct}} amount 10000 cancelmsg required required an 255 cancel message request cancel preauthtoken an 100 pre auth token d4ef98b26f917a697691807cf… referenceno optional for cc optional for cc ans 40 {{merchant}} cancel number cancelno20160525000 52104 cancelserverip an 15 server ip 127 0 0 1 canceluserid an 30 user id admin canceluserip an 15 user ip 127 0 0 1 canceluserinfo an 100 user information test cancel cancelretrycnt n 2 retry count 5 worker an 10 worker worker response parameters parameter tipe ukuran deskripsi contoh / catatan resultcd n 4 result code docid 7o8nl7guqp asiwfdqi3v 0000 resultmsg an 255 result message error code docid\ wpcemazro xvnxz 1zaib success txid an 30 transaction id normaltest00202212191104443483 when success referenceno ans 40 {{merchant}} order number order20221012080918 when success transdt n 8 transaction date 20221219 when success transtm n 6 transaction time 110444 when success amt n 12 amount 10000 when success description an 255 description canceltxid an 30 cancel transaction id canceltrxsn an 32 cancel transaction number cancelreferenceno optional for cc optional for cc an 40 {{merchant}} cancel number sample json for api checkout cancel json request { 	"timestamp" "20221219111294", 	"txid" "normaltest00202212191104443483", 	"imid" "normaltest", 	"paymethod" "02", 	"canceltype" "1", 	"cancelmsg" "request cancel", 	"merchanttoken" "63d44f80942cc915f6d736995797470ac2918a9f88b6fb762608541145e65bd8", 	"amt" "10000" } json response { "txid" "normaltest00202212191104443483", "referenceno" "order20221012080918", "resultcd" "0000", "resultmsg" "success", "transdt" "20221219", "transtm" "110444", "amt" "10000" } java request // checkout cancel nicepay settimestamp("20221219111294"); nicepay setimid("normaltest"); nicepay settxid("normaltest00202212191104443483"); nicepay setpaymethod("02"); nicepay setcanceltype("1"); nicepay setcancelmsg("request cancel"); nicepay setamt("10000"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); // checkout cancel nicepay checkoutcancelrequest(); // response string // system out println("final response string " + nicepay getresponsestring()); string resultcd = nicepay get("resultcd"); string resultmsg = nicepay get("resultmsg"); string referenceno = nicepay get("referenceno"); string amt = nicepay get("amt"); string txid = nicepay get("txid"); string transdt = nicepay get("transdt"); string transtm = nicepay get("transtm"); string cancelreferenceno = nicepay get("cancelreferenceno");