Getting Started
Fiat Payout Server-Side API
6 min
this document explains how to create a fiat payout order and process user withdrawals using a backend only, server to server api without any user interface the docid\ cz cutnjfgefe eokawio api creates a payout order and returns the parameters required to process the withdrawal when mode= createverify is passed, no website url or ui is generated instead, the api response will share the required details by our downstream partner like fullname , accountnumber , bankname , upiid , pixkey , message once you receive these parameters, your backend can call the docid\ a3ytb3ovv03fgjwux7xoz api to complete the withdrawal this final api asyncronously submits the transaction to our downstream partner and share a status pay3 backend sends events to your backend service with real time updates on the payout status when you receive an event, you may call the docid\ evzg5iqkqdzsr1 pkknds api to fetch the latest payout information note refer to the exchangeamount field to verify the paid sum steps step 1 get access token to generate the access token, you will call the api with the api secret and client id please refer to the docid\ lq v6ff 2i h1o3xd5kka step 2 create a signature with parameters the payout request requires a signature in the header this can be generated using the javascript code snippet at docid\ cz cutnjfgefe eokawio step 3 call docid\ cz cutnjfgefe eokawio api send the required parameters and ensure mode = createverify is enabled you will have to share required fields mandated by your respective payment processor which will be shared during onboarding the api creates an order and optionally checks with downstream processor with the data provided this api will respond back with verificationdetails when the downstream payment processor has mandatory verification requirement isverificationenabled flag is set to true please make sure to check the isverified flag is set to true in the response sample payload with all possible fields const payloadfiatpayout = { "currencyid" "brl bz", // please reach out to pay3 team for enabled currencies in your clientid "fiatamount" "1000 00", // fiat amount to be processed for the transaction "paymentmethodid" "pix", // please reach out to pay3 team for enabled payment methods in your clientid "email" "user\@example com", //pass the email of the user (uniqueid) "requestid" " ", // todo application’s order id, send unique id for every order (preferably uuid) "clientid" " ", // todo your clientid "firstname" "john", "lastname" "doe", "pixkey" "1234567890", "taxid" "12345678901", "mode" "createverify", "userid" "b418ae8f 7d1f 4c09 b32f 456abc789d12", "upiid" "john doe\@upi", "accountnumber" "123456789012", "bankcode" "bank123", "branchcode" "br001", "transfermode" "ach", "callbackurl" "https //www example com/callback", "lang" "en", "phonenumber" "+1234567890", "userdocumentid" "doc 9876543210", "userdocumenttype" "passport", "mercadopagousername" "john doe mp", "address" "123 main st, city, country", "latitude" "40 712776", "longitude" " 74 005974", "usermessage" "description " } sample response { "requestid" "b8238df5 339f 4fa0 b1dd 38f432305278", "token" "c5fa58b3 8385 4e79 85e6 047cab79404d", "url" null, "verificationdetails" { "isverificationenabled" true, "isverified" true, "fullname" "john doe", "pixkey" "john doe upi" "accountnumber" "xxxxxx8292", "bankname" "bank bri", "message" "account verified" } } step 4 call the docid\ a3ytb3ovv03fgjwux7xoz api using the header access token, clientid , token , requestid , call the api this api processes the payout and returns the final payout result sample payload const payloadfiatpayout = { "token" "45452aae 581d 49db 94be ac0973e39e86", "requestid" "239e667a 3a54 4928 a265 09c003d7ec73", "clientid" " " } sample response { "requestid" "239e667a 3a54 4928 a265 09c003d7ec73", "orderid" "776cd238 0d49 4a6b b5e0 a8ca245036a2", "ordertype" "payout", "status" "order payment initiated" } step 5 listen for webhook events pay3 backend sends webhook notifications with status updates upon receiving an event, you may call the docid\ evzg5iqkqdzsr1 pkknds to retrieve the latest payout details