SetupIntent constructor
- ApplicationOrId? application,
- bool? attachToSelf,
- PaymentFlowsAutomaticPaymentMethodsSetupIntent? automaticPaymentMethods,
- SetupIntentCancellationReason? cancellationReason,
- String? clientSecret,
- required DateTime created,
- BankAccountCustomerOrId? customer,
- String? description,
- List<
SetupAttemptFlowDirectionsItem> ? flowDirections, - required String id,
- ApiErrors? lastSetupError,
- SetupAttemptOrId? latestAttempt,
- required bool livemode,
- MandateOrId? mandate,
- Map<
String, String> ? metadata, - SetupIntentNextAction? nextAction,
- AccountOrId? onBehalfOf,
- PaymentMethodOrId? paymentMethod,
- PaymentMethodConfigBizPaymentMethodConfigurationDetails? paymentMethodConfigurationDetails,
- SetupIntentPaymentMethodOptions? paymentMethodOptions,
- required List<
String> paymentMethodTypes, - MandateOrId? singleUseMandate,
- required SetupIntentStatus status,
- required String usage,
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](https://stripe.com/docs/api#payment\_intents) 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](https://stripe.com/docs/payments/intents#intent-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](/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup\_intent\_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment\_intent\_object-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](https://stripe.com/docs/payments/setup-intents)
Implementation
const SetupIntent({
this.application,
this.attachToSelf,
this.automaticPaymentMethods,
this.cancellationReason,
this.clientSecret,
required this.created,
this.customer,
this.description,
this.flowDirections,
required this.id,
this.lastSetupError,
this.latestAttempt,
required this.livemode,
this.mandate,
this.metadata,
this.nextAction,
this.onBehalfOf,
this.paymentMethod,
this.paymentMethodConfigurationDetails,
this.paymentMethodOptions,
required this.paymentMethodTypes,
this.singleUseMandate,
required this.status,
required this.usage,
});