M-Pesa Query Transaction Status icon

M-Pesa Query Transaction Status

Determine the current status of a particular transaction

Overview

This node, named "M-Pesa Query Transaction Status," is designed to query and determine the current status of a specific M-Pesa transaction. It is useful in scenarios where you need to verify whether a payment or transfer has been completed, is pending, or failed. For example, businesses integrating M-Pesa payments can use this node to track transactions by referencing unique identifiers from their systems or M-Pesa's transaction IDs.

Properties

Name Meaning
Third Party Reference Unique reference from the third-party system used for tracking transactions (e.g., order ID)
Query Reference Identifier to query the transaction status; can be a TransactionID, ThirdPartyReference, or ConversationID
Service Provider Code Shortcode of the business account where funds will be credited (usually provided via credentials)

Output

The node outputs JSON data representing the queried transaction status. This typically includes details such as the transaction state, timestamps, amounts, and any relevant metadata returned by the M-Pesa API. The output does not include binary data.

Dependencies

  • Requires an API key credential for authenticating with the M-Pesa API.
  • Needs configuration of base URL and service provider shortcode within the credentials.
  • The node makes HTTP GET requests to the M-Pesa endpoint /ipg/v1x/queryTransactionStatus/.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials may cause authentication failures.
    • Incorrect or non-existent transaction references will result in errors or empty responses.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • Authentication errors usually indicate invalid or expired API keys; verify and update credentials.
    • "Transaction not found" or similar messages suggest the query reference is incorrect; double-check the input values.
    • Timeout or connection errors require checking network access and endpoint availability.

Links and References

  • M-Pesa API Documentation (general reference for M-Pesa APIs)
  • Consult your M-Pesa service provider for specific API endpoint details and credential setup instructions.

Discussion