Class: Stripe::ConfirmationToken
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::ConfirmationToken
- Defined in:
- lib/stripe/resources/confirmation_token.rb
Overview
ConfirmationTokens help transport client side data collected by Stripe JS over to your server for confirming a PaymentIntent or SetupIntent. If the confirmation is successful, values present on the ConfirmationToken are written onto the Intent.
To learn more about how to use ConfirmationToken, visit the related guides:
-
[Finalize payments on the server](stripe.com/docs/payments/finalize-payments-on-the-server)
-
[Build two-step confirmation](stripe.com/docs/payments/build-a-two-step-confirmation).
Defined Under Namespace
Classes: CreateParams, MandateData, PaymentMethodOptions, PaymentMethodPreview, Shipping, TestHelpers
Constant Summary collapse
- OBJECT_NAME =
"confirmation_token"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#expires_at ⇒ Object
readonly
Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#mandate_data ⇒ Object
readonly
Data used for generating a Mandate.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#payment_intent ⇒ Object
readonly
ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
-
#payment_method_options ⇒ Object
readonly
Payment-method-specific configuration for this ConfirmationToken.
-
#payment_method_preview ⇒ Object
readonly
Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
-
#return_url ⇒ Object
readonly
Return URL used to confirm the Intent.
-
#setup_future_usage ⇒ Object
readonly
Indicates that you intend to make future payments with this ConfirmationToken’s payment method.
-
#setup_intent ⇒ Object
readonly
ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
-
#shipping ⇒ Object
readonly
Shipping information collected on this ConfirmationToken.
-
#use_stripe_sdk ⇒ Object
readonly
Indicates whether the Stripe SDK is used to handle confirmation flow.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #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
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
2534 2535 2536 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2534 def created @created end |
#expires_at ⇒ Object (readonly)
Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
2536 2537 2538 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2536 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Unique identifier for the object.
2538 2539 2540 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2538 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
2540 2541 2542 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2540 def livemode @livemode end |
#mandate_data ⇒ Object (readonly)
Data used for generating a Mandate.
2542 2543 2544 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2542 def mandate_data @mandate_data end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
2544 2545 2546 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2544 def object @object end |
#payment_intent ⇒ Object (readonly)
ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
2546 2547 2548 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2546 def payment_intent @payment_intent end |
#payment_method_options ⇒ Object (readonly)
Payment-method-specific configuration for this ConfirmationToken.
2548 2549 2550 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2548 def @payment_method_options end |
#payment_method_preview ⇒ Object (readonly)
Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
2550 2551 2552 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2550 def payment_method_preview @payment_method_preview end |
#return_url ⇒ Object (readonly)
Return URL used to confirm the Intent.
2552 2553 2554 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2552 def return_url @return_url end |
#setup_future_usage ⇒ Object (readonly)
Indicates that you intend to make future payments with this ConfirmationToken’s payment method.
The presence of this property will [attach the payment method](stripe.com/docs/payments/save-during-payment) to the PaymentIntent’s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
2556 2557 2558 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2556 def setup_future_usage @setup_future_usage end |
#setup_intent ⇒ Object (readonly)
ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
2558 2559 2560 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2558 def setup_intent @setup_intent end |
#shipping ⇒ Object (readonly)
Shipping information collected on this ConfirmationToken.
2560 2561 2562 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2560 def shipping @shipping end |
#use_stripe_sdk ⇒ Object (readonly)
Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to ‘true` on ConfirmationToken.
2562 2563 2564 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2562 def use_stripe_sdk @use_stripe_sdk end |
Class Method Details
.field_remappings ⇒ Object
2594 2595 2596 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2594 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
2585 2586 2587 2588 2589 2590 2591 2592 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2585 def self.inner_class_types @inner_class_types = { mandate_data: MandateData, payment_method_options: PaymentMethodOptions, payment_method_preview: PaymentMethodPreview, shipping: Shipping, } end |
.object_name ⇒ Object
14 15 16 |
# File 'lib/stripe/resources/confirmation_token.rb', line 14 def self.object_name "confirmation_token" end |
Instance Method Details
#test_helpers ⇒ Object
2564 2565 2566 |
# File 'lib/stripe/resources/confirmation_token.rb', line 2564 def test_helpers TestHelpers.new(self) end |