Transfer Recipients Module

This wrapper class facilitates synchronous integration with Paystack Transfer Recipient APIs. The Transfer Recipients API allows you to create and manage beneficiaries that you send money to.


class TransferRecipientsClientAPI(secret_key: str = None)

Paystack Transfer Recipients API Reference: Transfer Recipients

bulk_create_transfer_recipient(batch: List[Dict[str, Any]])→ PayStackResponse

Create multiple transfer recipients in batches.

Parameters:

batch (List[Dict[str, Any]]) – A list of transfer recipient dict keys [ { type, name, account_number, bank_code, currency etc. }]

Returns:

The response from the API

Return type:

PayStackResponse object

create_transfer_recipients(recipient_type: str, recipient_name: str, account_number: str, bank_code: str, description: str | None = None, currency: str | None = None, authorization_code: str | None = None, metadata: Dict[str, Any] | None = None)→ PayStackResponse

Create a transfer recipient

Parameters:
  • recipient_type (str) – The type of transfer recipient:[ nuban | ghipss | mobile_money | basa ]

  • recipient_name (str) – The name of the transfer recipient according to their registration

  • account_number (str) – transfer recipient’s account number. Required for all recipient types except authorization

  • bank_code (str) – transfer recipient’s bank code. Required for all recipient types except authorization

  • description (str, optional)

  • currency (str, optional)

  • authorization_code (str, optional) – transfer recipient’s authorization code from previous transaction

  • metadata (dict, optional)

Returns:

The response from the API

Return type:

PayStackResponse object

delete_transfer_recipient(id_or_code: str)→ PayStackResponse

Delete a transfer recipient

Parameters:

id_or_code (str) – The id or code of the transfer recipient

Returns:

The response from the API

Return type:

PayStackResponse object

fetch_transfer_recipient(id_or_code: str)→ PayStackResponse

Fetch details of a transfer recipient

Parameters:

id_or_code (str) – The id or code of the transfer recipient

Returns:

The response from the API

Return type:

PayStackResponse object

list_transfer_recipients(per_page: int | None = None, page: int | None = None, from_date: date | None = None, to_date: date | None = None)→ PayStackResponse

List of all transfer recipients

Parameters:
  • per_page (int, optional) – The number of records to return per page.

  • page (int, optional) – The page to return.

  • from_date (date, optional) – The customer’s from date.

  • to_date (date, optional) – The customer’s to date.

Returns:

The response from the API

Return type:

PayStackResponse object

update_transfer_recipient(id_or_code: str, recipient_name: str, recipient_email: str | None = None)→ PayStackResponse

Update a transfer recipient

Parameters:
  • id_or_code (str)

  • recipient_name (str)

  • recipient_email (str)

Returns:

The response from the API

Return type:

PayStackResponse object