M-Pesa icon

M-Pesa

Consume M-Pesa Daraja 3.0 APIs

Actions12

STK Push → Query Status

AI-generated

Summary

Query the status of an existing STK Push transaction using the Business Short Code and the Checkout Request ID received from the initiate operation.

Inputs

  • Business Short Code (required) — The organization shortcode associated with the STK Push transaction.
  • Checkout Request ID (required) — The unique Checkout Request ID returned from the corresponding initiate STK Push request.

Output shape

a single JSON object containing the status details of the queried STK Push transaction.

The status response is returned directly from the M-Pesa STK Push query API. Errors related to missing credentials or request failures produce exception outputs unless the node is set to continue on fail, in which case error information is returned within the JSON output.

Examples

Example 1: Check the status of a previously initiated STK Push transaction to confirm if payment was successful or pending.

Set resource to STK Push, operation to Query Status, and provide the exact Business Short Code and Checkout Request ID from the initiate response.

Links

Discussion