Create Sender
Create a sender for use in payouts.
The response provides a unique sender ID, which you can use in place of the sender
object for Create Payout.
Note
In addition to the required fields documented below, you must include all other sender fields listed in the response to , and you must conform to the regex provided. To create a sender that you can use with multiple payout methods, include all fields that are required by each payout method. The client is responsible for including all required fields.
The additional fields used in the Create Sender - individual example are for the ca_general_bank payout method. The additional field used in the Create Sender - company example is 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 { currency = "USD", country = "CA", entity_type = "individual", first_name = "Jane", last_name = "Smith", identification_type = "identification_id", identification_value = "987654321", date_of_birth = "12/12/2000", address = "1 Second Street", city = "Montreal", state = "Quebec", postcode = "12345" }; string request = JsonSerializer.Serialize(requestObj); string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/payouts/sender", 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 = { country: 'CA', currency: 'USD', entity_type: 'individual', first_name: 'Jane', last_name: 'Smith', identification_type: 'identification_id', identification_value: '987654321', date_of_birth: '12/12/2000', address: '1 Second Street', city: 'Montreal', state: 'Quebec', postcode: '12345' }; const result = await makeRequest('POST', '/v1/payouts/sender', 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); $sender = [ "currency" => "USD", "country" => "CA", "entity_type" => "individual", "first_name" => "Jane", "last_name" => "Smith", "identification_type" => "identification_id", "identification_value" => "987654321", "date_of_birth" => "12/12/2000", "address" => "1 Second Street", "city" => "Montreal", "state" => "Quebec", "postcode" => "12345" ]; try { $object = make_request('post', '/v1/payouts/sender', $sender); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request body = { "currency": "USD", "country": "CA", "entity_type": "individual", "first_name": "Jane", "last_name": "Smith", "identification_type": "identification_id", "identification_value": "987654321", "date_of_birth": "12/12/2000", "address": "1 Second Street", "city": "Montreal", "state": "Quebec", "postcode": "12345" } results = make_request(method='post', path='/v1/payouts/sender', body=body) pprint(results)
/v1/payouts/sender
Create Sender - individual
curl -X post https://sandboxapi.rapyd.net/v1/payouts/sender -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 '{ "country": "CA", "currency": "USD", "entity_type": "individual", "first_name": "Jane", "last_name": "Smith", "identification_type": "identification_id", "identification_value": "987654321", // Fields from 'sender_required_fields' in the response to 'Get Payout Method Type Required Fields' "date_of_birth": "12/12/2000", "address": "1 Second Street", "city": "Montreal", "state": "Quebec", "postcode": "12345" } '
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "fb1a4dba-589d-4237-a7df-832e8bcde9d7" }, "data": { "id": "sender_87a87cfef195f2e9418b7c582de653bc", "last_name": "Smith", "first_name": "Jane", "country": "CA", "entity_type": "individual", "address": "1 Second Street", "name": "Jane Smith", "date_of_birth": "12/12/2000", "postcode": "12345", "city": "Montreal", "state": "Quebec", "currency": "USD", "identification_type": "identification_id", "identification_value": "987654321" } }
Create Sender - company
curl -X post https://sandboxapi.rapyd.net/v1/payouts/sender -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 '{ "company_name": "Four Star Professional Services", "country": "US", "currency": "USD", "entity_type": "company", "identification_type": "company_registered_number", "identification_value": "0123456789", // Field from 'sender_required_fields' in the response to 'Get Payout Method Type Required Fields' "purpose_code": "transfer" } '
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "af2e3d0a-b1f2-473d-bea0-3ba0c1d71b3e" }, "data": { "id": "sender_8897b29d6e423fa5a16e9acec4a54a26", "country": "US", "entity_type": "company", "name": "Four Star Professional Services", "company_name": "Four Star Professional Services", "currency": "USD", "identification_type": "company_registered_number", "identification_value": "0123456789", "purpose_code": "transfer" } }