Embedded Wallets
SDK
Javascript
How to
Recipients
Update Recipient

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 update
  • body: 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 recipient
  • email: string - The recipient email address
  • address: string - The address of recipient
  • city: string - The city of recipient
  • postCode: string - The post code of recipient
  • bank: object - The bank account information containing:
    • accountName: string - The name of the bank account holder

Optional Fields

  • reference: string - Additional reference information
  • recipientType: string - The type of recipient (Individual or Business)
  • organizationId: string - Unique identifier for the organization
  • bank: object - Additional bank details:
    • currency: string - The currency of the bank account
    • country: string - The country of the bank account
    • bankName: string - The name of the bank
    • accountNumber: string - The bank account number
    • paymentCode: string - The payment code
    • achNumber: string - The ACH number
    • fedwireNumber: string - The Fedwire number
    • ibanNumber: string - The IBAN number
    • accountType: 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).