Skip to content

Latest commit

History

History
614 lines (412 loc) · 16 KB

File metadata and controls

614 lines (412 loc) · 16 KB

paystack.Transfer

All URIs are relative to https://api.paystack.co

MethodHTTP requestDescription
bulkPOST /transfer/bulkInitiate Bulk Transfer
disable_otpPOST /transfer/disable_otpDisable OTP requirement for Transfers
disable_otp_finalizePOST /transfer/disable_otp_finalizeFinalize Disabling of OTP requirement for Transfers
downloadGET /transfer/exportExport Transfers
enable_otpPOST /transfer/enable_otpEnable OTP requirement for Transfers
fetchGET /transfer/{code}Fetch Transfer
finalizePOST /transfer/finalize_transferFinalize Transfer
initiatePOST /transferInitiate Transfer
listGET /transferList Transfers
resend_otpPOST /transfer/resend_otpResend OTP for Transfer
verifyGET /transfer/verify/{reference}Verify Transfer

bulk

Response bulk(source=source, transfers=transfers)

Initiate Bulk Transfer

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'# Initiate Bulk Transferresponse=paystack.Transfer.bulk(
)
pprint(response)

Parameters

NameTypeDescriptionNotes
sourcestrWhere should we transfer from? Only balance is allowed for now[optional]
transferslist[TransferInitiate]A list of transfer object. Each object should contain amount, recipient, and reference[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

disable_otp

Response disable_otp()

Disable OTP requirement for Transfers

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'# Disable OTP requirement for Transfersresponse=paystack.Transfer.disable_otp()
pprint(response)

Parameters

This endpoint does not need any parameter.

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

disable_otp_finalize

Response disable_otp_finalize(otp)

Finalize Disabling of OTP requirement for Transfers

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'otp='otp_example'# str | OTP sent to business phone to verify disabling OTP requirement# Finalize Disabling of OTP requirement for Transfersresponse=paystack.Transfer.disable_otp_finalize(
otp,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
otpstrOTP sent to business phone to verify disabling OTP requirement

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

download

Response download(per_page=per_page, page=page, status=status, _from=_from, to=to)

Export Transfers

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'# Export Transfersresponse=paystack.Transfer.download(
)
pprint(response)

Parameters

NameTypeDescriptionNotes
per_pageintNumber of records to fetch per page[optional]
pageintThe section to retrieve[optional]
statusstr[optional]
_fromdatetimeThe start date[optional]
todatetimeThe end date[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
404Entity not found-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

enable_otp

Response enable_otp()

Enable OTP requirement for Transfers

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'# Enable OTP requirement for Transfersresponse=paystack.Transfer.enable_otp()
pprint(response)

Parameters

This endpoint does not need any parameter.

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

fetch

Response fetch(code)

Fetch Transfer

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'code='code_example'# str | Transfer code# Fetch Transferresponse=paystack.Transfer.fetch(
code,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
codestrTransfer code

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
404Entity not found-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

finalize

Response finalize(transfer_code, otp)

Finalize Transfer

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'transfer_code='transfer_code_example'# str | The transfer code you want to finalizeotp='otp_example'# str | OTP sent to business phone to verify transfer# Finalize Transferresponse=paystack.Transfer.finalize(
transfer_code,
otp,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
transfer_codestrThe transfer code you want to finalize
otpstrOTP sent to business phone to verify transfer

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

initiate

Response initiate(source, amount, recipient, reason=reason, currency=currency, reference=reference)

Initiate Transfer

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'source='source_example'# str | Where should we transfer from? Only balance is allowed for nowamount='amount_example'# str | Amount to transfer in kobo if currency is NGN and pesewas if currency is GHS.recipient='recipient_example'# str | The transfer recipient's code# Initiate Transferresponse=paystack.Transfer.initiate(
source,
amount,
recipient,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
sourcestrWhere should we transfer from? Only balance is allowed for now
amountstrAmount to transfer in kobo if currency is NGN and pesewas if currency is GHS.
recipientstrThe transfer recipient's code
reasonstrThe reason or narration for the transfer.[optional]
currencystrSpecify the currency of the transfer. Defaults to NGN.[optional]
referencestrIf specified, the field should be a unique identifier (in lowercase) for the object. Only -,_ and alphanumeric characters are allowed.[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

list

Response list(per_page=per_page, page=page, status=status, _from=_from, to=to)

List Transfers

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'# List Transfersresponse=paystack.Transfer.list(
)
pprint(response)

Parameters

NameTypeDescriptionNotes
per_pageintNumber of records to fetch per page[optional]
pageintThe section to retrieve[optional]
statusstr[optional]
_fromdatetimeThe start date[optional]
todatetimeThe end date[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
404Entity not found-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

resend_otp

Response resend_otp(transfer_code, reason)

Resend OTP for Transfer

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'transfer_code='transfer_code_example'# str | The transfer code that requires an OTP validationreason='reason_example'# str | Either resend_otp or transfer# Resend OTP for Transferresponse=paystack.Transfer.resend_otp(
transfer_code,
reason,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
transfer_codestrThe transfer code that requires an OTP validation
reasonstrEither resend_otp or transfer

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

verify

Response verify(reference)

Verify Transfer

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'reference='reference_example'# str | # Verify Transferresponse=paystack.Transfer.verify(
reference,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
referencestr

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
404Entity not found-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]