Class StripeError

java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.StripeError
All Implemented Interfaces:
StripeObjectInterface

public class StripeError extends StripeObject
  • Constructor Details

    • StripeError

      public StripeError()
  • Method Details

    • getCharge

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

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

      One of account_closed, account_country_invalid_address, account_error_country_change_requires_additional_steps, account_information_mismatch, account_invalid, account_number_invalid, acss_debit_session_incomplete, alipay_upgrade_required, amount_too_large, amount_too_small, api_key_expired, application_fees_not_allowed, authentication_required, balance_insufficient, balance_invalid_parameter, bank_account_bad_routing_numbers, bank_account_declined, bank_account_exists, bank_account_restricted, bank_account_unusable, bank_account_unverified, bank_account_verification_failed, billing_invalid_mandate, bitcoin_upgrade_required, capture_charge_authorization_expired, capture_unauthorized_payment, card_decline_rate_limit_exceeded, card_declined, cardholder_phone_number_required, charge_already_captured, charge_already_refunded, charge_disputed, charge_exceeds_source_limit, charge_expired_for_capture, charge_invalid_parameter, charge_not_refundable, clearing_code_unsupported, country_code_invalid, country_unsupported, coupon_expired, customer_max_payment_methods, customer_max_subscriptions, customer_tax_location_invalid, debit_not_authorized, email_invalid, expired_card, financial_connections_account_inactive, financial_connections_no_successful_transaction_refresh, idempotency_key_in_use, incorrect_address, incorrect_cvc, incorrect_number, incorrect_zip, instant_payouts_config_disabled, instant_payouts_currency_disabled, instant_payouts_limit_exceeded, instant_payouts_unsupported, insufficient_funds, intent_invalid_state, intent_verification_method_missing, invalid_card_type, invalid_characters, invalid_charge_amount, invalid_cvc, invalid_expiry_month, invalid_expiry_year, invalid_number, invalid_source_usage, invalid_tax_location, invoice_no_customer_line_items, invoice_no_payment_method_types, invoice_no_subscription_line_items, invoice_not_editable, invoice_on_behalf_of_not_editable, invoice_payment_intent_requires_action, invoice_upcoming_none, livemode_mismatch, lock_timeout, missing, no_account, not_allowed_on_standard_account, out_of_inventory, ownership_declaration_not_allowed, parameter_invalid_empty, parameter_invalid_integer, parameter_invalid_string_blank, parameter_invalid_string_empty, parameter_missing, parameter_unknown, parameters_exclusive, payment_intent_action_required, payment_intent_authentication_failure, payment_intent_incompatible_payment_method, payment_intent_invalid_parameter, payment_intent_konbini_rejected_confirmation_number, payment_intent_mandate_invalid, payment_intent_payment_attempt_expired, payment_intent_payment_attempt_failed, payment_intent_unexpected_state, payment_method_bank_account_already_verified, payment_method_bank_account_blocked, payment_method_billing_details_address_missing, payment_method_configuration_failures, payment_method_currency_mismatch, payment_method_customer_decline, payment_method_invalid_parameter, payment_method_invalid_parameter_testmode, payment_method_microdeposit_failed, payment_method_microdeposit_verification_amounts_invalid, payment_method_microdeposit_verification_amounts_mismatch, payment_method_microdeposit_verification_attempts_exceeded, payment_method_microdeposit_verification_descriptor_code_mismatch, payment_method_microdeposit_verification_timeout, payment_method_not_available, payment_method_provider_decline, payment_method_provider_timeout, payment_method_unactivated, payment_method_unexpected_state, payment_method_unsupported_type, payout_reconciliation_not_ready, payouts_limit_exceeded, payouts_not_allowed, platform_account_required, platform_api_key_expired, postal_code_invalid, processing_error, product_inactive, progressive_onboarding_limit_exceeded, rate_limit, refer_to_customer, refund_disputed_payment, resource_already_exists, resource_missing, return_intent_already_processed, routing_number_invalid, secret_key_required, sepa_unsupported_account, setup_attempt_failed, setup_intent_authentication_failure, setup_intent_invalid_parameter, setup_intent_mandate_invalid, setup_intent_setup_attempt_expired, setup_intent_unexpected_state, shipping_calculation_failed, sku_inactive, state_unsupported, status_transition_invalid, stripe_tax_inactive, tax_id_invalid, taxes_calculation_failed, terminal_location_country_unsupported, terminal_reader_busy, terminal_reader_hardware_fault, terminal_reader_offline, terminal_reader_timeout, testmode_charges_only, tls_version_unsupported, token_already_used, token_card_network_invalid, token_in_use, transfer_source_balance_parameters_mismatch, transfers_not_allowed, or url_invalid.

    • getDeclineCode

      public 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 String getDocUrl()
      A URL to more information about the error code reported.
    • getMessage

      public 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 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. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments.

      Related guides: Payment Methods and More Payment Scenarios.

    • getPaymentMethodType

      public 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.
    • getRequestLogUrl

      public String getRequestLogUrl()
      A URL to the request log entry in your dashboard.
    • 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 can 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 when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent 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 might need to be run through Strong Customer Authentication during payment method collection to streamline later off-session payments. If you use the SetupIntent with a Customer, it automatically attaches the resulting payment method to that Customer after successful setup. We recommend using SetupIntents or setup_future_usage on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.

      By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.

      Related guide: Setup Intents API

    • getSource

      public PaymentSource getSource()
    • getType

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

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

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

      One of account_closed, account_country_invalid_address, account_error_country_change_requires_additional_steps, account_information_mismatch, account_invalid, account_number_invalid, acss_debit_session_incomplete, alipay_upgrade_required, amount_too_large, amount_too_small, api_key_expired, application_fees_not_allowed, authentication_required, balance_insufficient, balance_invalid_parameter, bank_account_bad_routing_numbers, bank_account_declined, bank_account_exists, bank_account_restricted, bank_account_unusable, bank_account_unverified, bank_account_verification_failed, billing_invalid_mandate, bitcoin_upgrade_required, capture_charge_authorization_expired, capture_unauthorized_payment, card_decline_rate_limit_exceeded, card_declined, cardholder_phone_number_required, charge_already_captured, charge_already_refunded, charge_disputed, charge_exceeds_source_limit, charge_expired_for_capture, charge_invalid_parameter, charge_not_refundable, clearing_code_unsupported, country_code_invalid, country_unsupported, coupon_expired, customer_max_payment_methods, customer_max_subscriptions, customer_tax_location_invalid, debit_not_authorized, email_invalid, expired_card, financial_connections_account_inactive, financial_connections_no_successful_transaction_refresh, idempotency_key_in_use, incorrect_address, incorrect_cvc, incorrect_number, incorrect_zip, instant_payouts_config_disabled, instant_payouts_currency_disabled, instant_payouts_limit_exceeded, instant_payouts_unsupported, insufficient_funds, intent_invalid_state, intent_verification_method_missing, invalid_card_type, invalid_characters, invalid_charge_amount, invalid_cvc, invalid_expiry_month, invalid_expiry_year, invalid_number, invalid_source_usage, invalid_tax_location, invoice_no_customer_line_items, invoice_no_payment_method_types, invoice_no_subscription_line_items, invoice_not_editable, invoice_on_behalf_of_not_editable, invoice_payment_intent_requires_action, invoice_upcoming_none, livemode_mismatch, lock_timeout, missing, no_account, not_allowed_on_standard_account, out_of_inventory, ownership_declaration_not_allowed, parameter_invalid_empty, parameter_invalid_integer, parameter_invalid_string_blank, parameter_invalid_string_empty, parameter_missing, parameter_unknown, parameters_exclusive, payment_intent_action_required, payment_intent_authentication_failure, payment_intent_incompatible_payment_method, payment_intent_invalid_parameter, payment_intent_konbini_rejected_confirmation_number, payment_intent_mandate_invalid, payment_intent_payment_attempt_expired, payment_intent_payment_attempt_failed, payment_intent_unexpected_state, payment_method_bank_account_already_verified, payment_method_bank_account_blocked, payment_method_billing_details_address_missing, payment_method_configuration_failures, payment_method_currency_mismatch, payment_method_customer_decline, payment_method_invalid_parameter, payment_method_invalid_parameter_testmode, payment_method_microdeposit_failed, payment_method_microdeposit_verification_amounts_invalid, payment_method_microdeposit_verification_amounts_mismatch, payment_method_microdeposit_verification_attempts_exceeded, payment_method_microdeposit_verification_descriptor_code_mismatch, payment_method_microdeposit_verification_timeout, payment_method_not_available, payment_method_provider_decline, payment_method_provider_timeout, payment_method_unactivated, payment_method_unexpected_state, payment_method_unsupported_type, payout_reconciliation_not_ready, payouts_limit_exceeded, payouts_not_allowed, platform_account_required, platform_api_key_expired, postal_code_invalid, processing_error, product_inactive, progressive_onboarding_limit_exceeded, rate_limit, refer_to_customer, refund_disputed_payment, resource_already_exists, resource_missing, return_intent_already_processed, routing_number_invalid, secret_key_required, sepa_unsupported_account, setup_attempt_failed, setup_intent_authentication_failure, setup_intent_invalid_parameter, setup_intent_mandate_invalid, setup_intent_setup_attempt_expired, setup_intent_unexpected_state, shipping_calculation_failed, sku_inactive, state_unsupported, status_transition_invalid, stripe_tax_inactive, tax_id_invalid, taxes_calculation_failed, terminal_location_country_unsupported, terminal_reader_busy, terminal_reader_hardware_fault, terminal_reader_offline, terminal_reader_timeout, testmode_charges_only, tls_version_unsupported, token_already_used, token_card_network_invalid, token_in_use, transfer_source_balance_parameters_mismatch, transfers_not_allowed, or url_invalid.

    • setDeclineCode

      public void setDeclineCode(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(String docUrl)
      A URL to more information about the error code reported.
    • setMessage

      public void setMessage(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(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. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments.

      Related guides: Payment Methods and More Payment Scenarios.

    • setPaymentMethodType

      public void setPaymentMethodType(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.
    • setRequestLogUrl

      public void setRequestLogUrl(String requestLogUrl)
      A URL to the request log entry in your dashboard.
    • 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 can 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 when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent 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 might need to be run through Strong Customer Authentication during payment method collection to streamline later off-session payments. If you use the SetupIntent with a Customer, it automatically attaches the resulting payment method to that Customer after successful setup. We recommend using SetupIntents or setup_future_usage on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.

      By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.

      Related guide: Setup Intents API

    • setSource

      public void setSource(PaymentSource source)
    • setType

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object