Async Transfers Module

This wrapper class facilitates asynchronous integration with Paystack Transfers APIs. The Transfers API allows you to automate sending money to your customers.


class AsyncTransfersClientAPI(secret_key: str = None)

Paystack Transfers API Reference: Transfers

async fetch_transfer(id_or_code: str)→ PayStackResponse

Get details of a transfer

Parameters:

id_or_code (str) – The transfer id or code

Returns:

The response from the API

Return type:

PayStackResponse object

async finalize_transfer(transfer_code: str, otp: str)→ PayStackResponse

Finalize an initiated transfer

Parameters:
  • transfer_code (str) – The code of the transfer to finalize

  • otp (str) – The OTP sent to the business phone to verify transfer

Returns:

The response from the API

Return type:

PayStackResponse object

async initiate_bulk_transfer(transfer_source: str, transfers: List[Dict[str, str]])→ PayStackResponse

Batch multiple transfers in a single request

Parameters:
  • transfer_source (str) – Where should we transfer from? Only balance for now

  • transfers (List[Dict[str, str]]) – A list of transfer objects keys [ { amount | recipient | reference | reason } ]

Returns:

The response from the API

Return type:

PayStackResponse object

async initiate_transfer(transfer_source: str, amount: int, transfer_recipient: str, reason: str | None = None, currency: str | None = None, reference: str | None = None)→ PayStackResponse

Initiate a transfer. Upgrade your business to a Registered Business to use

Parameters:
  • transfer_source (str) – Where should we transfer from? Only balance for now

  • amount (int) – Amount to transfer in kobo if currency is NGN and pesewas if currency is GHS.

  • transfer_recipient (str) – The code of the recipient

  • reason (str, optional) – The reason for the transfer

  • currency (str, optional) – The currency of the transfer

  • reference (str, optional) – The reference for the transfer

Returns:

The response from the API

Return type:

PayStackResponse object

async list_transfers(per_page: int | None = None, page: int | None = None, customer_id: str | None = None, from_date: date | None = None, to_date: date | None = None)→ PayStackResponse

List transfers

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

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

  • customer_id (str, optional) – The id of the customer

  • from_date (date, optional) – The date from which to list transfers

  • to_date (date, optional) – The date until which to list transfers

Returns:

The response from the API

Return type:

PayStackResponse object

async verify_transfer(reference: str)→ PayStackResponse

Verify a transfer

Parameters:

reference – The reference of the transfer to verify

Returns:

The response from the API

Return type:

PayStackResponse object