Class: Stripe::SetupAttempt::SetupError
- Inherits:
-
Stripe::StripeObject
- Object
- Stripe::StripeObject
- Stripe::SetupAttempt::SetupError
- Defined in:
- lib/stripe/resources/setup_attempt.rb
Constant Summary
Constants inherited from Stripe::StripeObject
Stripe::StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#advice_code ⇒ Object
readonly
For card errors resulting from a card issuer decline, a short string indicating how to proceed with an error if they provide one.
-
#charge ⇒ Object
readonly
For card errors, the ID of the failed charge.
-
#code ⇒ Object
readonly
For some errors that could be handled programmatically, a short string indicating the error code reported.
-
#decline_code ⇒ Object
readonly
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.
-
#doc_url ⇒ Object
readonly
A URL to more information about the error code reported.
-
#message ⇒ Object
readonly
A human-readable message providing more details about the error.
-
#network_advice_code ⇒ Object
readonly
For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
-
#network_decline_code ⇒ Object
readonly
For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
-
#param ⇒ Object
readonly
If the error is parameter-specific, the parameter related to the error.
-
#payment_intent ⇒ Object
readonly
A PaymentIntent guides you through the process of collecting a payment from your customer.
-
#payment_method ⇒ Object
readonly
PaymentMethod objects represent your customer's payment instruments.
-
#payment_method_type ⇒ Object
readonly
If the error is specific to the type of payment method, the payment method type that had a problem.
-
#request_log_url ⇒ Object
readonly
A URL to the request log entry in your dashboard.
-
#setup_intent ⇒ Object
readonly
A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
-
#source ⇒ Object
readonly
Attribute for field source.
-
#type ⇒ Object
readonly
The type of error returned.
Attributes inherited from Stripe::StripeObject
Class Method Summary collapse
Methods inherited from Stripe::StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#advice_code ⇒ Object (readonly)
For card errors resulting from a card issuer decline, a short string indicating how to proceed with an error if they provide one.
530 531 532 |
# File 'lib/stripe/resources/setup_attempt.rb', line 530 def advice_code @advice_code end |
#charge ⇒ Object (readonly)
For card errors, the ID of the failed charge.
532 533 534 |
# File 'lib/stripe/resources/setup_attempt.rb', line 532 def charge @charge end |
#code ⇒ Object (readonly)
For some errors that could be handled programmatically, a short string indicating the error code reported.
534 535 536 |
# File 'lib/stripe/resources/setup_attempt.rb', line 534 def code @code end |
#decline_code ⇒ Object (readonly)
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.
536 537 538 |
# File 'lib/stripe/resources/setup_attempt.rb', line 536 def decline_code @decline_code end |
#doc_url ⇒ Object (readonly)
A URL to more information about the error code reported.
538 539 540 |
# File 'lib/stripe/resources/setup_attempt.rb', line 538 def doc_url @doc_url end |
#message ⇒ Object (readonly)
A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
540 541 542 |
# File 'lib/stripe/resources/setup_attempt.rb', line 540 def @message end |
#network_advice_code ⇒ Object (readonly)
For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
542 543 544 |
# File 'lib/stripe/resources/setup_attempt.rb', line 542 def network_advice_code @network_advice_code end |
#network_decline_code ⇒ Object (readonly)
For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
544 545 546 |
# File 'lib/stripe/resources/setup_attempt.rb', line 544 def network_decline_code @network_decline_code end |
#param ⇒ Object (readonly)
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.
546 547 548 |
# File 'lib/stripe/resources/setup_attempt.rb', line 546 def param @param end |
#payment_intent ⇒ Object (readonly)
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
558 559 560 |
# File 'lib/stripe/resources/setup_attempt.rb', line 558 def payment_intent @payment_intent end |
#payment_method ⇒ Object (readonly)
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.
564 565 566 |
# File 'lib/stripe/resources/setup_attempt.rb', line 564 def payment_method @payment_method end |
#payment_method_type ⇒ Object (readonly)
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.
566 567 568 |
# File 'lib/stripe/resources/setup_attempt.rb', line 566 def payment_method_type @payment_method_type end |
#request_log_url ⇒ Object (readonly)
A URL to the request log entry in your dashboard.
568 569 570 |
# File 'lib/stripe/resources/setup_attempt.rb', line 568 def request_log_url @request_log_url end |
#setup_intent ⇒ Object (readonly)
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
590 591 592 |
# File 'lib/stripe/resources/setup_attempt.rb', line 590 def setup_intent @setup_intent end |
#source ⇒ Object (readonly)
Attribute for field source
592 593 594 |
# File 'lib/stripe/resources/setup_attempt.rb', line 592 def source @source end |
#type ⇒ Object (readonly)
The type of error returned. One of api_error, card_error, idempotency_error, or invalid_request_error
594 595 596 |
# File 'lib/stripe/resources/setup_attempt.rb', line 594 def type @type end |
Class Method Details
.field_remappings ⇒ Object
600 601 602 |
# File 'lib/stripe/resources/setup_attempt.rb', line 600 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
596 597 598 |
# File 'lib/stripe/resources/setup_attempt.rb', line 596 def self.inner_class_types @inner_class_types = {} end |