Approve - API Payout (Disbursement)
8 min
about api payout approve the approval aims to request your confirmation related to request for a transfer of funds along with details of beneficiary this uses to confirm request from registration api payout (disbursement) docid\ n5gqghicwz p jmbdkzmi api payout approve api endpoint /nicepay/api/direct/v2/approvepayout request method \<font color="#3b9f0f">post\</font> header content type application/json merchant token sha256 (timestamp + imid + txid+ merchantkey) request parameter api payout approve parameter type size description example / notes timestamp \<font color="#2166ae">required\</font> n 14 request date 20221219085959 txid \<font color="#2166ae">required\</font> an 30 transaction id ionpaytest07202212191238107952 imid \<font color="#2166ae">required\</font> an 10 id ionpaytest merchanttoken \<font color="#2166ae">required\</font> an 255 token 9f33948e1ce99b6f42c2a223234ec50ff1bc450c78a16885227c57fae4f4ff80 response parameter api payout approve if ever got a timeout during approve to , hopefully doesn't treat as success or failed, but suspect because fund deduction already s on this transactions that are considered suspect will still be ed, and only need extra time after finishes, will get that final from registered callback url to parameter type size description example / notes resultcd n 4 result code docid 2r5sr3xvppu1eju1nitg 0000 resultmsg an 10 result message error code docid 4 fpewlvczfhcvygxwck9 success txid an 30 transaction id (key from ) ionpaytest07202212191238107952 imid an 10 id ionpaytest referenceno ans 40 order number (key from ) ord12345 amt n 12 amount 1000 transdt n 8 transaction date ( yyyymmdd ) null transtm n 6 transaction time ( hh24miss ) null accountno n 20 beneficiary account number 5345000060 benefnm an 40 beneficiary name pt ionpay networks bankcd an 4 bank code docid\ qbeq29lj53z vbvxtvb7l bdin validdate \<font color="#2166ae">only for cashout\</font> n 8 valid token date ( yyyymmdd ) 20220819 (default d+1) validtm \<font color="#2166ae">only for cashout\</font> n 6 valid token time ( hh24miss ) 131207 (default d+1) cashouttoken \<font color="#2166ae">only for cashout\</font> n 20 valid token time ( hh24miss ) 2070520843 mcode \<font color="#2166ae">only for cashout\</font> an 40 generate token by cashout test sample json for payout approve json request { 	"timestamp" "20221219085959", 	"imid" "ionpaytest", 	"merchanttoken" "9f33948e1ce99b6f42c2a223234ec50ff1bc450c78a16885227c57fae4f4ff80", 	"txid" "ionpaytest07202212191238107952" } json response { 	"resultcd" "0000", 	"resultmsg" "success", 	"txid" "ionpaytest07202212191238107952", 	"referenceno" "ordno 20230504110578", 	"imid" "ionpaytest", 	"benefnm" "pt ionpay networks", 	"accountno" "5345000060", 	"bankcd" "bdin", 	"amt" "100000", 	"transdt" null, 	"transtm" null, 	"validdate" "20230505", //only for cashout 	"validtime" "110217", //only for cashout 	"cashouttoken" "0030456405", //only for cashout 	"mcode" "nicepay cashout test" //only for cashout } java request // approve payout hashmap\<string, object> requestmap = new hashmap\<string, object>(); requestmap put("timestamp", "20221221131217"); requestmap put("imid", "ionpaytest"); requestmap put("merchanttoken",nicepay getmerchanttoken()); requestmap put("txid", "ionpaytest07202212211309324833"); //nicepay api domain string mydomain = "https //dev nicepay co id"; //response json string string resultdata = ""; try { objectmapper mapper = new objectmapper(); string contents = mapper writevalueasstring(requestmap); url url = new url(mydomain + "/nicepay/api/direct/v2/rejectpayout"); urlconnection conn = url openconnection(); conn setdooutput(true); conn setusecaches(false); conn setrequestproperty("content type", "application/json"); dataoutputstream os = null; try { os = new dataoutputstream(conn getoutputstream()); os writebytes(contents); os flush(); } finally { if (out != null) os close(); } }