Update Payout
Change or modify a payout.
This method triggers the Payout Updated Webhook webhook. This webhook contains the same information as the response.
You must update description or metadata or both.
- payout 
- ID of the payout. String starting with payout_. 
 
- description 
- Description of the payout. 
 
- .NET - using System; using System.Text.Json; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { var requestObj = new { metadata = new { merchant_defined = updated } }; string request = JsonSerializer.Serialize(requestObj); string payoutId = "payout_2cf75efa950c11bc9a49207ded279ad7"; string result = RapydApiRequestSample.Utilities.MakeRequest("POST", $"/v1/payouts/{payoutId}", request); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
 
 
- JavaScript - const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const body = { metadata: { merchant_defined: updated } }; const result = await makeRequest( 'POST', '/v1/payouts/payout_2cf75efa950c11bc9a49207ded279ad7', body ); console.log(result); } catch (error) { console.error('Error completing request', error); } }
 
 
- PHP - <?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); $payout = [ "metadata" => array( "merchant_defined" => updated ), ]; try { $object = make_request('post', '/v1/payouts/payouts/payout_2cf75efa950c11bc9a49207ded279ad7', $payout); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
 
 
- Python - from pprint import pprint from utilities import make_request # Update Payout payout_id = 'payout_2cf75efa950c11bc9a49207ded279ad7' body = { "metadata": { "merchant_defined": updated }, } results = make_request(method='post', path=f'/v1/payouts/{payout_id}', body=body) pprint(results)
 
 
- /v1/payouts/:payout 
- Update Payout 
- curl -X post 'https://sandboxapi.rapyd.net/v1/payouts/payout_b5f468ba37f451d846eddcdc9b2d5bcb' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "metadata": { "merchant_defined": "Updated metadata" }, "description": "Updated description" }'
- { "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "b655084b-6558-44cf-8a2d-c1d152506253" }, "data": { "id": "payout_b5f468ba37f451d846eddcdc9b2d5bcb", "payout_type": "bank", "payout_method_type": "mx_abc_capital_bank", "amount": 2000, "payout_currency": "MXN", "sender_amount": 100.87, "sender_currency": "USD", "status": "Created", "sender_country": "MX", "sender": { "id": "sender_b69a49623d68889313b5b622ad9ff7a2", "country": "MX", "entity_type": "company", "name": "SenderCompanyName", "company_name": "SenderCompanyName", "currency": "USD" }, "beneficiary_country": "MX", "beneficiary": { "id": "beneficiary_602c827876721a485cdf4a7105b05cdc", "last_name": "Doe", "first_name": "John", "country": "MX", "entity_type": "individual", "name": "John Doe", "account_number": "321654987", "currency": "MXN", "bank_account_type": "clabe" }, "fx_rate": 19.82801735, "instructions": [ { "name": "instructions", "steps": [ { "step1": "The funds will be transferred to the provided account details of the beneficiary ." } ] } ], "instructions_value": {}, "ewallets": [ { "ewallet_id": "ewallet_4f1757749b8858160274e6db49f78ff3", "amount": 100.87, "percent": 100 } ], "metadata": { "merchant_defined": "Updated metadata" }, "description": "Updated description", "created_at": 1755758255, "payout_fees": null, "expiration": null, "merchant_reference_id": "", "paid_at": null, "identifier_type": null, "identifier_value": null, "error": null, "paid_amount": 0, "statement_descriptor": "RIDE MX payout monthly", "gc_error_code": null, "batch_file": null, "crypto_payout_hash": null } }
- Bad Request - Missing Fields 
- curl -X post 'https://sandboxapi.rapyd.net/v1/payouts/payout_2cf75efa950c11bc9a49207ded279ad7' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "description": "" }'
- { "status": { "error_code": "ERROR_MISSING_PAYOUT_UPDATE_FIELDS", "status": "ERROR", "message": "The request tried to update a payout, but both the description and the metadata were missing. The request was rejected. Corrective action: Provide either the description or metadata, or both.", "response_code": "ERROR_MISSING_PAYOUT_UPDATE_FIELDS", "operation_id": "f2801e00-ac24-4a4e-ae13-c9b2a89b4c69" } }
- Bad Request - Payout Not Found 
- curl -X post 'https://sandboxapi.rapyd.net/v1/payouts/payout_2cf75efa950c11bc9a49207ded279ad7' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "metadata": { "merchant_defined": "Updated metadata" }, "description": "Updated description" }'
- { "status": { "error_code": "ERROR_UPDATE_PAYOUT", "status": "ERROR", "message": "The request tried to update a payout, but the payout was not found. The request was rejected. Corrective action: For the 'payout' path parameter, use the ID of a valid payout, a string starting with 'payout_'.", "response_code": "ERROR_UPDATE_PAYOUT", "operation_id": "f9fa61ed-ea99-4dbc-9f2f-57f500c3ec40" } }
- Unauthorized 
- curl -X post 'https://sandboxapi.rapyd.net/v1/payouts/payout_2cf75efa950c11bc9a49207ded279ad7' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "metadata": { "merchant_defined": "Updated metadata" }, "description": "Updated description" }'
- { "status": { "error_code": "UNAUTHENTICATED_API_CALL", "status": "ERROR", "message": "The request was rejected due to an authentication issue. Corrective action: Check the status of your account in the 'Account Details' page of the Client Portal.", "response_code": "UNAUTHENTICATED_API_CALL", "operation_id": "1852188d-1574-4950-a847-4c5b181d36d9" } }