API Documentation
Create Crypto Refund
2 min
this api creates a crypto refund order to enable merchants to refund a successfully processed crypto transaction it accepts amount, orderid and the other order details this api requires access token that can be generated using access token docid\ lq v6ff 2i h1o3xd5kka api name create refund method post url https your hostname pay3 app v1 client crypto refund create description create an order with payout details from application s backend tab examples examples languages id exhyhl9rwxfgu lg6oq1q language curl code curl location https your hostname pay3 app v1 client fiat refund n header signature generated signature n header access token dynamic access token n header accept application json n header content type application json n data n fiatamount 0 02 n requestid 9824649238 n clientid your client id n customlabel selectedlanguageid exhyhl9rwxfgu lg6oq1q results languages id vqyrchsr38ubbehatupjh language 200 customlabel code n requestid 9824649238 n refundid a35dc551 9fb4 491c 9f9b 44d9c2ef4b32 n fiatamount 0 02 n status refund created n n n selectedlanguageid vqyrchsr38ubbehatupjh request pathparameters queryparameters headerparameters name signature kind required type string description signature generated with sha256 followed by base64 encoding check below section for more details children name access token kind required type string description access token received from access token api you can reuse the access token across multiple api calls till it is expired children bodydataparameters name orderid kind required type string description the orderid of the parent order this can be found out from the dashboard the orderid of the parent order this can be found out from the dashboard name amount kind required type string description amount user can be refunded in string format this amount should be less than or equal to the parent order amount maximum two decimal places are allowed amount user can be refunded in string format this amount should be less than or equal to the parent order amount maximum two decimal places are allowed name clientid kind required type string description client id application s identifier children formdataparameters currentnewparameter label body parameter value bodydataparameters signature generation the request for creating payout order requires a header signature this can be generated using following javascript code snippet const crypto = require('crypto'); // required parameters const secretkey="api secret provided by pay3"; const fiatamount = "0 02"; const requestid = "order id generated by application"; const clientid = "your client id"; const accesstoken = "dynamic access token"; const getsignature = (secretkey, fiatamount, requestid) => { // prepare the string to sign in same format // fiatamount followed by requestid const stringtosign = 'fiatamount=' + fiatamount + '\&requestid=' + requestid; // generating signature using sha256 and provided secret and // base64 encode the result const mac = crypto createhmac('sha256', secretkey); return mac update(stringtosign) digest('base64'); } // generate signature const signature = getsignature(secretkey, fiatamount, requestid);