Update Recipient
This method allows you to update an existing recipient in your recipient list in Rampable.
Method Signature
async updateRecipient({recipientId: string, body: UpdateRecipientBody, rampableAccessToken?: string}): Promise<UpdateRecipientResponse>
Parameters
recipientId
:string
- The ID of the recipient to updatebody
:UpdateRecipientBody
- An object with the following properties: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)
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 holder
Optional Fields
reference
:string
- Additional reference informationrecipientType
:string
- The type of recipient (Individual
orBusiness
)organizationId
:string
- Unique identifier for the organizationbank
:object
- Additional bank details:currency
:string
- The currency of the bank accountcountry
:string
- The country of the bank accountbankName
: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
Returns
Promise<UpdateRecipientResponse>
- The updated recipient object.
Example Usage
const updatedRecipient = await sdk.rampableRecipient.updateRecipient('recipient_123', {
name: "John Doe",
bank: {
currency: "USD"
}
});
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"
}
ℹ️
When updating a recipient, all required fields must be included in the request, even if you're only updating specific fields.
For more information, see the Rampable Recipients API Documentation (opens in a new tab).