Class ApiException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuthorizationException, DeclinedTransactionException, IdempotenceException, PlatformException, ReferenceException, ValidationException

public class ApiException extends RuntimeException
Represents an error response from the payment platform which contains an ID and a list of errors.
See Also:
  • Constructor Details

  • Method Details

    • getStatusCode

      public int getStatusCode()
      Returns:
      The HTTP status code that was returned by the Payment platform.
    • getResponseBody

      public String getResponseBody()
      Returns:
      The raw response body that was returned by the Payment platform.
    • getErrorId

      public String getErrorId()
      Returns:
      The errorId received from the Payment platform if available.
    • getErrors

      public List<APIError> getErrors()
      Returns:
      The errors received from the Payment platform if available. Never null.
    • toString

      public String toString()
      Overrides:
      toString in class Throwable