Class StkPushResponse.StkPushResponseBuilder

java.lang.Object
io.github.openpaydev.mpesa.core.models.StkPushResponse.StkPushResponseBuilder
Enclosing class:
StkPushResponse

public static class StkPushResponse.StkPushResponseBuilder extends Object
  • Method Details

    • merchantRequestID

      public StkPushResponse.StkPushResponseBuilder merchantRequestID(String merchantRequestID)
      A unique identifier for the transaction that was provided by the merchant's system.
      Returns:
      this.
    • checkoutRequestID

      public StkPushResponse.StkPushResponseBuilder checkoutRequestID(String checkoutRequestID)
      A unique identifier for the transaction generated by the M-Pesa system.

      Important: This is the ID you must use to query the status of the transaction later.

      Returns:
      this.
    • responseCode

      public StkPushResponse.StkPushResponseBuilder responseCode(String responseCode)
      The status code of the request. A value of "0" indicates that the request was successfully received and is being processed. Any other value indicates an error with the initial request.
      Returns:
      this.
    • responseDescription

      public StkPushResponse.StkPushResponseBuilder responseDescription(String responseDescription)
      A brief description of the response code. Example: "Success. Request accepted for processing"
      Returns:
      this.
    • customerMessage

      public StkPushResponse.StkPushResponseBuilder customerMessage(String customerMessage)
      A message that can be displayed to the end-user. Example: "Success. Request accepted for processing"
      Returns:
      this.
    • build

      public StkPushResponse build()
    • toString

      public String toString()
      Overrides:
      toString in class Object