M-Pesa icon

M-Pesa

Consume M-Pesa Daraja 3.0 APIs

Actions12

Account → Reversal

AI-generated

Summary

Initiate a reversal request to cancel a completed M-Pesa transaction by providing transaction details and receiving asynchronous result notifications.

Inputs

  • Initiator Name (required) — The username of the API operator as set on the M-Pesa portal.
  • Transaction ID (required) — The M-Pesa transaction ID to reverse.
  • Amount (required) — The amount to reverse.
  • Receiver Party (required) — The shortcode receiving the reversed amount.
  • Receiver Identifier Type (required) — Type of identifier for the receiver party (Shortcode, MSISDN, or Till Number).
  • Remarks (required) — Comments sent along with the transaction.
  • Queue Timeout URL (required) — URL to receive notification if the reversal request times out.
  • Result URL (required) — URL to receive the transaction result callback.
  • Occasion — Optional additional information about the reversal.

Output shape

a single JSON object containing the API response to the reversal request

Requires valid M-Pesa API credentials including a security credential. The operation sends a POST request to M-Pesa's /mpesa/reversal/v1/request endpoint and returns the API's response. Result and timeout notifications are delivered asynchronously to the specified URLs.

Links

Discussion