Skip to main content

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
amountintegerrequiredAmount to send in the specified currency
currencystringrequiredCurrency code (e.g., TZS)
account_numberstringrequiredRecipient’s bank account number
bicstringrequiredBank Identifier Code (BIC/SWIFT) of the destination bank
beneficiary.full_nameobject.stringrequiredRecipient’s full name as registered with the bank
beneficiary.phone_numberobject.stringoptionalRecipient’s phone number
metadataobjectoptionalArbitrary key-value pairs for your reference,
max of 3 items with length of less than 100 characters each

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": "07XXXXXXXX",
      "full_name": "DEMO RECIPIENT"
    },
    "account_number": "XXXXXXXXXXXX",
    "bic": "NLCBTZTX",
    "metadata": {
      "order_id": "order_001",
      "notes": "Payment for services"
    }
  }'
const response = await fetch('https://pesahub.test/api/v1/payouts/bank/preview', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Accept': 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    amount: 10000,
    currency: 'TZS',
    beneficiary: {
      phone_number: '07XXXXXXXX',
      full_name: 'DEMO RECIPIENT',
    },
    account_number: 'XXXXXXXXXXXX',
    bic: 'NLCBTZTX',
    metadata: {
      order_id: 'order_001',
      notes: 'Payment for services',
    },
  }),
});

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": "07XXXXXXXX",
      "full_name": "DEMO RECIPIENT"
    },
    "account_number": "XXXXXXXXXXXX",
    "bic": "NLCBTZTX",
    "metadata": {
      "order_id": "order_001",
      "notes": "Payment for services"
    }
  }'
const response = await fetch('https://pesahub.test/api/v1/payouts/bank', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Accept': 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    amount: 5000,
    currency: 'TZS',
    beneficiary: {
      phone_number: '07XXXXXXXX',
      full_name: 'DEMO RECIPIENT',
    },
    account_number: 'XXXXXXXXXXXX',
    bic: 'NLCBTZTX',
    metadata: {
      order_id: 'order_001',
      notes: 'Payment for services',
    },
  }),
});

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.