Complete Payout
Use this method in the sandbox to simulate the action of a third party that is required for completing the payout process.
Relevant when the status of the payout is Created.
Prerequisites:
This method triggers the Payout Completed Webhook. This webhook contains the same information as the response.
amount
The payout amount. Decimal, including the correct number of decimal places for the currency exponent, as defined in ISO 2417:2015.
payout
ID of the payout. String starting with payout_.
.NET
using System; using System.Text.Json; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { var payout = "payout_cd35fbe8dc6fd7c2e67d44ad53a4367d"; var amount = "10"; string result = RapydApiRequestSample.Utilities.MakeRequest("POST", $"/v1/payouts/complete/{payout}/{amount}", 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 = {}; const result = await makeRequest( 'POST', '/v1/payouts/complete/payout_cd35fbe8dc6fd7c2e67d44ad53a4367d/10', 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); try { $object = make_request('post', '/v1/payouts/complete/payout_cd35fbe8dc6fd7c2e67d44ad53a4367d/10'); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request payout = 'payout_cd35fbe8dc6fd7c2e67d44ad53a4367d' amount = 10 results = make_request(method='post', path=f'/v1/payouts/complete/{payout}/{amount}') pprint(results)
/v1/payouts/complete/:payout/:amount
Complete Payout
curl -X post https://sandboxapi.rapyd.net/v1/payouts/complete/payout_f85eca81e10e2a0bd6bf0ac5ed35a926/2000 -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'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "61a91ad4-d805-4208-9ac5-272ffffc7b00" }, "data": { "id": "payout_f85eca81e10e2a0bd6bf0ac5ed35a926", "payout_type": "bank", "payout_method_type": "mx_abc_capital_bank", "amount": 39044.24, "payout_currency": "MXN", "sender_amount": 2000, "sender_currency": "USD", "status": "Completed", "sender_country": "US", "sender": { "id": "sender_94e84ba869e20da70be5b0c0027c889d", "country": "US", "entity_type": "company", "address": "address 2", "name": "Rapyd", "postcode": "3333", "city": "Amsterdam", "phone_number": "19019044444", "company_name": "Rapyd", "currency": "USD", "identification_value": "unc_num_123333", "province": "Amsterdam", "occupation": "Ridesharing" }, "beneficiary_country": "MX", "beneficiary": { "id": "beneficiary_d75798c2168f04a552542880ba772966", "last_name": "Doe", "first_name": "Jane", "country": "MX", "entity_type": "individual", "name": "Jane Doe", "currency": "MXN", "category": "bank" }, "fx_rate": 19.522119, "instructions": { "name": "instructions", "steps": [ { "step1": "The funds will be transferred to the provided account details of the beneficiary ." } ] }, "instructions_value": {}, "ewallets": [ { "ewallet_id": "ewallet_c1943cfeda5f98247ab117e5d2648861", "amount": 2000, "percent": 100 } ], "metadata": { "merchant_defined": true }, "description": "Salary", "created_at": 1607957007, "payout_fees": null, "expiration": null, "merchant_reference_id": null, "paid_at": "1607957177", "identifier_type": null, "identifier_value": null, "error": null, "paid_amount": 2000, "statement_descriptor": null } }
Complete Payout - Estimated Time of Arrival
curl -X post https://sandboxapi.rapyd.net/v1/payouts/complete/payout_35184394216898a43740eaaaf8cc5ebb/2.24 -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'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "cd36118e-e127-40c2-8861-fba373fdb050" }, "data": { "id": "payout_35184394216898a43740eaaaf8cc5ebb", "payout_type": "bank", "payout_method_type": "eu_sepa_bank", "amount": 2, "payout_currency": "EUR", "sender_amount": 2.24, "sender_currency": "USD", "status": "Completed", "sender_country": "DK", "sender": { "id": "sender_9182821b8c252d18b7d5f83d50cc21ae", "country": "DK", "entity_type": "company", "name": "Jane Doe", "company_name": "Acme", "currency": "USD" }, "beneficiary_country": "AT", "beneficiary": { "id": "beneficiary_9acc72a52b94dfb7f2d6fb3d410943db", "last_name": "Doe", "first_name": "John", "country": "AT", "entity_type": "individual", "name": "John Doe", "currency": "EUR" }, "fx_rate": 0.8943885, "instructions": [{ "name": "instructions", "steps": [{ "step1": "The funds will be transferred to the provided account details of the beneficiary." } ] } ], "instructions_value": {}, "ewallets": [{ "ewallet_id": "ewallet_a5d0ff1865fe71967d64a294dbd1de22", "amount": 2.24, "percent": 100 } ], "metadata": {}, "description": null, "created_at": 1680093715, "payout_fees": null, "expiration": null, "merchant_reference_id": null, "paid_at": "1680093729", "identifier_type": null, "identifier_value": null, "error": null, "paid_amount": 2, "statement_descriptor": null, "gc_error_code": null, "estimated_time_of_arrival": "The beneficiary will receive the funds in a few minutes." } }
Complete Payout - with card
curl -X post https://sandboxapi.rapyd.net/v1/payouts/complete/payout_9fc2a39187c00674cdd50221edbed5c2/10 -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'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "9775c2c3-38fc-42c7-8135-645f3e021fec" }, "data": { "id": "payout_9fc2a39187c00674cdd50221edbed5c2", "payout_type": "card", "payout_method_type": "ua_general_card", "amount": 10, "payout_currency": "UAH", "sender_amount": 0.25, "sender_currency": "USD", "status": "Completed", "sender_country": "AU", "sender": { "id": "sender_c109585bb9085607d544dcdf18bfaf85", "last_name": "Doe", "country": "AU", "entity_type": "company", "address": "123 Maple street", "name": "Jane Doe", "city": "Any town", "phone_number": "3218900123", "company_name": "4 Diamonds Limo service", "currency": "USD", "identification_value": "R1391230" }, "beneficiary_country": "UA", "beneficiary": { "id": "beneficiary_0fe3f4d9a37d31001dcef109206f83ab", "last_name": "Doe", "first_name": "John", "country": "UA", "entity_type": "individual", "name": "John Doe", "phone_number": "0231920712", "currency": "UAH", "bin_details": { "type": "CREDIT", "brand": "VISA", "level": "STANDARD", "issuer": "First Bank", "country": "AR", "bin_number": "589562" }, "card_expiration_year": "26", "card_expiration_month": "10", "card_number": "5650" }, "fx_rate": 39.8891626842, "instructions": [ { "name": "instructions", "steps": [ { "step1": "The funds will be transferred to the provided card details of the beneficiary." } ] } ], "instructions_value": {}, "ewallets": [ { "ewallet_id": "ewallet_f69bdf976830363ec0146418f31ea4c1", "amount": 0.25, "percent": 100 } ], "metadata": {}, "description": "Expenses", "created_at": 1721645048, "payout_fees": null, "expiration": null, "merchant_reference_id": null, "paid_at": "1721645465", "identifier_type": null, "identifier_value": null, "error": null, "paid_amount": 10, "statement_descriptor": null, "gc_error_code": null, "batch_file": null } }