Skip to main content
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.
async create(input: RecipientCreateInput): Promise<RecipientCreateResponse>
type
'nuban' | 'ghipss' | 'mobile_money'
required
The type of recipient
name
string
required
A name for the recipient
account_number
string
required
The recipient’s account number
bank_code
string
required
The recipient’s bank code
description
string
A description for the recipient
currency
'NGN' | 'USD' | 'GHS' | 'ZAR' | 'KES' | 'XOF'
Currency for the recipient (defaults to NGN)
authorization_code
string
Authorization code for the recipient
metadata
any
Additional metadata for the recipient
data
object
active
boolean
Whether the recipient is active
recipient_code
string
The unique recipient code starting with RCP_
currency
string
The recipient’s currency
type
string
The recipient type (nuban, ghipss, or mobile_money)
details
object
account_number
string
The account number
account_name
string
The resolved account name
bank_code
string
The bank code
bank_name
string
The bank name
Example:
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.
async createBulk(input: RecipientBulkCreateInput): Promise<RecipientBulkCreateResponse>
batch
array
required
Array of recipient objects, each containing the same fields as the create method
data
object
success
array
Array of successfully created recipients
errors
array
Array of errors for recipients that failed to create
Example:
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.
async list(input: GenericInput): Promise<RecipientListResponse>
perPage
number
Number of records per page (1-100, defaults to 50)
page
number
Page number (defaults to 1)
from
string
ISO datetime to filter from
to
string
ISO datetime to filter to
data
array
Array of recipient objects
domain
string
The domain
type
string
The recipient type
currency
string
The currency
name
string
The recipient name
recipient_code
string
The unique recipient code
active
boolean
Whether the recipient is active
meta
object
Pagination metadata including total, page, perPage, and pageCount
Example:
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.
async getRecipientById(id_or_code: string): Promise<RecipientSingleResponse>
id_or_code
string
required
The ID or code of the recipient
data
object
integration
number
The integration ID
domain
string
The domain
type
string
The recipient type
currency
string
The currency
name
string
The recipient name
recipient_code
string
The unique recipient code
description
string | null
The recipient description
active
boolean
Whether the recipient is active
email
string | null
The recipient email
details
object
Bank details including account_number, account_name, bank_code, and bank_name
Example:
const { data, error } = await paystack.recipient.getRecipientById("RCP_abc123");

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

update

Updates a transfer recipient.
async update(input: RecipientUpdateInput): Promise<GenericResponse>
id_or_code
string
required
The ID or code of the recipient to update
name
string
required
The new name for the recipient
email
string
The new email for the recipient
Example:
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.
async delete(id_or_code: string): Promise<GenericResponse>
id_or_code
string
required
The ID or code of the recipient to delete
Example:
const { data, error } = await paystack.recipient.delete("RCP_abc123");

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