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.
Nota
In addition to the required fields for Create Beneficiary, the
beneficiaryobject must include all required fields for the beneficiary listed in the response to Get Payout Required Fields.The code samples include successful requests (200), bad requests (400), and an unauthorized request (401). For all error messages that appear due to bad requests, see Payout Errors and General Errors.
.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' \ --data-raw '{ "beneficiary": "beneficiary_aa1289193cd5a04fb6de8612a9e00835", "amount": 100, "payout_method_type": "at_general_bank", "sender_country": "AT", "sender_currency": "EUR", "sender_entity_type": "company" }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "243fe1a3-7575-4cf8-9d77-a97148c931b4" }, "data": { "validated": true, "beneficiary": { "id": "beneficiary_aa1289193cd5a04fb6de8612a9e00835", "last_name": "Doe", "first_name": "John", "country": "AT", "entity_type": "individual", "name": "John Doe", "currency": "EUR", "bin_details": { "type": "DEBIT", "brand": "VISA", "level": "CLASSIC", "issuer": "CONOTOXIA SP. Z O.O", "country": "PL", "bin_number": "411111" }, "iban": "AT611904300234573201", "card_number": "1111", "payment_type": "regular", "category": "card", "default_payout_method_type": "at_general_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' \ --data-raw '{ "payout_method_type": "au_general_bank", "sender_country": "AU", "sender_currency": "AUD", "sender_entity_type": "company", "amount": 100, "beneficiary": { "payment_type": "regular", "address": "456 Main Street", "city": "Melbourne", "first_name": "Jane", "last_name": "Doe", "postcode": "3000", "account_number": "123456789", "bsb_code": "154126", "identification_type": "work permit", "identification_value": "658412", "country": "AU", "entity_type": "individual", "currency": "AUD" } }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "99b48648-c2ce-4a06-9a9d-ca911ce034b2" }, "data": { "validated": true, "beneficiary": { "last_name": "Doe", "first_name": "Jane", "country": "AU", "entity_type": "individual", "address": "456 Main Street", "name": "Jane Doe", "postcode": "3000", "city": "Melbourne", "account_number": "123456789", "currency": "AUD", "identification_type": "work permit", "identification_value": "******", "bsb_code": "154126", "payment_type": "regular" } } }
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' \ --data-raw '{ "beneficiary": { "category": "bank", "country": "AT", "currency": "EUR", "entity_type": "individual", "first_name": "John", "last_name": "Doe", "iban": "DE75512108001245126199" }, "amount": 100, "payout_currency": "EUR", "payout_method_type": "at_general_bank", "sender_country": "AT", "sender_currency": "EUR", "sender_entity_type": "company" }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "044248e3-ede2-41ea-9b5f-1fa62bc4a473" }, "data": { "validated": true, "beneficiary": { "last_name": "Doe", "first_name": "John", "country": "AT", "entity_type": "individual", "name": "John Doe", "currency": "EUR", "bank_name": "Societe Generale", "iban": "DE75512108001245126199", "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' \ --data-raw '{ "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" }'{ "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" } } }
Bad Request - Missing Input Fields
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' \ --data-raw '{ "beneficiary": { "payment_type": "regular", "iban": "DE75512108001245126199", "first_name": "John", "last_name": "Doe", "category": "bank", "country": "US", "currency": "USD", "entity_type": "individual", "bic_swift": "BARCGB22" }, "amount": 100, "payout_method_type": "at_general_bank", "sender_country": "AT", "sender_currency": "EUR", "sender_entity_type": "company" }'{ "status": { "error_code": "ERROR_VALIDATE_PAYOUT_BENEFICIARY", "status": "ERROR", "message": "The request tried to validate a beneficiary, but there was an error in the input fields. The request was rejected. Corrective action: Run 'Get Payout Required Fields'.", "response_code": "ERROR_VALIDATE_PAYOUT_BENEFICIARY", "operation_id": "17c74e08-b174-4e3a-87a5-aaab5c374c8f" } }
Bad Request - Beneficiary Not Found
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' \ --data-raw '{ "beneficiary": "beneficiaryaa1289193cd5a04fb6de8612a9e00835", "amount": 100, "payout_method_type": "at_general_bank", "sender_country": "AT", "sender_currency": "EUR", "sender_entity_type": "company" }'{ "status": { "error_code": "ERROR_GET_BENEFICIARY", "status": "ERROR", "message": "The request attempted an operation that requires a payout beneficiary, but the beneficiary was not found. The request was rejected. Corrective action: Use the ID of a valid beneficiary.", "response_code": "ERROR_GET_BENEFICIARY", "operation_id": "d64efcd9-3a97-49be-8f4d-5e9421e99550" } }
Unauthorized
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' \ --data-raw '{ "beneficiary": { "payment_type": "regular", "iban": "DE75512108001245126199", "first_name": "John", "last_name": "Doe", "category": "bank", "country": "US", "currency": "USD", "entity_type": "individual", "bic_swift": "BARCGB22" }, "amount": 100, "payout_method_type": "at_general_bank", "sender_country": "AT", "sender_currency": "EUR", "sender_entity_type": "company" }'{ "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": "611b0dcd-3558-4e0b-8ede-3686064892df" } }