Class MpesaApiException

All Implemented Interfaces:
Serializable

public class MpesaApiException extends MpesaException
Thrown when the M-Pesa API returns a non-successful HTTP response (e.g., 4xx or 5xx). This exception provides access to the HTTP status code and the raw response body, which is crucial for debugging API-level errors like malformed requests.
See Also:
  • Constructor Details

    • MpesaApiException

      public MpesaApiException(String message, int statusCode, String responseBody)
  • Method Details

    • getStatusCode

      public int getStatusCode()
    • getResponseBody

      public String getResponseBody()