Validate Beneficiary
Validate the format of the details for a payout beneficiary.
You can validate a beneficiary multiple times for different payout methods.
You can enter a beneficiary
object or a previously created beneficiary ID.
Note
In addition to the required fields for Create Beneficiary, the beneficiary
object must include all required fields for the beneficiary listed in the response to Get Payout Required Fields.
The examples include additional fields for the us_ach_bank payout method.
.NET
using System; using System.Text.Json; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { var requestObj = new { beneficiary = "beneficiary_d895d90d276869efe1e359386a1fb3e3", payout_method_type = "us_ach_bank", sender_country = "US", sender_currency = "USD", sender_entity_type = "company", amount = 100 }; string request = JsonSerializer.Serialize(requestObj); string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/payouts/beneficiary/validate", 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 = { beneficiary: 'beneficiary_d895d90d276869efe1e359386a1fb3e3', payout_method_type: 'us_ach_bank', sender_country: 'US', sender_currency: 'USD', sender_entity_type: 'company', amount: 100 }; const result = await makeRequest('POST', '/v1/payouts/beneficiary/validate', 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); $beneficiary = [ "beneficiary" => "beneficiary_d895d90d276869efe1e359386a1fb3e3", "payout_method_type" => "us_ach_bank", "sender_country" => "US", "sender_currency" => "USD", "sender_entity_type" => "company", "amount" => 100 ]; try { $object = make_request('post', '/v1/payouts/beneficiary/validate', $beneficiary); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request # Validate Beneficiary beneficiary_id = 'beneficiary_d895d90d276869efe1e359386a1fb3e3' beneficiary_info = { "beneficiary": beneficiary_id, "payout_method_type": "us_ach_bank", "sender_country": "US", "sender_currency": "USD", "sender_entity_type": "company", "amount": 100 } results = make_request(method='post', path='/v1/payouts/beneficiary/validate', body=beneficiary_info) pprint(results)
/v1/payouts/beneficiary/validate/
Validate Beneficiary - ID
curl -X post https://sandboxapi.rapyd.net/v1/payouts/beneficiary/validate -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 '{ "beneficiary": "beneficiary_d895d90d276869efe1e359386a1fb3e3", "amount": 100, "payout_method_type": "us_ach_bank", "sender_country": "US", "sender_currency": "USD", "sender_entity_type": "company" } '
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "b3e2c654-5073-48bd-890e-81b8d8fc473a" }, "data": { "validated": true, "beneficiary": { "id": "beneficiary_d895d90d276869efe1e359386a1fb3e3", "country": "US", "entity_type": "company", "name": "All Star Limousine", "company_name": "All Star Limousine", "account_number": "0987654321", "currency": "USD", "identification_type": "company_registered_number", "identification_value": "9876543210", "bank_name": "All Star Limousine", "merchant_reference_id": "AllStarLimo", "aba": "987654321", "category": "bank" } } }
Validate Beneficiary - Object
curl -X post https://sandboxapi.rapyd.net/v1/payouts/beneficiary/validate -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 '{ "beneficiary": { "category": "bank", "company_name": "All Star Limousine", "country": "US", "currency": "USD", "entity_type": "company", "identification_type": "company_registered_number", "identification_value": "9876543210", "merchant_reference_id": "AllStarLimo", // Fields from 'beneficiary_required_fields' in the response to 'Get Payout Method Type Required Fields' "account_number": "0987654321", "aba": "987654321" }, "amount": 100, "payout_method_type": "us_ach_bank", "sender_country": "US", "sender_currency": "USD", "sender_entity_type": "company" } '
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "ba9fd0df-bebd-4f3d-bfbc-9dca19d8cfd8" }, "data": { "validated": true, "beneficiary": { "country": "US", "entity_type": "company", "name": "All Star Limousine", "company_name": "All Star Limousine", "account_number": "0987654321", "currency": "USD", "identification_type": "company_registered_number", "identification_value": "9876543210", "merchant_reference_id": "AllStarLimo", "aba": "987654321", "category": "bank" } } }
Validate Beneficiary with IBAN
curl -X post https://sandboxapi.rapyd.net/v1/payouts/beneficiary/validate -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 '{ "beneficiary": { "category": "bank", "country": "US", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "1234561789", "merchant_reference_id": "JDoe1", "address": "1 Main Street", "city": "AnyTown", "state": "NY", "postcode": "12a45", "account_number": "0987654321", "aba": "987654321", "iban": "DE75512108001245126199" }, "amount": 100, "payout_method_type": "us_ach_bank", "sender_country": "US", "sender_currency": "USD", "sender_entity_type": "company" } '
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "f3787817-f0eb-4658-b8b6-6c7984e2aa21" }, "data": { "validated": true, "beneficiary": { "last_name": "Doe", "first_name": "John", "country": "US", "entity_type": "individual", "address": "1 Main Street", "name": "John Doe", "postcode": "12a45", "city": "AnyTown", "state": "NY", "account_number": "0987654321", "currency": "USD", "identification_type": "identification_id", "identification_value": "1234561789", "bank_name": "Societe Generale", "merchant_reference_id": "JDoe1", "iban": "DE75512108001245126199", "aba": "987654321", "category": "bank" } } }
Validate Beneficiary with BIC/SWIFT
curl -X post https://sandboxapi.rapyd.net/v1/payouts/beneficiary/validate -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 '{ "beneficiary": { "category": "bank", "country": "US", "currency": "USD", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "identification_type": "identification_id", "identification_value": "1234561789", "merchant_reference_id": "JDoe1", "address": "1 Main Street", "city": "AnyTown", "state": "NY", "postcode": "12a45", "account_number": "0987654321", "aba": "987654321", "bic_swift": "BARCGB22" }, "amount": 100, "payout_method_type": "us_ach_bank", "sender_country": "US", "sender_currency": "USD", "sender_entity_type": "company" } 'curl -X post https://sandboxapi.rapyd.net/v1/payouts/beneficiary/validate -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": "fa0c8e48-208a-49b8-aca2-b1256981c9e1" }, "data": { "validated": true, "beneficiary": { "last_name": "Doe", "first_name": "John", "country": "US", "entity_type": "individual", "address": "1 Main Street", "name": "John Doe", "postcode": "12a45", "city": "AnyTown", "state": "NY", "account_number": "0987654321", "currency": "USD", "identification_type": "identification_id", "identification_value": "1234561789", "bank_name": "BARCLAYS BANK PLC", "merchant_reference_id": "JDoe1", "bic_swift": "BARCGB22", "aba": "987654321", "category": "bank" } } }