BluePayAPI
Ask AI
BluePay
API Keys Support Dashboard

Payouts and SMS

B2C pays a customer from your B2C wallet. The SMS API texts a Safaricom number.

Payouts and SMS

Both use the same three auth fields as STK. Call them from your server.

B2C payouts

  • A payout sends KES to a customer phone from your B2C wallet. The platform fee is charged in service tokens.
  • POST the payout with the phone, amount, and an optional callbackUrl (or callback_url). That URL is used for this payout. Otherwise BluePay uses the Account callback URL.
  • The terminal result is mpesa.b2c.success or mpesa.b2c.failed. You can also GET payout status and wallet balance. Put api_secret, account_id, and channel_id on the query string.
  • Amount limits and fee bands are on B2C payouts and on Pricing.

SMS API

  • POST one message to a Safaricom number. BluePay sends it from the BluePay sender ID.
  • Send a unique reference on each message so a retry does not send a second SMS.
  • The API fee is a flat charge per message, separate from the payment-notification SMS on Account.
Account → Payment notifications texts your phone when a customer pays. The SMS API is how your server texts a customer.

Request fields are on SMS API and B2C payouts.