NICEPAY API
...
API GPN
Registration - API GPN
11 min
tentang api for gpn registration pada , memiliki banyak keuntungan selain aksesibilitas dan efisiensi karena dapat menggunakan kartu atm berlogo dari apapun untuk melakukan melalui mesin edc apapun di seluruh api for gpn registration registrasi digunakan untuk terhubung dengan terdapat pada sehingga sudah disediakan dan di host dari sisi dapat ter dengan dari api endpoint /nicepay/direct/v2/registration request method post post description performs transaction regist to merchant token sha256( timestamp + imid + referenceno + amt + merchantkey ) request format application/json kunjungi docid\ qmes8dhjjo6ahaw2dllby untuk mempelajari umum mengenai request parameter for gpn registration berikut ini adalah daftar untuk melakukan request registrasi parameter ini digunakan melalui platform pengujian sebagai salah satu tahapan supaya milik dapat terhubung dengan dari informasi rincian terkait cartdata bersifat opsional untuk ditambahkan parameter tipe ukuran deskripsi contoh / catatan timestamp required required n 14 request timestamp ( yyyymmddhh24miss ) 20200813103605 imid required required an 10 id ionpaytest paymethod required required n 2 docid\ iifmsruuw7j9vmwefjz97 09 currency required required a 3 currency idr amt required required n 12 amount 1000 referenceno required required ans 40 's ref no order12345 goodsnm required required an 100 goods name testing normal full payment billingnm required required a 100 buyer name name billingphone required required n 15 buyer phone number 12345678 billingemail required required ans 40 buyer e mail email\@merchant com billingcity required required a 50 buyer city jakarta billingstate required required a 50 billing state dki jakarta billingpostcd required required n 10 billing post number 12345 billingcountry required required a 10 billing country cartdata required required jsonstring 4000 cart data optional instmnttype required required n 2 docid\ rt2c32s9hfl aohyoebv5 1 instmntmon required required n 2 installment month 1 recurropt required required n 2 0 automatic cancel 1 do not cancel 2 do not make token 2 dbprocessurl ans 255 notification url https //ptsv2 com/t/rizal/post merchanttoken an 255 token 129b8f6ce5c94e7c6200dee63a42a05caa4175ba4523068651d3e17a3208772c userip an 15 user ip 127 0 0 1 response parameter for gpn registration berikut adalah response parameter dari hasil request parameter untuk mendaftarkan parameter tipe ukuran deskripsi contoh / catatan resultcd n 4 docid 7o8nl7guqp asiwfdqi3v 0000 resultmsg an 255 result message docid\ wpcemazro xvnxz 1zaib success txid an 30 transaction id ionpaytest09202212070935176733 referenceno ans 40 reference number order12345 paymethod n 2 docid\ iifmsruuw7j9vmwefjz97 09 amt n 12 amount 1000 transdt n 8 transaction date ( yyyymmdd ) 20221207 transtm n 6 transction time ( hh24miss ) 093518 description an 100 transaction description null vacctno n 20 va number null mitracd a 4 docid\ tm257gq3dxgzf98uz0l33 null payno n 12 cvs number null currency a 3 currency null goodsnm an 100 goods name null billingnm a 100 buyer name null vacctvaliddt n 8 va expiry date ( yyyymmdd ) null vacctvalidtm n 6 va expiry time ( hh24miss ) null payvaliddt n 8 expiry date ( yyyymmdd ) null payvalidtm n 6 expiry time ( hh24miss ) null requesturl ans 360 request url null paymentexpdt n 6 qr expiry date ( yyyymmdd ) null paymentexptm n 6 qr expiry time ( hh24miss ) null qrcontent ans 360 qr string in plain text null qrurl ans 360 url for qr image, valid for 5 minutes null sample json for gpn registration json request { "timestamp" "20200813103605", "imid" "ionpaytest", "paymethod" "09", "currency" "idr", "amt" "1000", "referenceno" "order12345", "goodsnm" "testing normal full payment gpn", "billingnm" "customer name", "billingphone" "12345678", "billingemail" "email\@merchant com", "billingcity" "jakarta", "billingstate" "dki jakarta", "billingpostcd" "12345", "billingcountry" "indonesia", "dbprocessurl" "https //ptsv2 com/t/rizal/post", "merchanttoken" "129b8f6ce5c94e7c6200dee63a42a05caa4175ba4523068651d3e17a3208772c", "userip" "127 0 0 1", "instmnttype" "1", 	"instmntmon" "1", 	"recurropt" "1" } json response { 	"resultcd" "0000", 	"resultmsg" "success", 	"txid" "ionpaytest09202212070935176733", 	"referenceno" "order12345", 	"paymethod" "09", 	"amt" "1000", 	"transdt" "20221207", 	"transtm" "093518", 	"description" null, 	"bankcd" null, 	"vacctno" null, 	"mitracd" null, 	"payno" null, 	"currency" null, 	"goodsnm" null, 	"billingnm" null, 	"vacctvaliddt" null, 	"vacctvalidtm" null, 	"payvaliddt" null, 	"payvalidtm" null, 	"requesturl" null, 	"paymentexpdt" null, 	"paymentexptm" null, 	"qrcontent" null, 	"qrurl" null } java request //gpn registration// nicepay settimestamp("20221202141217"); nicepay setimid("ionpaytest"); nicepay setpaymethod("09"); nicepay setcurrency("idr"); nicepay setamt("5000"); nicepay setreferenceno("ordno20221202141217"); nicepay setdecription("test gpn"); nicepay setinstmnttype("1"); nicepay setinstmntmon("1"); nicepay setmerchanttoken(nicepay maketoken(nicepay getmerchanttoken()); nicepay setgoodsnm("testing registration gpn"); nicepay setbillingnm("john doe"); nicepay setbillingphone("081288998899"); nicepay setbillingemail("john doe\@example com"); nicepay setbillingaddr("jln raya kasablanka kav 88"); nicepay setbillingcity("south jakarta"); nicepay setbillingstate("dki jakarta"); nicepay setbillingcountry("indonesia"); nicepay setbillingpostcd("12800"); nicepay setdbprocessurl("http //ptsv2 com/t/merchant/post"); nicepay setcarddata("{\\"count\\" 1,\\"item\\" \[{\\"img url\\" \\"http \\\\\\/\\\\\\/www jamgora com\\\\\\/media\\\\\\/avatar\\\\\\/noimage png\\",\\"goods name\\" \\"hoodie\\",\\"goods detail\\" \\"hoodie\\",\\"goods amt\\" \\"5000\\"}]}"); // request gpn registration nicepay gpnregist(); // 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 paymethod = nicepay get("paymethod"); string amt = nicepay get("amt"); string transdt = nicepay get("transdt"); string transtm = nicepay get("transtm"); cart data gpn registration cartdata pada registrasi berguna untuk mendeklarasikan item apa saja akan di checkout berserta rincian dan harga per item parameter deskripsi contoh count total jumlah dari keseluruhan cart data 2 item terbagi menjadi 4 macam , yaitu img url , goods name , goods detail , dan goods amt penjelasan rincian pada item parameter deskripsi contoh img url url gambar barang (ukuran 50px x 50px) htttps\ //www merchant com/image goods1 jpg goods name nama barang nama item 1 goods detail deskripsi detail barang detail item 1 goods amt harga barang 1000 cartdata gpn registration { "count" "2", "item" \[ { "img url" "http //www merchant com/image goods1 jpg", "goods name" "item 1 name", "goods detail" "item 1 detail", "goods amt" "1000" }, { "img url" "http //www merchant com/image goods2 jpg", "goods name" "item 2 name", "goods detail" "item 2 detail", "goods amt" "1000" } ] }