Create Recipient
This method allows you to add a new recipient to your recipient list in Rampable.
Method Signature
async createRecipient(body: CreateRecipientBody): Promise<CreateRecipientResponse>Parameters
body: CreateRecipientBody - An object with the following properties:
Required Fields
name:string- The name for the recipientemail:string- The recipient email addressaddress:string- The address of recipientcity:string- The city of recipientpostCode:string- The post code of recipientbank:object- The bank account information containing:accountName:string- The name of the bank account holdercurrency:string- The currency of the bank accountcountry:string- The country of the bank account
Optional Fields
recipientType:string- The type of recipient (IndividualorBusiness)organizationId:string- Unique identifier for the organizationreference:string- Additional reference informationbank:object- Additional bank details:bankName:string- The name of the bankaccountNumber:string- The bank account numberpaymentCode:string- The payment codeachNumber:string- The ACH numberfedwireNumber:string- The Fedwire numberibanNumber:string- The IBAN numberaccountType:Checking|Savings- The type of bank account
rampableAccessToken:string(optional) - The Rampable access token
ℹ️
A rampableAccessToken is required if you want to use rampable operations and not setup HTTP Signature Authentication (Personal Token)
Returns
Promise<CreateRecipientResponse> - The created recipient object.
Example Usage
const recipient = await sdk.rampableRecipient.createRecipient({
name: "John Doe",
recipientType: "Individual",
email: "john.doe@example.com",
organizationId: "org_123",
bank: {
currency: "USD",
country: "UNITED STATES",
accountNumber: "23123232123",
accountName: "John Doe",
paymentCode: "CODE123",
bankName: "Example Bank",
ibanNumber: "1",
achNumber: "1",
fedwireNumber: "1",
accountType: "Checking"
},
city: "New York",
postCode: "10001",
address: "123 Main St",
reference: "EMP001"
});Response Example
{
"name": "John Doe",
"recipientType": "Individual",
"email": "john.doe@example.com",
"bank": [
{
"accountName": "John Doe",
"bankName": "Example Bank",
"accountNumber": 23123232123,
"paymentCode": "CODE123",
"currency": "USD",
"country": "UNITED STATES",
"achNumber": "1",
"fedwireNumber": "1",
"ibanNumber": "1",
"accountType": "Checking",
"_id": "bank_123"
}
],
"organizationId": "org_123",
"userId": "user_123",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"city": "New York",
"postCode": "10001",
"address": "123 Main St",
"reference": "EMP001",
"id": "recipient_123"
}ℹ️
The recipient's name and email, along with bank country and currency, are required fields for creating a new recipient.
For more information, see the Rampable Recipients API Documentation (opens in a new tab).