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_548969fc5a0bf89da3cec70a1529338c -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' -d '{ "metadata": { "merchant_defined": "updated" } } '
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "2ec7bd18-5877-4ba9-b45d-569cda28e08f" }, "data": { "id": "payout_548969fc5a0bf89da3cec70a1529338c", "payout_type": "bank", "payout_method_type": "us_general_bank", "amount": 110, "payout_currency": "USD", "sender_amount": 110, "sender_currency": "USD", "status": "Created", "sender_country": "US", "sender": { "id": "sender_f2f9cd571ebcb404aa2e4f0fec5e3b69", "country": "US", "entity_type": "individual", "address": "123 First Street", "name": "John Doe", "date_of_birth": "22/02/1980", "postcode": "12345", "city": "Anytown", "state": "NY", "account_number": "123456789", "currency": "USD", "identification_type": "License No", "identification_value": "123456789", "purpose_code": "ABCDEFGHI", "beneficiary_relationship": "client", "source_of_income": "salary" }, "beneficiary_country": "US", "beneficiary": { "id": "beneficiary_3bd71e93ad8766bc6232c0567890680c", "country": "US", "entity_type": "individual", "address": "456 Second Street", "name": "Jane Doe", "postcode": "10101", "city": "Anytown", "state": "NY", "account_number": "BG96611020345678", "currency": "USD", "email": "janedoe@rapyd.net", "identification_type": "SSC", "identification_value": "123456789", "bank_name": "US General Bank", "bic_swift": "BUINBGSF", "ach_code": "123456789" }, "fx_rate": 1, "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": 110, "percent": 100 } ], "metadata": { "merchant_defined": "updated" }, "description": "Payout - Bank Transfer: Beneficiary/Sender objects", "created_at": 1607941348, "payout_fees": null, "expiration": null, "merchant_reference_id": "GHY-0YU-HUJ-POI", "paid_at": null, "identifier_type": null, "identifier_value": null, "error": null, "paid_amount": 0, "statement_descriptor": "GHY* Limited Access 800-123-4567" } }