CheckoutSession constructor
- CheckoutSessionAfterExpiration? afterExpiration,
- bool? allowPromotionCodes,
- int? amountSubtotal,
- int? amountTotal,
- required PaymentPagesCheckoutSessionAutomaticTax automaticTax,
- CheckoutSessionBillingAddressCollection? billingAddressCollection,
- String? cancelUrl,
- String? clientReferenceId,
- String? clientSecret,
- CheckoutSessionConsent? consent,
- CheckoutSessionConsentCollection? consentCollection,
- required DateTime created,
- String? currency,
- CheckoutSessionCurrencyConversion? currencyConversion,
- required List<
PaymentPagesCheckoutSessionCustomFields> customFields, - required PaymentPagesCheckoutSessionCustomText customText,
- BankAccountCustomerOrId? customer,
- CheckoutSessionCustomerCreation? customerCreation,
- CheckoutSessionCustomerDetails? customerDetails,
- String? customerEmail,
- required DateTime expiresAt,
- required String id,
- InvoiceOrId? invoice,
- CheckoutSessionInvoiceCreation? invoiceCreation,
- CheckoutSessionLineItems? lineItems,
- required bool livemode,
- CheckoutSessionLocale? locale,
- Map<
String, String> ? metadata, - required CheckoutSessionMode mode,
- PaymentIntentOrId? paymentIntent,
- PaymentLinkOrId? paymentLink,
- CheckoutSessionCustomerCreation? paymentMethodCollection,
- CheckoutSessionPaymentMethodConfigurationDetails? paymentMethodConfigurationDetails,
- CheckoutSessionPaymentMethodOptions? paymentMethodOptions,
- required List<
String> paymentMethodTypes, - required CheckoutSessionPaymentStatus paymentStatus,
- PaymentPagesCheckoutSessionPhoneNumberCollection? phoneNumberCollection,
- String? recoveredFrom,
- CheckoutSessionRedirectOnCompletion? redirectOnCompletion,
- String? returnUrl,
- SetupIntentOrId? setupIntent,
- CheckoutSessionShippingAddressCollection? shippingAddressCollection,
- CheckoutSessionShippingCost? shippingCost,
- ChargeShipping? shippingDetails,
- required List<
PaymentPagesCheckoutSessionShippingOption> shippingOptions, - CheckoutSessionStatus? status,
- CheckoutSessionSubmitType? submitType,
- SubscriptionOrId? subscription,
- String? successUrl,
- PaymentPagesCheckoutSessionTaxIdCollection? taxIdCollection,
- CheckoutSessionTotalDetails? totalDetails,
- CheckoutSessionUiMode? uiMode,
- String? url,
Session
A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a new Session each time your customer attempts to pay. Once payment is successful, the Checkout Session will contain a reference to the [Customer](https://stripe.com/docs/api/customers), and either the successful [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active [Subscription](https://stripe.com/docs/api/subscriptions). You can create a Checkout Session on your server and redirect to its URL to begin Checkout. Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)
Implementation
const CheckoutSession({
this.afterExpiration,
this.allowPromotionCodes,
this.amountSubtotal,
this.amountTotal,
required this.automaticTax,
this.billingAddressCollection,
this.cancelUrl,
this.clientReferenceId,
this.clientSecret,
this.consent,
this.consentCollection,
required this.created,
this.currency,
this.currencyConversion,
required this.customFields,
required this.customText,
this.customer,
this.customerCreation,
this.customerDetails,
this.customerEmail,
required this.expiresAt,
required this.id,
this.invoice,
this.invoiceCreation,
this.lineItems,
required this.livemode,
this.locale,
this.metadata,
required this.mode,
this.paymentIntent,
this.paymentLink,
this.paymentMethodCollection,
this.paymentMethodConfigurationDetails,
this.paymentMethodOptions,
required this.paymentMethodTypes,
required this.paymentStatus,
this.phoneNumberCollection,
this.recoveredFrom,
this.redirectOnCompletion,
this.returnUrl,
this.setupIntent,
this.shippingAddressCollection,
this.shippingCost,
this.shippingDetails,
required this.shippingOptions,
this.status,
this.submitType,
this.subscription,
this.successUrl,
this.taxIdCollection,
this.totalDetails,
this.uiMode,
this.url,
});