Skip to content

Merchant Payout (Paybill / Till)

Pay to M-Pesa Paybill numbers and Till numbers in Kenya. Use this for utility bills, rent payments, or any merchant that accepts M-Pesa business payments.

Paybill vs Till

TypebusinessAccountbusinessNumber
PaybillThe Paybill number (e.g., "888880")The account number (e.g., "12345678")
TillThe Till number (e.g., "654321")Set to "N/A" (not used)

Pay a Paybill

typescript
const result = await payd.payouts.merchant({
  username: "my_payd_user",
  amount: 500,
  phoneNumber: "+254700000000",
  narration: "Electricity bill payment",
  businessAccount: "888880",     // Paybill number
  businessNumber: "12345678",    // Account number
  callbackUrl: "https://my-server.com/webhook",
});

console.log(result.transactionReference);

Pay a Till

typescript
const result = await payd.payouts.merchant({
  username: "my_payd_user",
  amount: 200,
  phoneNumber: "+254700000000",
  narration: "Store purchase",
  businessAccount: "654321",     // Till number
  businessNumber: "N/A",         // Not needed for Till
  callbackUrl: "https://my-server.com/webhook",
});

Parameters

ParameterTypeRequiredDescription
usernamestringYes*Your Payd account username
amountnumberYesAmount in KES (must be > 0)
phoneNumberstringYesSender's phone with country code (e.g., +254700000000)
narrationstringYesDescription of the payment
businessAccountstringYesPaybill or Till number
businessNumberstringYesAccount number (Paybill) or "N/A" (Till)
callbackUrlstringYes*Webhook URL for transaction result
walletType"local" | "USD"NoWhich wallet to fund from (default: "local")

*Falls back to client defaults if empty.

Response

typescript
interface MerchantPayoutResponse {
  success: boolean;
  message: string;
  status: string;
  transactionReference: string;
  channel: string;
  amount: number;
  _raw: Record<string, unknown>;
}

Phone Number Format

Unlike Kenya M-Pesa collections/payouts, merchant payouts expect an international format phone number starting with + (e.g., +254700000000).

Released under the MIT License.