Class StkStatusQueryResponse

java.lang.Object
io.github.openpaydev.mpesa.core.models.StkStatusQueryResponse

public final class StkStatusQueryResponse extends Object
Represents the response object received when querying the status of an STK Push transaction.

This object contains the results of a transaction status query, indicating whether the transaction was successful, is still pending, or has failed.

  • Method Details

    • builder

    • getResponseCode

      public String getResponseCode()
      The status code of the initial query request itself. A value of "0" indicates that the query request was accepted for processing.
    • getResponseDescription

      public String getResponseDescription()
      A brief description of the status of the query request. Example: "Accepted for processing"
    • getMerchantRequestID

      public String getMerchantRequestID()
      The unique identifier for the transaction that was sent by the merchant. This is the same ID that was used in the initial STK Push request.
    • getCheckoutRequestID

      public String getCheckoutRequestID()
      The unique identifier for the transaction that was generated by the M-Pesa system.
    • getResultCode

      public String getResultCode()
      The status code indicating the final result of the transaction. "0" means the transaction was successful. Any other value indicates a failure or a pending state.
    • getResultDesc

      public String getResultDesc()
      A detailed description of the transaction's final result. Example: "The service request is processed successfully."
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object