Class StripeError

    • Constructor Summary

      Constructors 
      Constructor Description
      StripeError()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getCharge()
      For card errors, the ID of the failed charge.
      java.lang.String getCode()
      For some errors that could be handled programmatically, a short string indicating the error code reported.
      java.lang.String getDeclineCode()
      For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.
      java.lang.String getDocUrl()
      A URL to more information about the error code reported.
      java.lang.String getMessage()
      A human-readable message providing more details about the error.
      java.lang.String getParam()
      If the error is parameter-specific, the parameter related to the error.
      PaymentIntent getPaymentIntent()
      A PaymentIntent guides you through the process of collecting a payment from your customer.
      PaymentMethod getPaymentMethod()
      PaymentMethod objects represent your customer's payment instruments.
      java.lang.String getPaymentMethodType()
      If the error is specific to the type of payment method, the payment method type that had a problem.
      SetupIntent getSetupIntent()
      A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
      PaymentSource getSource()  
      java.lang.String getType()
      The type of error returned.
      int hashCode()  
      void setCharge​(java.lang.String charge)
      For card errors, the ID of the failed charge.
      void setCode​(java.lang.String code)
      For some errors that could be handled programmatically, a short string indicating the error code reported.
      void setDeclineCode​(java.lang.String declineCode)
      For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.
      void setDocUrl​(java.lang.String docUrl)
      A URL to more information about the error code reported.
      void setMessage​(java.lang.String message)
      A human-readable message providing more details about the error.
      void setParam​(java.lang.String param)
      If the error is parameter-specific, the parameter related to the error.
      void setPaymentIntent​(PaymentIntent paymentIntent)
      A PaymentIntent guides you through the process of collecting a payment from your customer.
      void setPaymentMethod​(PaymentMethod paymentMethod)
      PaymentMethod objects represent your customer's payment instruments.
      void setPaymentMethodType​(java.lang.String paymentMethodType)
      If the error is specific to the type of payment method, the payment method type that had a problem.
      void setSetupIntent​(SetupIntent setupIntent)
      A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
      void setSource​(PaymentSource source)  
      void setType​(java.lang.String type)
      The type of error returned.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StripeError

        public StripeError()
    • Method Detail

      • getCharge

        public java.lang.String getCharge()
        For card errors, the ID of the failed charge.
      • getCode

        public java.lang.String getCode()
        For some errors that could be handled programmatically, a short string indicating the error code reported.
      • getDeclineCode

        public java.lang.String getDeclineCode()
        For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.
      • getDocUrl

        public java.lang.String getDocUrl()
        A URL to more information about the error code reported.
      • getMessage

        public java.lang.String getMessage()
        A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
      • getParam

        public java.lang.String getParam()
        If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
      • getPaymentIntent

        public PaymentIntent getPaymentIntent()
        A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.

        A PaymentIntent transitions through multiple statuses throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge.

        Related guide: Payment Intents API.

      • getPaymentMethod

        public PaymentMethod getPaymentMethod()
        PaymentMethod objects represent your customer's payment instruments. They can be used with PaymentIntents to collect payments or saved to Customer objects to store instrument details for future payments.

        Related guides: Payment Methods and More Payment Scenarios.

      • getPaymentMethodType

        public java.lang.String getPaymentMethodType()
        If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
      • getSetupIntent

        public SetupIntent getSetupIntent()
        A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. Later, you can use PaymentIntents to drive the payment flow.

        Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. The SetupIntent then transitions through multiple statuses as it guides you through the setup process.

        Successful SetupIntents result in payment credentials that are optimized for future payments. For example, cardholders in certain regions may need to be run through Strong Customer Authentication at the time of payment method collection in order to streamline later off-session payments. If the SetupIntent is used with a Customer, upon success, it will automatically attach the resulting payment method to that Customer. We recommend using SetupIntents or setup_future_usage on PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.

        By using SetupIntents, you ensure that your customers experience the minimum set of required friction, even as regulations change over time.

        Related guide: Setup Intents API.

      • getType

        public java.lang.String getType()
        The type of error returned. One of api_error, card_error, idempotency_error, or invalid_request_error
      • setCharge

        public void setCharge​(java.lang.String charge)
        For card errors, the ID of the failed charge.
      • setCode

        public void setCode​(java.lang.String code)
        For some errors that could be handled programmatically, a short string indicating the error code reported.
      • setDeclineCode

        public void setDeclineCode​(java.lang.String declineCode)
        For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.
      • setDocUrl

        public void setDocUrl​(java.lang.String docUrl)
        A URL to more information about the error code reported.
      • setMessage

        public void setMessage​(java.lang.String message)
        A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
      • setParam

        public void setParam​(java.lang.String param)
        If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
      • setPaymentIntent

        public void setPaymentIntent​(PaymentIntent paymentIntent)
        A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.

        A PaymentIntent transitions through multiple statuses throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge.

        Related guide: Payment Intents API.

      • setPaymentMethod

        public void setPaymentMethod​(PaymentMethod paymentMethod)
        PaymentMethod objects represent your customer's payment instruments. They can be used with PaymentIntents to collect payments or saved to Customer objects to store instrument details for future payments.

        Related guides: Payment Methods and More Payment Scenarios.

      • setPaymentMethodType

        public void setPaymentMethodType​(java.lang.String paymentMethodType)
        If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
      • setSetupIntent

        public void setSetupIntent​(SetupIntent setupIntent)
        A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. Later, you can use PaymentIntents to drive the payment flow.

        Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. The SetupIntent then transitions through multiple statuses as it guides you through the setup process.

        Successful SetupIntents result in payment credentials that are optimized for future payments. For example, cardholders in certain regions may need to be run through Strong Customer Authentication at the time of payment method collection in order to streamline later off-session payments. If the SetupIntent is used with a Customer, upon success, it will automatically attach the resulting payment method to that Customer. We recommend using SetupIntents or setup_future_usage on PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.

        By using SetupIntents, you ensure that your customers experience the minimum set of required friction, even as regulations change over time.

        Related guide: Setup Intents API.

      • setType

        public void setType​(java.lang.String type)
        The type of error returned. One of api_error, card_error, idempotency_error, or invalid_request_error
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object