SetupIntent class

auto generated 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 guidesyou 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 throughStrong Customer Authentication during payment method collectionto 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 onPaymentIntents 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

Constructors

SetupIntent()
Instantiates a new SetupIntent and sets the default values.

Properties

additionalData Map<String, Object?>
Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
getter/setter pairoverride
application SetupIntentApplication?
ID of the Connect application that created the SetupIntent.
getter/setter pair
attachToSelf bool?
If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
getter/setter pair
automaticPaymentMethods PaymentFlowsAutomaticPaymentMethodsSetupIntent?
Settings for dynamic payment methods compatible with this Setup Intent
getter/setter pair
cancellationReason SetupIntentCancellationReason?
Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate.
getter/setter pair
clientSecret String?
The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
getter/setter pair
created int?
Time at which the object was created. Measured in seconds since the Unix epoch.
getter/setter pair
customer SetupIntentCustomer?
ID of the Customer this SetupIntent belongs to, if one exists.If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
getter/setter pair
customerAccount String?
ID of the Account this SetupIntent belongs to, if one exists.If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent.
getter/setter pair
description String?
An arbitrary string attached to the object. Often useful for displaying to users.
getter/setter pair
excludedPaymentMethodTypes Iterable<SetupIntentExcludedPaymentMethodTypes>?
Payment method types that are excluded from this SetupIntent.
getter/setter pair
flowDirections Iterable<SetupIntentFlowDirections>?
Indicates the directions of money movement for which this payment method is intended to be used.Include inbound if you intend to use the payment method as the origin to pull funds from. Include outbound if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String?
Unique identifier for the object.
getter/setter pair
lastSetupError ApiErrors?
The error encountered in the previous SetupIntent confirmation.
getter/setter pair
latestAttempt SetupIntentLatestAttempt?
The most recent SetupAttempt for this SetupIntent.
getter/setter pair
livemode bool?
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
getter/setter pair
mandate SetupIntentMandate?
ID of the multi use Mandate generated by the SetupIntent.
getter/setter pair
metadata SetupIntentMetadata?
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
getter/setter pair
nextAction SetupIntentNextAction?
If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
getter/setter pair
object SetupIntentObject?
String representing the object's type. Objects of the same type share the same value.
getter/setter pair
onBehalfOf SetupIntentOnBehalfOf?
The account (if any) for which the setup is intended.
getter/setter pair
paymentMethod SetupIntentPaymentMethod?
ID of the payment method used with this SetupIntent. If the payment method is card_present and isn't a digital wallet, then the generated_card associated with the latest_attempt is attached to the Customer instead.
getter/setter pair
paymentMethodConfigurationDetails PaymentMethodConfigBizPaymentMethodConfigurationDetails?
Information about the payment method configuration used for this Setup Intent.
getter/setter pair
paymentMethodOptions SetupIntentPaymentMethodOptions?
Payment method-specific configuration for this SetupIntent.
getter/setter pair
paymentMethodTypes Iterable<String>?
The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found here.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
singleUseMandate SetupIntentSingleUseMandate?
ID of the single_use Mandate generated by the SetupIntent.
getter/setter pair
status SetupIntentStatus?
Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.
getter/setter pair
usage String?
Indicates how the payment method is intended to be used in the future.Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.
getter/setter pair

Methods

getFieldDeserializers() Map<String, void Function(ParseNode)>
The deserialization information for the current model
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize(SerializationWriter writer) → void
Serializes information the current object writer Serialization writer to use to serialize this model
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

createFromDiscriminatorValue(ParseNode parseNode) SetupIntent
Creates a new instance of the appropriate class based on discriminator value parseNode The parse node to use to read the discriminator value and create the object