Skip to content

Transfer Recipients

The TransferRecipientResource resource allows you to create and manage beneficiaries for your transfers. Before you can send money to a customer, you must create a transfer recipient with their bank details.

Create Recipient

Create a new transfer recipient.

Method Signature

php
paystack()->transferRecipient()->create(array $payload): array

Parameters

ParameterTypeDescription
typestringRecipient type (e.g., nuban, mobile_money, basa).
namestringName of the recipient.
account_numberstringBank account number.
bank_codestringBank code (or slug for some mobile money).
currencystringCurrency code (e.g., NGN, GHS, ZAR).
descriptionstring(Optional) Description of the recipient.
metadataarray(Optional) Additional data.

Example

php
// Create a NUBAN recipient (Nigeria)
$recipient = paystack()->transferRecipient()->create([
    'type' => 'nuban',
    'name' => 'Stephen Asare',
    'account_number' => '0123456789',
    'bank_code' => '058', // GTBank
    'currency' => 'NGN'
]);

// Create a GHIPSS recipient (Ghana Bank)
$ghanaRecipient = paystack()->transferRecipient()->create([
    'type' => 'ghipss',
    'name' => 'Kwame Nkrumah',
    'account_number' => '0123456789012',
    'bank_code' => '030100', // Standard Chartered Bank Ghana
    'currency' => 'GHS'
]);

Bulk Create Recipients

Create multiple transfer recipients in a single request.

Method Signature

php
paystack()->transferRecipient()->bulkCreate(array $batch): array

Example

php
$recipients = paystack()->transferRecipient()->bulkCreate([
    [
        'type' => 'nuban',
        'name' => 'Employee 1',
        'account_number' => '0123456789',
        'bank_code' => '058',
        'currency' => 'NGN'
    ],
    [
        'type' => 'nuban',
        'name' => 'Employee 2',
        'account_number' => '9876543210',
        'bank_code' => '057',
        'currency' => 'NGN'
    ]
]);

List Recipients

List transfer recipients available on your integration.

Method Signature

php
paystack()->transferRecipient()->list(array $filters = []): array

Example

php
// List all recipients
$allRecipients = paystack()->transferRecipient()->list();

// Filter by page
$pageTwo = paystack()->transferRecipient()->list(['page' => 2, 'perPage' => 20]);

Fetch Recipient

Fetch details of a specific transfer recipient.

Method Signature

php
paystack()->transferRecipient()->fetch(string|int $idOrCode): array

Example

php
$details = paystack()->transferRecipient()->fetch('RCP_wql6bj95bll7m6h');

Update Recipient

Update a transfer recipient's details.

Method Signature

php
paystack()->transferRecipient()->update(string|int $idOrCode, array $payload): array

Example

php
paystack()->transferRecipient()->update('RCP_wql6bj95bll7m6h', [
    'name' => 'Stephen Asare (Updated)',
    'email' => '[email protected]'
]);

Delete Recipient

Delete a transfer recipient (sets the recipient to inactive).

Method Signature

php
paystack()->transferRecipient()->delete(string|int $idOrCode): array

Example

php
paystack()->transferRecipient()->delete('RCP_wql6bj95bll7m6h');

Use Cases

1. Adding a Mobile Money Beneficiary (Ghana)

For mobile money in Ghana, use the mobile_money type and the telco's bank code (e.g., MTN).

php
$momoRecipient = paystack()->transferRecipient()->create([
    'type' => 'mobile_money',
    'name' => 'Abina Nana',
    'account_number' => '0551234987',
    'bank_code' => 'MTN',
    'currency' => 'GHS'
]);

2. Managing Payroll Beneficiaries

You can maintain a local database of employees and sync them with Paystack recipients.

php
// Check if recipient exists locally, if not create on Paystack
if (!$user->recipient_code) {
    $response = paystack()->transferRecipient()->create([
        'type' => 'nuban',
        'name' => $user->name,
        'account_number' => $user->account_number,
        'bank_code' => $user->bank_code,
        'currency' => 'NGN'
    ]);

    $user->update(['recipient_code' => $response['data']['recipient_code']]);
}

Released under the MIT License.