Class StripeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.stripe.exception.StripeException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ApiConnectionException, ApiException, AuthenticationException, CardException, EventDataObjectDeserializationException, IdempotencyException, InvalidRequestException, OAuthException, SignatureVerificationException

public abstract class StripeException extends Exception
See Also:
  • Constructor Details

    • StripeException

      protected StripeException(String message, String requestId, String code, Integer statusCode)
    • StripeException

      protected StripeException(String message, String requestId, String code, Integer statusCode, Throwable e)
      Constructs a new Stripe exception with the specified details.
  • Method Details

    • getMessage

      public String getMessage()
      Returns a description of the exception, including the HTTP status code and request ID (if applicable).
      Overrides:
      getMessage in class Throwable
      Returns:
      a string representation of the exception.
    • getUserMessage

      public String getUserMessage()
      Returns a description of the user facing exception
      Returns:
      a string representation of the user facing exception.
    • getStripeError

      public StripeError getStripeError()
      The error resource returned by Stripe's API that caused the exception.
    • getCode

      public String getCode()
    • getRequestId

      public String getRequestId()
    • getStatusCode

      public Integer getStatusCode()
    • setStripeError

      public void setStripeError(StripeError stripeError)
      The error resource returned by Stripe's API that caused the exception.