> ## Documentation Index
> Fetch the complete documentation index at: https://paystack-sdk.efobi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipient

> Transfer Recipient API methods for creating and managing transfer recipients

The Recipient class provides methods for interacting with Paystack's Transfer Recipient API. Transfer recipients are used to define the destination for payouts and transfers.

## Overview

The Recipient class allows you to:

* Create single or bulk transfer recipients
* List and retrieve recipient details
* Update recipient information
* Delete recipients

## Methods

### create

Creates a new transfer recipient.

```typescript theme={null}
async create(input: RecipientCreateInput): Promise<RecipientCreateResponse>
```

<ParamField body="type" type="'nuban' | 'ghipss' | 'mobile_money'" required>
  The type of recipient
</ParamField>

<ParamField body="name" type="string" required>
  A name for the recipient
</ParamField>

<ParamField body="account_number" type="string" required>
  The recipient's account number
</ParamField>

<ParamField body="bank_code" type="string" required>
  The recipient's bank code
</ParamField>

<ParamField body="description" type="string">
  A description for the recipient
</ParamField>

<ParamField body="currency" type="'NGN' | 'USD' | 'GHS' | 'ZAR' | 'KES' | 'XOF'">
  Currency for the recipient (defaults to NGN)
</ParamField>

<ParamField body="authorization_code" type="string">
  Authorization code for the recipient
</ParamField>

<ParamField body="metadata" type="any">
  Additional metadata for the recipient
</ParamField>

<ResponseField name="data" type="object">
  <ResponseField name="active" type="boolean">
    Whether the recipient is active
  </ResponseField>

  <ResponseField name="recipient_code" type="string">
    The unique recipient code starting with RCP\_
  </ResponseField>

  <ResponseField name="currency" type="string">
    The recipient's currency
  </ResponseField>

  <ResponseField name="type" type="string">
    The recipient type (nuban, ghipss, or mobile\_money)
  </ResponseField>

  <ResponseField name="details" type="object">
    <ResponseField name="account_number" type="string">
      The account number
    </ResponseField>

    <ResponseField name="account_name" type="string">
      The resolved account name
    </ResponseField>

    <ResponseField name="bank_code" type="string">
      The bank code
    </ResponseField>

    <ResponseField name="bank_name" type="string">
      The bank name
    </ResponseField>
  </ResponseField>
</ResponseField>

**Example:**

```typescript theme={null}
const { data, error } = await paystack.recipient.create({
  type: "nuban",
  name: "John Doe",
  account_number: "0123456789",
  bank_code: "058",
  currency: "NGN"
});

if (data) {
  console.log(data.data.recipient_code);
}
```

***

### createBulk

Creates multiple transfer recipients in bulk.

```typescript theme={null}
async createBulk(input: RecipientBulkCreateInput): Promise<RecipientBulkCreateResponse>
```

<ParamField body="batch" type="array" required>
  Array of recipient objects, each containing the same fields as the `create` method
</ParamField>

<ResponseField name="data" type="object">
  <ResponseField name="success" type="array">
    Array of successfully created recipients
  </ResponseField>

  <ResponseField name="errors" type="array">
    Array of errors for recipients that failed to create
  </ResponseField>
</ResponseField>

**Example:**

```typescript theme={null}
const { data, error } = await paystack.recipient.createBulk({
  batch: [
    {
      type: "nuban",
      name: "John Doe",
      account_number: "0123456789",
      bank_code: "058"
    },
    {
      type: "nuban",
      name: "Jane Smith",
      account_number: "0987654321",
      bank_code: "058"
    }
  ]
});

if (data) {
  console.log(`Created ${data.data.success.length} recipients`);
}
```

***

### list

Lists transfer recipients.

```typescript theme={null}
async list(input: GenericInput): Promise<RecipientListResponse>
```

<ParamField body="perPage" type="number">
  Number of records per page (1-100, defaults to 50)
</ParamField>

<ParamField body="page" type="number">
  Page number (defaults to 1)
</ParamField>

<ParamField body="from" type="string">
  ISO datetime to filter from
</ParamField>

<ParamField body="to" type="string">
  ISO datetime to filter to
</ParamField>

<ResponseField name="data" type="array">
  Array of recipient objects

  <ResponseField name="domain" type="string">
    The domain
  </ResponseField>

  <ResponseField name="type" type="string">
    The recipient type
  </ResponseField>

  <ResponseField name="currency" type="string">
    The currency
  </ResponseField>

  <ResponseField name="name" type="string">
    The recipient name
  </ResponseField>

  <ResponseField name="recipient_code" type="string">
    The unique recipient code
  </ResponseField>

  <ResponseField name="active" type="boolean">
    Whether the recipient is active
  </ResponseField>
</ResponseField>

<ResponseField name="meta" type="object">
  Pagination metadata including total, page, perPage, and pageCount
</ResponseField>

**Example:**

```typescript theme={null}
const { data, error } = await paystack.recipient.list({
  perPage: 20,
  page: 1
});

if (data) {
  console.log(`Total recipients: ${data.meta?.total}`);
}
```

***

### getRecipientById

Retrieves a single transfer recipient by ID or code.

```typescript theme={null}
async getRecipientById(id_or_code: string): Promise<RecipientSingleResponse>
```

<ParamField path="id_or_code" type="string" required>
  The ID or code of the recipient
</ParamField>

<ResponseField name="data" type="object">
  <ResponseField name="integration" type="number">
    The integration ID
  </ResponseField>

  <ResponseField name="domain" type="string">
    The domain
  </ResponseField>

  <ResponseField name="type" type="string">
    The recipient type
  </ResponseField>

  <ResponseField name="currency" type="string">
    The currency
  </ResponseField>

  <ResponseField name="name" type="string">
    The recipient name
  </ResponseField>

  <ResponseField name="recipient_code" type="string">
    The unique recipient code
  </ResponseField>

  <ResponseField name="description" type="string | null">
    The recipient description
  </ResponseField>

  <ResponseField name="active" type="boolean">
    Whether the recipient is active
  </ResponseField>

  <ResponseField name="email" type="string | null">
    The recipient email
  </ResponseField>

  <ResponseField name="details" type="object">
    Bank details including account\_number, account\_name, bank\_code, and bank\_name
  </ResponseField>
</ResponseField>

**Example:**

```typescript theme={null}
const { data, error } = await paystack.recipient.getRecipientById("RCP_abc123");

if (data) {
  console.log(data.data.name);
}
```

***

### update

Updates a transfer recipient.

```typescript theme={null}
async update(input: RecipientUpdateInput): Promise<GenericResponse>
```

<ParamField body="id_or_code" type="string" required>
  The ID or code of the recipient to update
</ParamField>

<ParamField body="name" type="string" required>
  The new name for the recipient
</ParamField>

<ParamField body="email" type="string">
  The new email for the recipient
</ParamField>

**Example:**

```typescript theme={null}
const { data, error } = await paystack.recipient.update({
  id_or_code: "RCP_abc123",
  name: "John Updated",
  email: "john@example.com"
});

if (data) {
  console.log(data.message);
}
```

***

### delete

Deletes a transfer recipient.

```typescript theme={null}
async delete(id_or_code: string): Promise<GenericResponse>
```

<ParamField path="id_or_code" type="string" required>
  The ID or code of the recipient to delete
</ParamField>

**Example:**

```typescript theme={null}
const { data, error } = await paystack.recipient.delete("RCP_abc123");

if (data) {
  console.log(data.message);
}
```

## Related Resources

* [Transfer Guide](/guides/transfers)
* [Transfer API Reference](/api-reference/transfer)
