Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pesahub.co/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Bank Payout API allows you to transfer funds directly to a recipient’s bank account. Use the preview endpoint to see fee breakdowns, initiate to execute the transfer, and list to retrieve past bank payouts.

Preview Bank Payout

Calculate fees and validate recipient details before committing.
POST /v1/payouts/bank/preview

Authentication

Authorization: Bearer {{api_key}}

Request Headers

HeaderValue
Acceptapplication/json
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
amountintegerAmount to send in the specified currency
currencystringCurrency code (e.g., TZS)
account_numberstringRecipient’s bank account number
bicstringBank Identifier Code (BIC/SWIFT) of the destination bank
beneficiaryobjectRecipient details
beneficiary.full_namestringRecipient’s full name as registered with the bank
beneficiary.phone_numberstringRecipient’s phone number
metadataobjectArbitrary key-value pairs for your reference
metadata.order_idinteger/stringYour internal order identifier
metadata.notesstringA note about the payout

Example Request

curl -X POST https://pesahub.test/api/v1/payouts/bank/preview \
  -H "Authorization: Bearer {{api_key}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "currency": "TZS",
    "beneficiary": {
      "phone_number": "0682908805",
      "full_name": "ABDULBASIT RUBEIYYA"
    },
    "account_number": "071168063684",
    "bic": "NLCBTZTX",
    "metadata": {
      "order_id": 123456,
      "notes": "someone wants their money"
    }
  }'

Initiate Bank Payout

Execute the bank transfer.
POST /v1/payouts/bank

Request Body

Same fields as the preview endpoint.

Example Request

curl -X POST https://pesahub.test/api/v1/payouts/bank \
  -H "Authorization: Bearer {{api_key}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000,
    "currency": "TZS",
    "beneficiary": {
      "phone_number": "0682908805",
      "full_name": "ABDULBASIT RUBEIYYA"
    },
    "account_number": "071168063684",
    "bic": "NLCBTZTX",
    "metadata": {
      "order_id": 123456,
      "notes": "someone wants their money"
    }
  }'

List Bank Payouts

Retrieve a list of all bank payouts.
GET /v1/payouts/bank/list

Example Request

cURL
curl -X GET https://pesahub.test/api/v1/payouts/bank/list \
  -H "Authorization: Bearer {{api_key}}" \
  -H "Accept: application/json"
Always run a preview before initiating a bank payout to validate the BIC and account number are correct.