Sign in

Payments

PesaLink

View as Markdown

In a nutshell

Instant bank-to-bank transfers for customers in Kenya via the PesaLink network.

PesaLink is an instant payment channel that lets customers pay directly from their bank account. Each transaction is completed using a temporary account number and reference generated by Paystack. Only KES is supported on PesaLink

Availability

PesaLink is available to registered Kenyan businesses. Contact [email protected] to enable this channel on your account.

Copy linkHow the channel works

  1. Create a Charge with the customer email, amount, and a bank_transfer object.
  2. Paystack returns a temporary account_number and a transaction_reference.
  3. You display both values to the customer. They use the account number as the destination and the transaction reference as the narration in their bank transfer.
  4. The customer makes the transfer from their internet or mobile banking app.
  5. Paystack sends a charge.success webhook event when the transfer is matched.

POSTapi.paystack.co/charge

curl https://api.paystack.co/charge \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "amount": 50000,
    "currency": "KES",
    "bank_transfer": {
      "account_expires_at": "2024-06-01T12:15:00Z"
    }
  }'
const response = await fetch('https://api.paystack.co/charge', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_SECRET_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: '[email protected]',
    amount: 50000,
    currency: 'KES',
    bank_transfer: {
      account_expires_at: '2024-06-01T12:15:00Z'
    }
  })
})

const data = await response.json()
console.log(data)
FieldDescription
account_expires_atISO 8601 timestamp for account expiry. Must be within 25 minutes from now. Set to null to use the maximum.

Account Validity

The account number is valid for 25 minutes from charge creation. Communicate this timeout clearly at checkout to avoid failed or unmatched transfers.

If the account_expires_at value exceeds 25 minutes, Paystack defaults to 25 minutes.

{
  "status": true,
  "message": "Charge attempted",
  "data": {
    "reference": "kcvu0t3kzs",
    "status": "pending_bank_transfer",
    "display_text": "Please make a transfer to the account specified",
    "account_name": "Paystack Payments Kenya Limited",
    "account_number": "1234567891",
    "bank": {
      "slug": "dtbk-bank",
      "name": "Diamond Trust Bank Kenya Ltd",
      "id": 225
    },
    "account_expires_at": "2025-04-24T16:55:57.954Z",
    "amount": 10000,
    "transaction_reference": "1234567"
  }
}

Warning

Always show the transaction_reference to the customer and instruct them to use it as the narration. Paystack uses this to match the incoming transfer to your transaction. Without it, the payment may not reconcile correctly.

Danger

Customers using Diamond Trust Bank (DTB) accounts cannot complete transfers via PesaLink.

Copy linkHandling incorrect amounts

If the customer transfers an incorrect amount, Paystack rejects the payment and sends a bank.transfer.rejected event. A refund is automatically processed. The customer must start a new payment with the correct amount.

Copy linkWebhook events

EventMeaning
charge.successTransfer was received and matched to the transaction
bank.transfer.rejectedIncorrect amount sent. The refund is processed automatically.
{
  "event": "charge.success",
  "data": {
    "status": "success",
    "reference": "your_reference",
    "amount": 50000,
    "currency": "KES",
    "channel": "bank_transfer"
  }
}
Was this page helpful?