M-Pesa icon

M-Pesa

Consume M-Pesa Daraja 3.0 APIs

Actions12

B2C → Payment Request

AI-generated

Summary

Send a Business-to-Customer (B2C) payment request to transfer funds from your organization to a customer's phone number via the M-Pesa API.

Inputs

  • Initiator Name (required) — The username of the API operator as set on the M-Pesa portal.
  • Payment Type (required) — The type of B2C payment to make; options include Salary Payment, Business Payment, or Promotion Payment.
  • Amount (required) — The amount of money to send in the payment request.
  • Sender Shortcode (Party A) (required) — Your organization shortcode initiating the transaction.
  • Receiver (Party B) (required) — The phone number of the customer receiving the payment.
  • Remarks (required) — Comments or notes sent along with the transaction.
  • Queue Timeout URL (required) — A URL where notifications are sent if the payment request times out.
  • Result URL (required) — A URL where the final result of the transaction is sent as a callback.
  • Occasion — Optional additional information about the transaction.

Output shape

a single JSON response object

Returns the response from the M-Pesa B2C payment request API call, usually including status details of the request submission; the workflow receives this as JSON from the M-Pesa API.

Examples

Example 1: Making a B2C payment request

Provide valid Initiator Name, Payment Type, Amount, Party A (sender shortcode), Party B (receiver phone number), Remarks, Queue Timeout URL, and Result URL. Optionally include Occasion.

Links

Discussion