Debian Codegraph @

stripe/checkout/_session.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from stripe._createable_api_resource import CreateableAPIResource
4 from stripe._expandable_field import ExpandableField
5 from stripe._list_object import ListObject
6 from stripe._listable_api_resource import ListableAPIResource
7 from stripe._stripe_object import StripeObject
8 from stripe._updateable_api_resource import UpdateableAPIResource
9 from stripe._util import class_method_variant, sanitize_id
10 from typing import ClassVar, Dict, List, Optional, cast, overload
11 from typing_extensions import Literal, Unpack, TYPE_CHECKING
12
13 if TYPE_CHECKING:
14 from stripe._account import Account
15 from stripe._coupon import Coupon
16 from stripe._customer import Customer
17 from stripe._discount import Discount as DiscountResource
18 from stripe._invoice import Invoice
19 from stripe._line_item import LineItem
20 from stripe._payment_intent import PaymentIntent
21 from stripe._payment_link import PaymentLink
22 from stripe._promotion_code import PromotionCode
23 from stripe._setup_intent import SetupIntent
24 from stripe._shipping_rate import ShippingRate
25 from stripe._subscription import Subscription
26 from stripe._tax_id import TaxId as TaxIdResource
27 from stripe._tax_rate import TaxRate
28 from stripe.params.checkout._session_create_params import (
29 SessionCreateParams,
30 )
31 from stripe.params.checkout._session_expire_params import (
32 SessionExpireParams,
33 )
34 from stripe.params.checkout._session_list_line_items_params import (
35 SessionListLineItemsParams,
36 )
37 from stripe.params.checkout._session_list_params import SessionListParams
38 from stripe.params.checkout._session_modify_params import (
39 SessionModifyParams,
40 )
41 from stripe.params.checkout._session_retrieve_params import (
42 SessionRetrieveParams,
43 )
44
45
46 class Session(
47 CreateableAPIResource["Session"],
48 ListableAPIResource["Session"],
49 UpdateableAPIResource["Session"],
50 ):
51 """
52 A Checkout Session represents your customer's session as they pay for
53 one-time purchases or subscriptions through [Checkout](https://docs.stripe.com/payments/checkout)
54 or [Payment Links](https://docs.stripe.com/payments/payment-links). We recommend creating a
55 new Session each time your customer attempts to pay.
56
57 Once payment is successful, the Checkout Session will contain a reference
58 to the [Customer](https://docs.stripe.com/api/customers), and either the successful
59 [PaymentIntent](https://docs.stripe.com/api/payment_intents) or an active
60 [Subscription](https://docs.stripe.com/api/subscriptions).
61
62 You can create a Checkout Session on your server and redirect to its URL
63 to begin Checkout.
64
65 Related guide: [Checkout quickstart](https://docs.stripe.com/checkout/quickstart)
66 """
67
68 OBJECT_NAME: ClassVar[Literal["checkout.session"]] = "checkout.session"
69
70 class AdaptivePricing(StripeObject):
71 enabled: bool
72 """
73 If enabled, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions).
74 """
75
76 class AfterExpiration(StripeObject):
77 class Recovery(StripeObject):
78 allow_promotion_codes: bool
79 """
80 Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
81 """
82 enabled: bool
83 """
84 If `true`, a recovery url will be generated to recover this Checkout Session if it
85 expires before a transaction is completed. It will be attached to the
86 Checkout Session object upon expiration.
87 """
88 expires_at: Optional[int]
89 """
90 The timestamp at which the recovery URL will expire.
91 """
92 url: Optional[str]
93 """
94 URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session
95 """
96
97 recovery: Optional[Recovery]
98 """
99 When set, configuration used to recover the Checkout Session on expiry.
100 """
101 _inner_class_types = {"recovery": Recovery}
102
103 class AutomaticTax(StripeObject):
104 class Liability(StripeObject):
105 account: Optional[ExpandableField["Account"]]
106 """
107 The connected account being referenced when `type` is `account`.
108 """
109 type: Literal["account", "self"]
110 """
111 Type of the account referenced.
112 """
113
114 enabled: bool
115 """
116 Indicates whether automatic tax is enabled for the session
117 """
118 liability: Optional[Liability]
119 """
120 The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
121 """
122 provider: Optional[str]
123 """
124 The tax provider powering automatic tax.
125 """
126 status: Optional[
127 Literal["complete", "failed", "requires_location_inputs"]
128 ]
129 """
130 The status of the most recent automated tax calculation for this session.
131 """
132 _inner_class_types = {"liability": Liability}
133
134 class BrandingSettings(StripeObject):
135 class Icon(StripeObject):
136 file: Optional[str]
137 """
138 The ID of a [File upload](https://stripe.com/docs/api/files) representing the icon. Purpose must be `business_icon`. Required if `type` is `file` and disallowed otherwise.
139 """
140 type: Literal["file", "url"]
141 """
142 The type of image for the icon. Must be one of `file` or `url`.
143 """
144 url: Optional[str]
145 """
146 The URL of the image. Present when `type` is `url`.
147 """
148
149 class Logo(StripeObject):
150 file: Optional[str]
151 """
152 The ID of a [File upload](https://stripe.com/docs/api/files) representing the logo. Purpose must be `business_logo`. Required if `type` is `file` and disallowed otherwise.
153 """
154 type: Literal["file", "url"]
155 """
156 The type of image for the logo. Must be one of `file` or `url`.
157 """
158 url: Optional[str]
159 """
160 The URL of the image. Present when `type` is `url`.
161 """
162
163 background_color: str
164 """
165 A hex color value starting with `#` representing the background color for the Checkout Session.
166 """
167 border_style: Literal["pill", "rectangular", "rounded"]
168 """
169 The border style for the Checkout Session. Must be one of `rounded`, `rectangular`, or `pill`.
170 """
171 button_color: str
172 """
173 A hex color value starting with `#` representing the button color for the Checkout Session.
174 """
175 display_name: str
176 """
177 The display name shown on the Checkout Session.
178 """
179 font_family: str
180 """
181 The font family for the Checkout Session. Must be one of the [supported font families](https://docs.stripe.com/payments/checkout/customization/appearance?payment-ui=stripe-hosted#font-compatibility).
182 """
183 icon: Optional[Icon]
184 """
185 The icon for the Checkout Session. You cannot set both `logo` and `icon`.
186 """
187 logo: Optional[Logo]
188 """
189 The logo for the Checkout Session. You cannot set both `logo` and `icon`.
190 """
191 _inner_class_types = {"icon": Icon, "logo": Logo}
192
193 class CollectedInformation(StripeObject):
194 class ShippingDetails(StripeObject):
195 class Address(StripeObject):
196 city: Optional[str]
197 """
198 City, district, suburb, town, or village.
199 """
200 country: Optional[str]
201 """
202 Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
203 """
204 line1: Optional[str]
205 """
206 Address line 1, such as the street, PO Box, or company name.
207 """
208 line2: Optional[str]
209 """
210 Address line 2, such as the apartment, suite, unit, or building.
211 """
212 postal_code: Optional[str]
213 """
214 ZIP or postal code.
215 """
216 state: Optional[str]
217 """
218 State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
219 """
220
221 address: Address
222 name: str
223 """
224 Customer name.
225 """
226 _inner_class_types = {"address": Address}
227
228 business_name: Optional[str]
229 """
230 Customer's business name for this Checkout Session
231 """
232 individual_name: Optional[str]
233 """
234 Customer's individual name for this Checkout Session
235 """
236 shipping_details: Optional[ShippingDetails]
237 """
238 Shipping information for this Checkout Session.
239 """
240 _inner_class_types = {"shipping_details": ShippingDetails}
241
242 class Consent(StripeObject):
243 promotions: Optional[Literal["opt_in", "opt_out"]]
244 """
245 If `opt_in`, the customer consents to receiving promotional communications
246 from the merchant about this Checkout Session.
247 """
248 terms_of_service: Optional[Literal["accepted"]]
249 """
250 If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.
251 """
252
253 class ConsentCollection(StripeObject):
254 class PaymentMethodReuseAgreement(StripeObject):
255 position: Literal["auto", "hidden"]
256 """
257 Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
258
259 When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
260 """
261
262 payment_method_reuse_agreement: Optional[PaymentMethodReuseAgreement]
263 """
264 If set to `hidden`, it will hide legal text related to the reuse of a payment method.
265 """
266 promotions: Optional[Literal["auto", "none"]]
267 """
268 If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
269 Session will determine whether to display an option to opt into promotional communication
270 from the merchant depending on the customer's locale. Only available to US merchants.
271 """
272 terms_of_service: Optional[Literal["none", "required"]]
273 """
274 If set to `required`, it requires customers to accept the terms of service before being able to pay.
275 """
276 _inner_class_types = {
277 "payment_method_reuse_agreement": PaymentMethodReuseAgreement,
278 }
279
280 class CurrencyConversion(StripeObject):
281 amount_subtotal: int
282 """
283 Total of all items in source currency before discounts or taxes are applied.
284 """
285 amount_total: int
286 """
287 Total of all items in source currency after discounts and taxes are applied.
288 """
289 fx_rate: str
290 """
291 Exchange rate used to convert source currency amounts to customer currency amounts
292 """
293 source_currency: str
294 """
295 Creation currency of the CheckoutSession before localization
296 """
297
298 class CustomField(StripeObject):
299 class Dropdown(StripeObject):
300 class Option(StripeObject):
301 label: str
302 """
303 The label for the option, displayed to the customer. Up to 100 characters.
304 """
305 value: str
306 """
307 The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
308 """
309
310 default_value: Optional[str]
311 """
312 The value that pre-fills on the payment page.
313 """
314 options: List[Option]
315 """
316 The options available for the customer to select. Up to 200 options allowed.
317 """
318 value: Optional[str]
319 """
320 The option selected by the customer. This will be the `value` for the option.
321 """
322 _inner_class_types = {"options": Option}
323
324 class Label(StripeObject):
325 custom: Optional[str]
326 """
327 Custom text for the label, displayed to the customer. Up to 50 characters.
328 """
329 type: Literal["custom"]
330 """
331 The type of the label.
332 """
333
334 class Numeric(StripeObject):
335 default_value: Optional[str]
336 """
337 The value that pre-fills the field on the payment page.
338 """
339 maximum_length: Optional[int]
340 """
341 The maximum character length constraint for the customer's input.
342 """
343 minimum_length: Optional[int]
344 """
345 The minimum character length requirement for the customer's input.
346 """
347 value: Optional[str]
348 """
349 The value entered by the customer, containing only digits.
350 """
351
352 class Text(StripeObject):
353 default_value: Optional[str]
354 """
355 The value that pre-fills the field on the payment page.
356 """
357 maximum_length: Optional[int]
358 """
359 The maximum character length constraint for the customer's input.
360 """
361 minimum_length: Optional[int]
362 """
363 The minimum character length requirement for the customer's input.
364 """
365 value: Optional[str]
366 """
367 The value entered by the customer.
368 """
369
370 dropdown: Optional[Dropdown]
371 key: str
372 """
373 String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
374 """
375 label: Label
376 numeric: Optional[Numeric]
377 optional: bool
378 """
379 Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
380 """
381 text: Optional[Text]
382 type: Literal["dropdown", "numeric", "text"]
383 """
384 The type of the field.
385 """
386 _inner_class_types = {
387 "dropdown": Dropdown,
388 "label": Label,
389 "numeric": Numeric,
390 "text": Text,
391 }
392
393 class CustomText(StripeObject):
394 class AfterSubmit(StripeObject):
395 message: str
396 """
397 Text can be up to 1200 characters in length.
398 """
399
400 class ShippingAddress(StripeObject):
401 message: str
402 """
403 Text can be up to 1200 characters in length.
404 """
405
406 class Submit(StripeObject):
407 message: str
408 """
409 Text can be up to 1200 characters in length.
410 """
411
412 class TermsOfServiceAcceptance(StripeObject):
413 message: str
414 """
415 Text can be up to 1200 characters in length.
416 """
417
418 after_submit: Optional[AfterSubmit]
419 """
420 Custom text that should be displayed after the payment confirmation button.
421 """
422 shipping_address: Optional[ShippingAddress]
423 """
424 Custom text that should be displayed alongside shipping address collection.
425 """
426 submit: Optional[Submit]
427 """
428 Custom text that should be displayed alongside the payment confirmation button.
429 """
430 terms_of_service_acceptance: Optional[TermsOfServiceAcceptance]
431 """
432 Custom text that should be displayed in place of the default terms of service agreement text.
433 """
434 _inner_class_types = {
435 "after_submit": AfterSubmit,
436 "shipping_address": ShippingAddress,
437 "submit": Submit,
438 "terms_of_service_acceptance": TermsOfServiceAcceptance,
439 }
440
441 class CustomerDetails(StripeObject):
442 class Address(StripeObject):
443 city: Optional[str]
444 """
445 City, district, suburb, town, or village.
446 """
447 country: Optional[str]
448 """
449 Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
450 """
451 line1: Optional[str]
452 """
453 Address line 1, such as the street, PO Box, or company name.
454 """
455 line2: Optional[str]
456 """
457 Address line 2, such as the apartment, suite, unit, or building.
458 """
459 postal_code: Optional[str]
460 """
461 ZIP or postal code.
462 """
463 state: Optional[str]
464 """
465 State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
466 """
467
468 class TaxId(StripeObject):
469 type: Literal[
470 "ad_nrt",
471 "ae_trn",
472 "al_tin",
473 "am_tin",
474 "ao_tin",
475 "ar_cuit",
476 "au_abn",
477 "au_arn",
478 "aw_tin",
479 "az_tin",
480 "ba_tin",
481 "bb_tin",
482 "bd_bin",
483 "bf_ifu",
484 "bg_uic",
485 "bh_vat",
486 "bj_ifu",
487 "bo_tin",
488 "br_cnpj",
489 "br_cpf",
490 "bs_tin",
491 "by_tin",
492 "ca_bn",
493 "ca_gst_hst",
494 "ca_pst_bc",
495 "ca_pst_mb",
496 "ca_pst_sk",
497 "ca_qst",
498 "cd_nif",
499 "ch_uid",
500 "ch_vat",
501 "cl_tin",
502 "cm_niu",
503 "cn_tin",
504 "co_nit",
505 "cr_tin",
506 "cv_nif",
507 "de_stn",
508 "do_rcn",
509 "ec_ruc",
510 "eg_tin",
511 "es_cif",
512 "et_tin",
513 "eu_oss_vat",
514 "eu_vat",
515 "gb_vat",
516 "ge_vat",
517 "gn_nif",
518 "hk_br",
519 "hr_oib",
520 "hu_tin",
521 "id_npwp",
522 "il_vat",
523 "in_gst",
524 "is_vat",
525 "jp_cn",
526 "jp_rn",
527 "jp_trn",
528 "ke_pin",
529 "kg_tin",
530 "kh_tin",
531 "kr_brn",
532 "kz_bin",
533 "la_tin",
534 "li_uid",
535 "li_vat",
536 "lk_vat",
537 "ma_vat",
538 "md_vat",
539 "me_pib",
540 "mk_vat",
541 "mr_nif",
542 "mx_rfc",
543 "my_frp",
544 "my_itn",
545 "my_sst",
546 "ng_tin",
547 "no_vat",
548 "no_voec",
549 "np_pan",
550 "nz_gst",
551 "om_vat",
552 "pe_ruc",
553 "ph_tin",
554 "pl_nip",
555 "ro_tin",
556 "rs_pib",
557 "ru_inn",
558 "ru_kpp",
559 "sa_vat",
560 "sg_gst",
561 "sg_uen",
562 "si_tin",
563 "sn_ninea",
564 "sr_fin",
565 "sv_nit",
566 "th_vat",
567 "tj_tin",
568 "tr_tin",
569 "tw_vat",
570 "tz_vat",
571 "ua_vat",
572 "ug_tin",
573 "unknown",
574 "us_ein",
575 "uy_ruc",
576 "uz_tin",
577 "uz_vat",
578 "ve_rif",
579 "vn_tin",
580 "za_vat",
581 "zm_tin",
582 "zw_tin",
583 ]
584 """
585 The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `pl_nip`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
586 """
587 value: Optional[str]
588 """
589 The value of the tax ID.
590 """
591
592 address: Optional[Address]
593 """
594 The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
595 """
596 business_name: Optional[str]
597 """
598 The customer's business name after a completed Checkout Session.
599 """
600 email: Optional[str]
601 """
602 The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.
603 Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.
604 """
605 individual_name: Optional[str]
606 """
607 The customer's individual name after a completed Checkout Session.
608 """
609 name: Optional[str]
610 """
611 The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
612 """
613 phone: Optional[str]
614 """
615 The customer's phone number after a completed Checkout Session.
616 """
617 tax_exempt: Optional[Literal["exempt", "none", "reverse"]]
618 """
619 The customer's tax exempt status after a completed Checkout Session.
620 """
621 tax_ids: Optional[List[TaxId]]
622 """
623 The customer's tax IDs after a completed Checkout Session.
624 """
625 _inner_class_types = {"address": Address, "tax_ids": TaxId}
626
627 class Discount(StripeObject):
628 coupon: Optional[ExpandableField["Coupon"]]
629 """
630 Coupon attached to the Checkout Session.
631 """
632 promotion_code: Optional[ExpandableField["PromotionCode"]]
633 """
634 Promotion code attached to the Checkout Session.
635 """
636
637 class InvoiceCreation(StripeObject):
638 class InvoiceData(StripeObject):
639 class CustomField(StripeObject):
640 name: str
641 """
642 The name of the custom field.
643 """
644 value: str
645 """
646 The value of the custom field.
647 """
648
649 class Issuer(StripeObject):
650 account: Optional[ExpandableField["Account"]]
651 """
652 The connected account being referenced when `type` is `account`.
653 """
654 type: Literal["account", "self"]
655 """
656 Type of the account referenced.
657 """
658
659 class RenderingOptions(StripeObject):
660 amount_tax_display: Optional[str]
661 """
662 How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
663 """
664 template: Optional[str]
665 """
666 ID of the invoice rendering template to be used for the generated invoice.
667 """
668
669 account_tax_ids: Optional[List[ExpandableField["TaxIdResource"]]]
670 """
671 The account tax IDs associated with the invoice.
672 """
673 custom_fields: Optional[List[CustomField]]
674 """
675 Custom fields displayed on the invoice.
676 """
677 description: Optional[str]
678 """
679 An arbitrary string attached to the object. Often useful for displaying to users.
680 """
681 footer: Optional[str]
682 """
683 Footer displayed on the invoice.
684 """
685 issuer: Optional[Issuer]
686 """
687 The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
688 """
689 metadata: Optional[Dict[str, str]]
690 """
691 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
692 """
693 rendering_options: Optional[RenderingOptions]
694 """
695 Options for invoice PDF rendering.
696 """
697 _inner_class_types = {
698 "custom_fields": CustomField,
699 "issuer": Issuer,
700 "rendering_options": RenderingOptions,
701 }
702
703 enabled: bool
704 """
705 Indicates whether invoice creation is enabled for the Checkout Session.
706 """
707 invoice_data: InvoiceData
708 _inner_class_types = {"invoice_data": InvoiceData}
709
710 class NameCollection(StripeObject):
711 class Business(StripeObject):
712 enabled: bool
713 """
714 Indicates whether business name collection is enabled for the session
715 """
716 optional: bool
717 """
718 Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
719 """
720
721 class Individual(StripeObject):
722 enabled: bool
723 """
724 Indicates whether individual name collection is enabled for the session
725 """
726 optional: bool
727 """
728 Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
729 """
730
731 business: Optional[Business]
732 individual: Optional[Individual]
733 _inner_class_types = {"business": Business, "individual": Individual}
734
735 class OptionalItem(StripeObject):
736 class AdjustableQuantity(StripeObject):
737 enabled: bool
738 """
739 Set to true if the quantity can be adjusted to any non-negative integer.
740 """
741 maximum: Optional[int]
742 """
743 The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
744 """
745 minimum: Optional[int]
746 """
747 The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0.
748 """
749
750 adjustable_quantity: Optional[AdjustableQuantity]
751 price: str
752 quantity: int
753 _inner_class_types = {"adjustable_quantity": AdjustableQuantity}
754
755 class PaymentMethodConfigurationDetails(StripeObject):
756 id: str
757 """
758 ID of the payment method configuration used.
759 """
760 parent: Optional[str]
761 """
762 ID of the parent payment method configuration used.
763 """
764
765 class PaymentMethodOptions(StripeObject):
766 class AcssDebit(StripeObject):
767 class MandateOptions(StripeObject):
768 custom_mandate_url: Optional[str]
769 """
770 A URL for custom mandate text
771 """
772 default_for: Optional[List[Literal["invoice", "subscription"]]]
773 """
774 List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.
775 """
776 interval_description: Optional[str]
777 """
778 Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
779 """
780 payment_schedule: Optional[
781 Literal["combined", "interval", "sporadic"]
782 ]
783 """
784 Payment schedule for the mandate.
785 """
786 transaction_type: Optional[Literal["business", "personal"]]
787 """
788 Transaction type of the mandate.
789 """
790
791 currency: Optional[Literal["cad", "usd"]]
792 """
793 Currency supported by the bank account. Returned when the Session is in `setup` mode.
794 """
795 mandate_options: Optional[MandateOptions]
796 setup_future_usage: Optional[
797 Literal["none", "off_session", "on_session"]
798 ]
799 """
800 Indicates that you intend to make future payments with this PaymentIntent's payment method.
801
802 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
803
804 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
805
806 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
807 """
808 target_date: Optional[str]
809 """
810 Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
811 """
812 verification_method: Optional[
813 Literal["automatic", "instant", "microdeposits"]
814 ]
815 """
816 Bank account verification method.
817 """
818 _inner_class_types = {"mandate_options": MandateOptions}
819
820 class Affirm(StripeObject):
821 capture_method: Optional[Literal["manual"]]
822 """
823 Controls when the funds will be captured from the customer's account.
824 """
825 setup_future_usage: Optional[Literal["none"]]
826 """
827 Indicates that you intend to make future payments with this PaymentIntent's payment method.
828
829 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
830
831 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
832
833 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
834 """
835
836 class AfterpayClearpay(StripeObject):
837 capture_method: Optional[Literal["manual"]]
838 """
839 Controls when the funds will be captured from the customer's account.
840 """
841 setup_future_usage: Optional[Literal["none"]]
842 """
843 Indicates that you intend to make future payments with this PaymentIntent's payment method.
844
845 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
846
847 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
848
849 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
850 """
851
852 class Alipay(StripeObject):
853 setup_future_usage: Optional[Literal["none"]]
854 """
855 Indicates that you intend to make future payments with this PaymentIntent's payment method.
856
857 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
858
859 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
860
861 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
862 """
863
864 class Alma(StripeObject):
865 capture_method: Optional[Literal["manual"]]
866 """
867 Controls when the funds will be captured from the customer's account.
868 """
869
870 class AmazonPay(StripeObject):
871 capture_method: Optional[Literal["manual"]]
872 """
873 Controls when the funds will be captured from the customer's account.
874 """
875 setup_future_usage: Optional[Literal["none", "off_session"]]
876 """
877 Indicates that you intend to make future payments with this PaymentIntent's payment method.
878
879 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
880
881 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
882
883 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
884 """
885
886 class AuBecsDebit(StripeObject):
887 setup_future_usage: Optional[Literal["none"]]
888 """
889 Indicates that you intend to make future payments with this PaymentIntent's payment method.
890
891 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
892
893 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
894
895 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
896 """
897 target_date: Optional[str]
898 """
899 Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
900 """
901
902 class BacsDebit(StripeObject):
903 class MandateOptions(StripeObject):
904 reference_prefix: Optional[str]
905 """
906 Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
907 """
908
909 mandate_options: Optional[MandateOptions]
910 setup_future_usage: Optional[
911 Literal["none", "off_session", "on_session"]
912 ]
913 """
914 Indicates that you intend to make future payments with this PaymentIntent's payment method.
915
916 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
917
918 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
919
920 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
921 """
922 target_date: Optional[str]
923 """
924 Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
925 """
926 _inner_class_types = {"mandate_options": MandateOptions}
927
928 class Bancontact(StripeObject):
929 setup_future_usage: Optional[Literal["none"]]
930 """
931 Indicates that you intend to make future payments with this PaymentIntent's payment method.
932
933 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
934
935 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
936
937 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
938 """
939
940 class Billie(StripeObject):
941 capture_method: Optional[Literal["manual"]]
942 """
943 Controls when the funds will be captured from the customer's account.
944 """
945
946 class Boleto(StripeObject):
947 expires_after_days: int
948 """
949 The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
950 """
951 setup_future_usage: Optional[
952 Literal["none", "off_session", "on_session"]
953 ]
954 """
955 Indicates that you intend to make future payments with this PaymentIntent's payment method.
956
957 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
958
959 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
960
961 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
962 """
963
964 class Card(StripeObject):
965 class Installments(StripeObject):
966 enabled: Optional[bool]
967 """
968 Indicates if installments are enabled
969 """
970
971 class Restrictions(StripeObject):
972 brands_blocked: Optional[
973 List[
974 Literal[
975 "american_express",
976 "discover_global_network",
977 "mastercard",
978 "visa",
979 ]
980 ]
981 ]
982 """
983 Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
984 """
985
986 capture_method: Optional[Literal["manual"]]
987 """
988 Controls when the funds will be captured from the customer's account.
989 """
990 installments: Optional[Installments]
991 request_extended_authorization: Optional[
992 Literal["if_available", "never"]
993 ]
994 """
995 Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession.
996 """
997 request_incremental_authorization: Optional[
998 Literal["if_available", "never"]
999 ]
1000 """
1001 Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this CheckoutSession.
1002 """
1003 request_multicapture: Optional[Literal["if_available", "never"]]
1004 """
1005 Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this CheckoutSession.
1006 """
1007 request_overcapture: Optional[Literal["if_available", "never"]]
1008 """
1009 Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this CheckoutSession.
1010 """
1011 request_three_d_secure: Literal["any", "automatic", "challenge"]
1012 """
1013 We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
1014 """
1015 restrictions: Optional[Restrictions]
1016 setup_future_usage: Optional[
1017 Literal["none", "off_session", "on_session"]
1018 ]
1019 """
1020 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1021
1022 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1023
1024 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1025
1026 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1027 """
1028 statement_descriptor_suffix_kana: Optional[str]
1029 """
1030 Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
1031 """
1032 statement_descriptor_suffix_kanji: Optional[str]
1033 """
1034 Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
1035 """
1036 _inner_class_types = {
1037 "installments": Installments,
1038 "restrictions": Restrictions,
1039 }
1040
1041 class Cashapp(StripeObject):
1042 capture_method: Optional[Literal["manual"]]
1043 """
1044 Controls when the funds will be captured from the customer's account.
1045 """
1046 setup_future_usage: Optional[Literal["none"]]
1047 """
1048 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1049
1050 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1051
1052 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1053
1054 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1055 """
1056
1057 class CustomerBalance(StripeObject):
1058 class BankTransfer(StripeObject):
1059 class EuBankTransfer(StripeObject):
1060 country: Literal["BE", "DE", "ES", "FR", "IE", "NL"]
1061 """
1062 The desired country code of the bank account information. Permitted values include: `DE`, `FR`, `IE`, or `NL`.
1063 """
1064
1065 eu_bank_transfer: Optional[EuBankTransfer]
1066 requested_address_types: Optional[
1067 List[
1068 Literal[
1069 "aba",
1070 "iban",
1071 "sepa",
1072 "sort_code",
1073 "spei",
1074 "swift",
1075 "zengin",
1076 ]
1077 ]
1078 ]
1079 """
1080 List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
1081
1082 Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
1083 """
1084 type: Optional[
1085 Literal[
1086 "eu_bank_transfer",
1087 "gb_bank_transfer",
1088 "jp_bank_transfer",
1089 "mx_bank_transfer",
1090 "us_bank_transfer",
1091 ]
1092 ]
1093 """
1094 The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
1095 """
1096 _inner_class_types = {"eu_bank_transfer": EuBankTransfer}
1097
1098 bank_transfer: Optional[BankTransfer]
1099 funding_type: Optional[Literal["bank_transfer"]]
1100 """
1101 The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1102 """
1103 setup_future_usage: Optional[Literal["none"]]
1104 """
1105 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1106
1107 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1108
1109 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1110
1111 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1112 """
1113 _inner_class_types = {"bank_transfer": BankTransfer}
1114
1115 class Eps(StripeObject):
1116 setup_future_usage: Optional[Literal["none"]]
1117 """
1118 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1119
1120 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1121
1122 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1123
1124 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1125 """
1126
1127 class Fpx(StripeObject):
1128 setup_future_usage: Optional[Literal["none"]]
1129 """
1130 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1131
1132 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1133
1134 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1135
1136 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1137 """
1138
1139 class Giropay(StripeObject):
1140 setup_future_usage: Optional[Literal["none"]]
1141 """
1142 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1143
1144 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1145
1146 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1147
1148 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1149 """
1150
1151 class Grabpay(StripeObject):
1152 setup_future_usage: Optional[Literal["none"]]
1153 """
1154 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1155
1156 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1157
1158 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1159
1160 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1161 """
1162
1163 class Ideal(StripeObject):
1164 setup_future_usage: Optional[Literal["none"]]
1165 """
1166 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1167
1168 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1169
1170 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1171
1172 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1173 """
1174
1175 class KakaoPay(StripeObject):
1176 capture_method: Optional[Literal["manual"]]
1177 """
1178 Controls when the funds will be captured from the customer's account.
1179 """
1180 setup_future_usage: Optional[Literal["none", "off_session"]]
1181 """
1182 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1183
1184 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1185
1186 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1187
1188 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1189 """
1190
1191 class Klarna(StripeObject):
1192 capture_method: Optional[Literal["manual"]]
1193 """
1194 Controls when the funds will be captured from the customer's account.
1195 """
1196 setup_future_usage: Optional[
1197 Literal["none", "off_session", "on_session"]
1198 ]
1199 """
1200 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1201
1202 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1203
1204 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1205
1206 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1207 """
1208
1209 class Konbini(StripeObject):
1210 expires_after_days: Optional[int]
1211 """
1212 The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
1213 """
1214 setup_future_usage: Optional[Literal["none"]]
1215 """
1216 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1217
1218 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1219
1220 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1221
1222 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1223 """
1224
1225 class KrCard(StripeObject):
1226 capture_method: Optional[Literal["manual"]]
1227 """
1228 Controls when the funds will be captured from the customer's account.
1229 """
1230 setup_future_usage: Optional[Literal["none", "off_session"]]
1231 """
1232 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1233
1234 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1235
1236 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1237
1238 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1239 """
1240
1241 class Link(StripeObject):
1242 capture_method: Optional[Literal["manual"]]
1243 """
1244 Controls when the funds will be captured from the customer's account.
1245 """
1246 setup_future_usage: Optional[Literal["none", "off_session"]]
1247 """
1248 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1249
1250 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1251
1252 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1253
1254 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1255 """
1256
1257 class Mobilepay(StripeObject):
1258 capture_method: Optional[Literal["manual"]]
1259 """
1260 Controls when the funds will be captured from the customer's account.
1261 """
1262 setup_future_usage: Optional[Literal["none"]]
1263 """
1264 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1265
1266 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1267
1268 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1269
1270 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1271 """
1272
1273 class Multibanco(StripeObject):
1274 setup_future_usage: Optional[Literal["none"]]
1275 """
1276 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1277
1278 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1279
1280 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1281
1282 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1283 """
1284
1285 class NaverPay(StripeObject):
1286 capture_method: Optional[Literal["manual"]]
1287 """
1288 Controls when the funds will be captured from the customer's account.
1289 """
1290 setup_future_usage: Optional[Literal["none", "off_session"]]
1291 """
1292 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1293
1294 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1295
1296 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1297
1298 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1299 """
1300
1301 class Oxxo(StripeObject):
1302 expires_after_days: int
1303 """
1304 The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
1305 """
1306 setup_future_usage: Optional[Literal["none"]]
1307 """
1308 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1309
1310 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1311
1312 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1313
1314 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1315 """
1316
1317 class P24(StripeObject):
1318 setup_future_usage: Optional[Literal["none"]]
1319 """
1320 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1321
1322 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1323
1324 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1325
1326 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1327 """
1328
1329 class Payco(StripeObject):
1330 capture_method: Optional[Literal["manual"]]
1331 """
1332 Controls when the funds will be captured from the customer's account.
1333 """
1334
1335 class Paynow(StripeObject):
1336 setup_future_usage: Optional[Literal["none"]]
1337 """
1338 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1339
1340 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1341
1342 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1343
1344 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1345 """
1346
1347 class Paypal(StripeObject):
1348 capture_method: Optional[Literal["manual"]]
1349 """
1350 Controls when the funds will be captured from the customer's account.
1351 """
1352 preferred_locale: Optional[str]
1353 """
1354 Preferred locale of the PayPal checkout page that the customer is redirected to.
1355 """
1356 reference: Optional[str]
1357 """
1358 A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
1359 """
1360 setup_future_usage: Optional[Literal["none", "off_session"]]
1361 """
1362 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1363
1364 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1365
1366 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1367
1368 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1369 """
1370
1371 class Payto(StripeObject):
1372 class MandateOptions(StripeObject):
1373 amount: Optional[int]
1374 """
1375 Amount that will be collected. It is required when `amount_type` is `fixed`.
1376 """
1377 amount_type: Optional[Literal["fixed", "maximum"]]
1378 """
1379 The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`.
1380 """
1381 end_date: Optional[str]
1382 """
1383 Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
1384 """
1385 payment_schedule: Optional[
1386 Literal[
1387 "adhoc",
1388 "annual",
1389 "daily",
1390 "fortnightly",
1391 "monthly",
1392 "quarterly",
1393 "semi_annual",
1394 "weekly",
1395 ]
1396 ]
1397 """
1398 The periodicity at which payments will be collected. Defaults to `adhoc`.
1399 """
1400 payments_per_period: Optional[int]
1401 """
1402 The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
1403 """
1404 purpose: Optional[
1405 Literal[
1406 "dependant_support",
1407 "government",
1408 "loan",
1409 "mortgage",
1410 "other",
1411 "pension",
1412 "personal",
1413 "retail",
1414 "salary",
1415 "tax",
1416 "utility",
1417 ]
1418 ]
1419 """
1420 The purpose for which payments are made. Has a default value based on your merchant category code.
1421 """
1422 start_date: Optional[str]
1423 """
1424 Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
1425 """
1426
1427 mandate_options: Optional[MandateOptions]
1428 setup_future_usage: Optional[Literal["none", "off_session"]]
1429 """
1430 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1431
1432 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1433
1434 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1435
1436 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1437 """
1438 _inner_class_types = {"mandate_options": MandateOptions}
1439
1440 class Pix(StripeObject):
1441 amount_includes_iof: Optional[Literal["always", "never"]]
1442 """
1443 Determines if the amount includes the IOF tax.
1444 """
1445 expires_after_seconds: Optional[int]
1446 """
1447 The number of seconds after which Pix payment will expire.
1448 """
1449 setup_future_usage: Optional[Literal["none"]]
1450 """
1451 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1452
1453 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1454
1455 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1456
1457 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1458 """
1459
1460 class RevolutPay(StripeObject):
1461 capture_method: Optional[Literal["manual"]]
1462 """
1463 Controls when the funds will be captured from the customer's account.
1464 """
1465 setup_future_usage: Optional[Literal["none", "off_session"]]
1466 """
1467 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1468
1469 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1470
1471 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1472
1473 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1474 """
1475
1476 class SamsungPay(StripeObject):
1477 capture_method: Optional[Literal["manual"]]
1478 """
1479 Controls when the funds will be captured from the customer's account.
1480 """
1481
1482 class Satispay(StripeObject):
1483 capture_method: Optional[Literal["manual"]]
1484 """
1485 Controls when the funds will be captured from the customer's account.
1486 """
1487
1488 class SepaDebit(StripeObject):
1489 class MandateOptions(StripeObject):
1490 reference_prefix: Optional[str]
1491 """
1492 Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
1493 """
1494
1495 mandate_options: Optional[MandateOptions]
1496 setup_future_usage: Optional[
1497 Literal["none", "off_session", "on_session"]
1498 ]
1499 """
1500 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1501
1502 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1503
1504 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1505
1506 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1507 """
1508 target_date: Optional[str]
1509 """
1510 Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
1511 """
1512 _inner_class_types = {"mandate_options": MandateOptions}
1513
1514 class Sofort(StripeObject):
1515 setup_future_usage: Optional[Literal["none"]]
1516 """
1517 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1518
1519 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1520
1521 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1522
1523 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1524 """
1525
1526 class Swish(StripeObject):
1527 reference: Optional[str]
1528 """
1529 The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
1530 """
1531
1532 class Twint(StripeObject):
1533 setup_future_usage: Optional[Literal["none"]]
1534 """
1535 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1536
1537 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1538
1539 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1540
1541 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1542 """
1543
1544 class UsBankAccount(StripeObject):
1545 class FinancialConnections(StripeObject):
1546 class Filters(StripeObject):
1547 account_subcategories: Optional[
1548 List[Literal["checking", "savings"]]
1549 ]
1550 """
1551 The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
1552 """
1553
1554 filters: Optional[Filters]
1555 permissions: Optional[
1556 List[
1557 Literal[
1558 "balances",
1559 "ownership",
1560 "payment_method",
1561 "transactions",
1562 ]
1563 ]
1564 ]
1565 """
1566 The list of permissions to request. The `payment_method` permission must be included.
1567 """
1568 prefetch: Optional[
1569 List[Literal["balances", "ownership", "transactions"]]
1570 ]
1571 """
1572 Data features requested to be retrieved upon account creation.
1573 """
1574 return_url: Optional[str]
1575 """
1576 For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
1577 """
1578 _inner_class_types = {"filters": Filters}
1579
1580 financial_connections: Optional[FinancialConnections]
1581 setup_future_usage: Optional[
1582 Literal["none", "off_session", "on_session"]
1583 ]
1584 """
1585 Indicates that you intend to make future payments with this PaymentIntent's payment method.
1586
1587 If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
1588
1589 If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
1590
1591 When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication).
1592 """
1593 target_date: Optional[str]
1594 """
1595 Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
1596 """
1597 verification_method: Optional[Literal["automatic", "instant"]]
1598 """
1599 Bank account verification method.
1600 """
1601 _inner_class_types = {
1602 "financial_connections": FinancialConnections
1603 }
1604
1605 acss_debit: Optional[AcssDebit]
1606 affirm: Optional[Affirm]
1607 afterpay_clearpay: Optional[AfterpayClearpay]
1608 alipay: Optional[Alipay]
1609 alma: Optional[Alma]
1610 amazon_pay: Optional[AmazonPay]
1611 au_becs_debit: Optional[AuBecsDebit]
1612 bacs_debit: Optional[BacsDebit]
1613 bancontact: Optional[Bancontact]
1614 billie: Optional[Billie]
1615 boleto: Optional[Boleto]
1616 card: Optional[Card]
1617 cashapp: Optional[Cashapp]
1618 customer_balance: Optional[CustomerBalance]
1619 eps: Optional[Eps]
1620 fpx: Optional[Fpx]
1621 giropay: Optional[Giropay]
1622 grabpay: Optional[Grabpay]
1623 ideal: Optional[Ideal]
1624 kakao_pay: Optional[KakaoPay]
1625 klarna: Optional[Klarna]
1626 konbini: Optional[Konbini]
1627 kr_card: Optional[KrCard]
1628 link: Optional[Link]
1629 mobilepay: Optional[Mobilepay]
1630 multibanco: Optional[Multibanco]
1631 naver_pay: Optional[NaverPay]
1632 oxxo: Optional[Oxxo]
1633 p24: Optional[P24]
1634 payco: Optional[Payco]
1635 paynow: Optional[Paynow]
1636 paypal: Optional[Paypal]
1637 payto: Optional[Payto]
1638 pix: Optional[Pix]
1639 revolut_pay: Optional[RevolutPay]
1640 samsung_pay: Optional[SamsungPay]
1641 satispay: Optional[Satispay]
1642 sepa_debit: Optional[SepaDebit]
1643 sofort: Optional[Sofort]
1644 swish: Optional[Swish]
1645 twint: Optional[Twint]
1646 us_bank_account: Optional[UsBankAccount]
1647 _inner_class_types = {
1648 "acss_debit": AcssDebit,
1649 "affirm": Affirm,
1650 "afterpay_clearpay": AfterpayClearpay,
1651 "alipay": Alipay,
1652 "alma": Alma,
1653 "amazon_pay": AmazonPay,
1654 "au_becs_debit": AuBecsDebit,
1655 "bacs_debit": BacsDebit,
1656 "bancontact": Bancontact,
1657 "billie": Billie,
1658 "boleto": Boleto,
1659 "card": Card,
1660 "cashapp": Cashapp,
1661 "customer_balance": CustomerBalance,
1662 "eps": Eps,
1663 "fpx": Fpx,
1664 "giropay": Giropay,
1665 "grabpay": Grabpay,
1666 "ideal": Ideal,
1667 "kakao_pay": KakaoPay,
1668 "klarna": Klarna,
1669 "konbini": Konbini,
1670 "kr_card": KrCard,
1671 "link": Link,
1672 "mobilepay": Mobilepay,
1673 "multibanco": Multibanco,
1674 "naver_pay": NaverPay,
1675 "oxxo": Oxxo,
1676 "p24": P24,
1677 "payco": Payco,
1678 "paynow": Paynow,
1679 "paypal": Paypal,
1680 "payto": Payto,
1681 "pix": Pix,
1682 "revolut_pay": RevolutPay,
1683 "samsung_pay": SamsungPay,
1684 "satispay": Satispay,
1685 "sepa_debit": SepaDebit,
1686 "sofort": Sofort,
1687 "swish": Swish,
1688 "twint": Twint,
1689 "us_bank_account": UsBankAccount,
1690 }
1691
1692 class Permissions(StripeObject):
1693 update_shipping_details: Optional[
1694 Literal["client_only", "server_only"]
1695 ]
1696 """
1697 Determines which entity is allowed to update the shipping details.
1698
1699 Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
1700
1701 When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
1702 """
1703
1704 class PhoneNumberCollection(StripeObject):
1705 enabled: bool
1706 """
1707 Indicates whether phone number collection is enabled for the session
1708 """
1709
1710 class PresentmentDetails(StripeObject):
1711 presentment_amount: int
1712 """
1713 Amount intended to be collected by this payment, denominated in `presentment_currency`.
1714 """
1715 presentment_currency: str
1716 """
1717 Currency presented to the customer during payment.
1718 """
1719
1720 class SavedPaymentMethodOptions(StripeObject):
1721 allow_redisplay_filters: Optional[
1722 List[Literal["always", "limited", "unspecified"]]
1723 ]
1724 """
1725 Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.
1726 """
1727 payment_method_remove: Optional[Literal["disabled", "enabled"]]
1728 """
1729 Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
1730 """
1731 payment_method_save: Optional[Literal["disabled", "enabled"]]
1732 """
1733 Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
1734 """
1735
1736 class ShippingAddressCollection(StripeObject):
1737 allowed_countries: List[
1738 Literal[
1739 "AC",
1740 "AD",
1741 "AE",
1742 "AF",
1743 "AG",
1744 "AI",
1745 "AL",
1746 "AM",
1747 "AO",
1748 "AQ",
1749 "AR",
1750 "AT",
1751 "AU",
1752 "AW",
1753 "AX",
1754 "AZ",
1755 "BA",
1756 "BB",
1757 "BD",
1758 "BE",
1759 "BF",
1760 "BG",
1761 "BH",
1762 "BI",
1763 "BJ",
1764 "BL",
1765 "BM",
1766 "BN",
1767 "BO",
1768 "BQ",
1769 "BR",
1770 "BS",
1771 "BT",
1772 "BV",
1773 "BW",
1774 "BY",
1775 "BZ",
1776 "CA",
1777 "CD",
1778 "CF",
1779 "CG",
1780 "CH",
1781 "CI",
1782 "CK",
1783 "CL",
1784 "CM",
1785 "CN",
1786 "CO",
1787 "CR",
1788 "CV",
1789 "CW",
1790 "CY",
1791 "CZ",
1792 "DE",
1793 "DJ",
1794 "DK",
1795 "DM",
1796 "DO",
1797 "DZ",
1798 "EC",
1799 "EE",
1800 "EG",
1801 "EH",
1802 "ER",
1803 "ES",
1804 "ET",
1805 "FI",
1806 "FJ",
1807 "FK",
1808 "FO",
1809 "FR",
1810 "GA",
1811 "GB",
1812 "GD",
1813 "GE",
1814 "GF",
1815 "GG",
1816 "GH",
1817 "GI",
1818 "GL",
1819 "GM",
1820 "GN",
1821 "GP",
1822 "GQ",
1823 "GR",
1824 "GS",
1825 "GT",
1826 "GU",
1827 "GW",
1828 "GY",
1829 "HK",
1830 "HN",
1831 "HR",
1832 "HT",
1833 "HU",
1834 "ID",
1835 "IE",
1836 "IL",
1837 "IM",
1838 "IN",
1839 "IO",
1840 "IQ",
1841 "IS",
1842 "IT",
1843 "JE",
1844 "JM",
1845 "JO",
1846 "JP",
1847 "KE",
1848 "KG",
1849 "KH",
1850 "KI",
1851 "KM",
1852 "KN",
1853 "KR",
1854 "KW",
1855 "KY",
1856 "KZ",
1857 "LA",
1858 "LB",
1859 "LC",
1860 "LI",
1861 "LK",
1862 "LR",
1863 "LS",
1864 "LT",
1865 "LU",
1866 "LV",
1867 "LY",
1868 "MA",
1869 "MC",
1870 "MD",
1871 "ME",
1872 "MF",
1873 "MG",
1874 "MK",
1875 "ML",
1876 "MM",
1877 "MN",
1878 "MO",
1879 "MQ",
1880 "MR",
1881 "MS",
1882 "MT",
1883 "MU",
1884 "MV",
1885 "MW",
1886 "MX",
1887 "MY",
1888 "MZ",
1889 "NA",
1890 "NC",
1891 "NE",
1892 "NG",
1893 "NI",
1894 "NL",
1895 "NO",
1896 "NP",
1897 "NR",
1898 "NU",
1899 "NZ",
1900 "OM",
1901 "PA",
1902 "PE",
1903 "PF",
1904 "PG",
1905 "PH",
1906 "PK",
1907 "PL",
1908 "PM",
1909 "PN",
1910 "PR",
1911 "PS",
1912 "PT",
1913 "PY",
1914 "QA",
1915 "RE",
1916 "RO",
1917 "RS",
1918 "RU",
1919 "RW",
1920 "SA",
1921 "SB",
1922 "SC",
1923 "SD",
1924 "SE",
1925 "SG",
1926 "SH",
1927 "SI",
1928 "SJ",
1929 "SK",
1930 "SL",
1931 "SM",
1932 "SN",
1933 "SO",
1934 "SR",
1935 "SS",
1936 "ST",
1937 "SV",
1938 "SX",
1939 "SZ",
1940 "TA",
1941 "TC",
1942 "TD",
1943 "TF",
1944 "TG",
1945 "TH",
1946 "TJ",
1947 "TK",
1948 "TL",
1949 "TM",
1950 "TN",
1951 "TO",
1952 "TR",
1953 "TT",
1954 "TV",
1955 "TW",
1956 "TZ",
1957 "UA",
1958 "UG",
1959 "US",
1960 "UY",
1961 "UZ",
1962 "VA",
1963 "VC",
1964 "VE",
1965 "VG",
1966 "VN",
1967 "VU",
1968 "WF",
1969 "WS",
1970 "XK",
1971 "YE",
1972 "YT",
1973 "ZA",
1974 "ZM",
1975 "ZW",
1976 "ZZ",
1977 ]
1978 ]
1979 """
1980 An array of two-letter ISO country codes representing which countries Checkout should provide as options for
1981 shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SY, UM, VI`.
1982 """
1983
1984 class ShippingCost(StripeObject):
1985 class Tax(StripeObject):
1986 amount: int
1987 """
1988 Amount of tax applied for this rate.
1989 """
1990 rate: "TaxRate"
1991 """
1992 Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
1993
1994 Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
1995 """
1996 taxability_reason: Optional[
1997 Literal[
1998 "customer_exempt",
1999 "not_collecting",
2000 "not_subject_to_tax",
2001 "not_supported",
2002 "portion_product_exempt",
2003 "portion_reduced_rated",
2004 "portion_standard_rated",
2005 "product_exempt",
2006 "product_exempt_holiday",
2007 "proportionally_rated",
2008 "reduced_rated",
2009 "reverse_charge",
2010 "standard_rated",
2011 "taxable_basis_reduced",
2012 "zero_rated",
2013 ]
2014 ]
2015 """
2016 The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
2017 """
2018 taxable_amount: Optional[int]
2019 """
2020 The amount on which tax is calculated, in cents (or local equivalent).
2021 """
2022
2023 amount_subtotal: int
2024 """
2025 Total shipping cost before any discounts or taxes are applied.
2026 """
2027 amount_tax: int
2028 """
2029 Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
2030 """
2031 amount_total: int
2032 """
2033 Total shipping cost after discounts and taxes are applied.
2034 """
2035 shipping_rate: Optional[ExpandableField["ShippingRate"]]
2036 """
2037 The ID of the ShippingRate for this order.
2038 """
2039 taxes: Optional[List[Tax]]
2040 """
2041 The taxes applied to the shipping rate.
2042 """
2043 _inner_class_types = {"taxes": Tax}
2044
2045 class ShippingOption(StripeObject):
2046 shipping_amount: int
2047 """
2048 A non-negative integer in cents representing how much to charge.
2049 """
2050 shipping_rate: ExpandableField["ShippingRate"]
2051 """
2052 The shipping rate.
2053 """
2054
2055 class TaxIdCollection(StripeObject):
2056 enabled: bool
2057 """
2058 Indicates whether tax ID collection is enabled for the session
2059 """
2060 required: Literal["if_supported", "never"]
2061 """
2062 Indicates whether a tax ID is required on the payment page
2063 """
2064
2065 class TotalDetails(StripeObject):
2066 class Breakdown(StripeObject):
2067 class Discount(StripeObject):
2068 amount: int
2069 """
2070 The amount discounted.
2071 """
2072 discount: "DiscountResource"
2073 """
2074 A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes).
2075 It contains information about when the discount began, when it will end, and what it is applied to.
2076
2077 Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts)
2078 """
2079
2080 class Tax(StripeObject):
2081 amount: int
2082 """
2083 Amount of tax applied for this rate.
2084 """
2085 rate: "TaxRate"
2086 """
2087 Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
2088
2089 Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
2090 """
2091 taxability_reason: Optional[
2092 Literal[
2093 "customer_exempt",
2094 "not_collecting",
2095 "not_subject_to_tax",
2096 "not_supported",
2097 "portion_product_exempt",
2098 "portion_reduced_rated",
2099 "portion_standard_rated",
2100 "product_exempt",
2101 "product_exempt_holiday",
2102 "proportionally_rated",
2103 "reduced_rated",
2104 "reverse_charge",
2105 "standard_rated",
2106 "taxable_basis_reduced",
2107 "zero_rated",
2108 ]
2109 ]
2110 """
2111 The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
2112 """
2113 taxable_amount: Optional[int]
2114 """
2115 The amount on which tax is calculated, in cents (or local equivalent).
2116 """
2117
2118 discounts: List[Discount]
2119 """
2120 The aggregated discounts.
2121 """
2122 taxes: List[Tax]
2123 """
2124 The aggregated tax amounts by rate.
2125 """
2126 _inner_class_types = {"discounts": Discount, "taxes": Tax}
2127
2128 amount_discount: int
2129 """
2130 This is the sum of all the discounts.
2131 """
2132 amount_shipping: Optional[int]
2133 """
2134 This is the sum of all the shipping amounts.
2135 """
2136 amount_tax: int
2137 """
2138 This is the sum of all the tax amounts.
2139 """
2140 breakdown: Optional[Breakdown]
2141 _inner_class_types = {"breakdown": Breakdown}
2142
2143 class WalletOptions(StripeObject):
2144 class Link(StripeObject):
2145 display: Optional[Literal["auto", "never"]]
2146 """
2147 Describes whether Checkout should display Link. Defaults to `auto`.
2148 """
2149
2150 link: Optional[Link]
2151 _inner_class_types = {"link": Link}
2152
2153 adaptive_pricing: Optional[AdaptivePricing]
2154 """
2155 Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
2156 """
2157 after_expiration: Optional[AfterExpiration]
2158 """
2159 When set, provides configuration for actions to take if this Checkout Session expires.
2160 """
2161 allow_promotion_codes: Optional[bool]
2162 """
2163 Enables user redeemable promotion codes.
2164 """
2165 amount_subtotal: Optional[int]
2166 """
2167 Total of all items before discounts or taxes are applied.
2168 """
2169 amount_total: Optional[int]
2170 """
2171 Total of all items after discounts and taxes are applied.
2172 """
2173 automatic_tax: AutomaticTax
2174 billing_address_collection: Optional[Literal["auto", "required"]]
2175 """
2176 Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.
2177 """
2178 branding_settings: Optional[BrandingSettings]
2179 cancel_url: Optional[str]
2180 """
2181 If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
2182 """
2183 client_reference_id: Optional[str]
2184 """
2185 A unique string to reference the Checkout Session. This can be a
2186 customer ID, a cart ID, or similar, and can be used to reconcile the
2187 Session with your internal systems.
2188 """
2189 client_secret: Optional[str]
2190 """
2191 The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. For `ui_mode: embedded`, the client secret is to be used when initializing Stripe.js embedded checkout.
2192 For `ui_mode: custom`, use the client secret with [initCheckout](https://docs.stripe.com/js/custom_checkout/init) on your front end.
2193 """
2194 collected_information: Optional[CollectedInformation]
2195 """
2196 Information about the customer collected within the Checkout Session.
2197 """
2198 consent: Optional[Consent]
2199 """
2200 Results of `consent_collection` for this session.
2201 """
2202 consent_collection: Optional[ConsentCollection]
2203 """
2204 When set, provides configuration for the Checkout Session to gather active consent from customers.
2205 """
2206 created: int
2207 """
2208 Time at which the object was created. Measured in seconds since the Unix epoch.
2209 """
2210 currency: Optional[str]
2211 """
2212 Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
2213 """
2214 currency_conversion: Optional[CurrencyConversion]
2215 """
2216 Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31.
2217 """
2218 custom_fields: List[CustomField]
2219 """
2220 Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`.
2221 """
2222 custom_text: CustomText
2223 customer: Optional[ExpandableField["Customer"]]
2224 """
2225 The ID of the customer for this Session.
2226 For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout
2227 will create a new customer object based on information provided
2228 during the payment flow unless an existing customer was provided when
2229 the Session was created.
2230 """
2231 customer_account: Optional[str]
2232 """
2233 The ID of the account for this Session.
2234 """
2235 customer_creation: Optional[Literal["always", "if_required"]]
2236 """
2237 Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
2238 """
2239 customer_details: Optional[CustomerDetails]
2240 """
2241 The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode.
2242 """
2243 customer_email: Optional[str]
2244 """
2245 If provided, this value will be used when the Customer object is created.
2246 If not provided, customers will be asked to enter their email address.
2247 Use this parameter to prefill customer data if you already have an email
2248 on file. To access information about the customer once the payment flow is
2249 complete, use the `customer` attribute.
2250 """
2251 discounts: Optional[List[Discount]]
2252 """
2253 List of coupons and promotion codes attached to the Checkout Session.
2254 """
2255 excluded_payment_method_types: Optional[List[str]]
2256 """
2257 A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
2258 """
2259 expires_at: int
2260 """
2261 The timestamp at which the Checkout Session will expire.
2262 """
2263 id: str
2264 """
2265 Unique identifier for the object.
2266 """
2267 invoice: Optional[ExpandableField["Invoice"]]
2268 """
2269 ID of the invoice created by the Checkout Session, if it exists.
2270 """
2271 invoice_creation: Optional[InvoiceCreation]
2272 """
2273 Details on the state of invoice creation for the Checkout Session.
2274 """
2275 line_items: Optional[ListObject["LineItem"]]
2276 """
2277 The line items purchased by the customer.
2278 """
2279 livemode: bool
2280 """
2281 Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
2282 """
2283 locale: Optional[
2284 Literal[
2285 "auto",
2286 "bg",
2287 "cs",
2288 "da",
2289 "de",
2290 "el",
2291 "en",
2292 "en-GB",
2293 "es",
2294 "es-419",
2295 "et",
2296 "fi",
2297 "fil",
2298 "fr",
2299 "fr-CA",
2300 "hr",
2301 "hu",
2302 "id",
2303 "it",
2304 "ja",
2305 "ko",
2306 "lt",
2307 "lv",
2308 "ms",
2309 "mt",
2310 "nb",
2311 "nl",
2312 "pl",
2313 "pt",
2314 "pt-BR",
2315 "ro",
2316 "ru",
2317 "sk",
2318 "sl",
2319 "sv",
2320 "th",
2321 "tr",
2322 "vi",
2323 "zh",
2324 "zh-HK",
2325 "zh-TW",
2326 ]
2327 ]
2328 """
2329 The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
2330 """
2331 metadata: Optional[Dict[str, str]]
2332 """
2333 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
2334 """
2335 mode: Literal["payment", "setup", "subscription"]
2336 """
2337 The mode of the Checkout Session.
2338 """
2339 name_collection: Optional[NameCollection]
2340 object: Literal["checkout.session"]
2341 """
2342 String representing the object's type. Objects of the same type share the same value.
2343 """
2344 optional_items: Optional[List[OptionalItem]]
2345 """
2346 The optional items presented to the customer at checkout.
2347 """
2348 origin_context: Optional[Literal["mobile_app", "web"]]
2349 """
2350 Where the user is coming from. This informs the optimizations that are applied to the session.
2351 """
2352 payment_intent: Optional[ExpandableField["PaymentIntent"]]
2353 """
2354 The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead.
2355 """
2356 payment_link: Optional[ExpandableField["PaymentLink"]]
2357 """
2358 The ID of the Payment Link that created this Session.
2359 """
2360 payment_method_collection: Optional[Literal["always", "if_required"]]
2361 """
2362 Configure whether a Checkout Session should collect a payment method. Defaults to `always`.
2363 """
2364 payment_method_configuration_details: Optional[
2365 PaymentMethodConfigurationDetails
2366 ]
2367 """
2368 Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
2369 """
2370 payment_method_options: Optional[PaymentMethodOptions]
2371 """
2372 Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
2373 """
2374 payment_method_types: List[str]
2375 """
2376 A list of the types of payment methods (e.g. card) this Checkout
2377 Session is allowed to accept.
2378 """
2379 payment_status: Literal["no_payment_required", "paid", "unpaid"]
2380 """
2381 The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.
2382 You can use this value to decide when to fulfill your customer's order.
2383 """
2384 permissions: Optional[Permissions]
2385 """
2386 This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
2387
2388 For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
2389 """
2390 phone_number_collection: Optional[PhoneNumberCollection]
2391 presentment_details: Optional[PresentmentDetails]
2392 recovered_from: Optional[str]
2393 """
2394 The ID of the original expired Checkout Session that triggered the recovery flow.
2395 """
2396 redirect_on_completion: Optional[Literal["always", "if_required", "never"]]
2397 """
2398 This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
2399 """
2400 return_url: Optional[str]
2401 """
2402 Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
2403 """
2404 saved_payment_method_options: Optional[SavedPaymentMethodOptions]
2405 """
2406 Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
2407 """
2408 setup_intent: Optional[ExpandableField["SetupIntent"]]
2409 """
2410 The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead.
2411 """
2412 shipping_address_collection: Optional[ShippingAddressCollection]
2413 """
2414 When set, provides configuration for Checkout to collect a shipping address from a customer.
2415 """
2416 shipping_cost: Optional[ShippingCost]
2417 """
2418 The details of the customer cost of shipping, including the customer chosen ShippingRate.
2419 """
2420 shipping_options: List[ShippingOption]
2421 """
2422 The shipping rate options applied to this Session.
2423 """
2424 status: Optional[Literal["complete", "expired", "open"]]
2425 """
2426 The status of the Checkout Session, one of `open`, `complete`, or `expired`.
2427 """
2428 submit_type: Optional[
2429 Literal["auto", "book", "donate", "pay", "subscribe"]
2430 ]
2431 """
2432 Describes the type of transaction being performed by Checkout in order to customize
2433 relevant text on the page, such as the submit button. `submit_type` can only be
2434 specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
2435 """
2436 subscription: Optional[ExpandableField["Subscription"]]
2437 """
2438 The ID of the [Subscription](https://docs.stripe.com/api/subscriptions) for Checkout Sessions in `subscription` mode.
2439 """
2440 success_url: Optional[str]
2441 """
2442 The URL the customer will be directed to after the payment or
2443 subscription creation is successful.
2444 """
2445 tax_id_collection: Optional[TaxIdCollection]
2446 total_details: Optional[TotalDetails]
2447 """
2448 Tax and discount details for the computed total amount.
2449 """
2450 ui_mode: Optional[Literal["custom", "embedded", "hosted"]]
2451 """
2452 The UI mode of the Session. Defaults to `hosted`.
2453 """
2454 url: Optional[str]
2455 """
2456 The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://docs.stripe.com/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.`
2457 This value is only present when the session is active.
2458 """
2459 wallet_options: Optional[WalletOptions]
2460 """
2461 Wallet-specific configuration for this Checkout Session.
2462 """
2463
2464 @classmethod
2465 def create(cls, **params: Unpack["SessionCreateParams"]) -> "Session":
2466 """
2467 Creates a Checkout Session object.
2468 """
2469 return cast(
2470 "Session",
2471 cls._static_request(
2472 "post",
2473 cls.class_url(),
2474 params=params,
2475 ),
2476 )
2477
2478 @classmethod
2479 async def create_async(
2480 cls, **params: Unpack["SessionCreateParams"]
2481 ) -> "Session":
2482 """
2483 Creates a Checkout Session object.
2484 """
2485 return cast(
2486 "Session",
2487 await cls._static_request_async(
2488 "post",
2489 cls.class_url(),
2490 params=params,
2491 ),
2492 )
2493
2494 @classmethod
2495 def _cls_expire(
2496 cls, session: str, **params: Unpack["SessionExpireParams"]
2497 ) -> "Session":
2498 """
2499 A Checkout Session can be expired when it is in one of these statuses: open
2500
2501 After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
2502 """
2503 return cast(
2504 "Session",
2505 cls._static_request(
2506 "post",
2507 "/v1/checkout/sessions/{session}/expire".format(
2508 session=sanitize_id(session)
2509 ),
2510 params=params,
2511 ),
2512 )
2513
2514 @overload
2515 @staticmethod
2516 def expire(
2517 session: str, **params: Unpack["SessionExpireParams"]
2518 ) -> "Session":
2519 """
2520 A Checkout Session can be expired when it is in one of these statuses: open
2521
2522 After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
2523 """
2524 ...
2525
2526 @overload
2527 def expire(self, **params: Unpack["SessionExpireParams"]) -> "Session":
2528 """
2529 A Checkout Session can be expired when it is in one of these statuses: open
2530
2531 After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
2532 """
2533 ...
2534
2535 @class_method_variant("_cls_expire")
2536 def expire( # pyright: ignore[reportGeneralTypeIssues]
2537 self, **params: Unpack["SessionExpireParams"]
2538 ) -> "Session":
2539 """
2540 A Checkout Session can be expired when it is in one of these statuses: open
2541
2542 After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
2543 """
2544 return cast(
2545 "Session",
2546 self._request(
2547 "post",
2548 "/v1/checkout/sessions/{session}/expire".format(
2549 session=sanitize_id(self.get("id"))
2550 ),
2551 params=params,
2552 ),
2553 )
2554
2555 @classmethod
2556 async def _cls_expire_async(
2557 cls, session: str, **params: Unpack["SessionExpireParams"]
2558 ) -> "Session":
2559 """
2560 A Checkout Session can be expired when it is in one of these statuses: open
2561
2562 After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
2563 """
2564 return cast(
2565 "Session",
2566 await cls._static_request_async(
2567 "post",
2568 "/v1/checkout/sessions/{session}/expire".format(
2569 session=sanitize_id(session)
2570 ),
2571 params=params,
2572 ),
2573 )
2574
2575 @overload
2576 @staticmethod
2577 async def expire_async(
2578 session: str, **params: Unpack["SessionExpireParams"]
2579 ) -> "Session":
2580 """
2581 A Checkout Session can be expired when it is in one of these statuses: open
2582
2583 After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
2584 """
2585 ...
2586
2587 @overload
2588 async def expire_async(
2589 self, **params: Unpack["SessionExpireParams"]
2590 ) -> "Session":
2591 """
2592 A Checkout Session can be expired when it is in one of these statuses: open
2593
2594 After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
2595 """
2596 ...
2597
2598 @class_method_variant("_cls_expire_async")
2599 async def expire_async( # pyright: ignore[reportGeneralTypeIssues]
2600 self, **params: Unpack["SessionExpireParams"]
2601 ) -> "Session":
2602 """
2603 A Checkout Session can be expired when it is in one of these statuses: open
2604
2605 After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
2606 """
2607 return cast(
2608 "Session",
2609 await self._request_async(
2610 "post",
2611 "/v1/checkout/sessions/{session}/expire".format(
2612 session=sanitize_id(self.get("id"))
2613 ),
2614 params=params,
2615 ),
2616 )
2617
2618 @classmethod
2619 def list(
2620 cls, **params: Unpack["SessionListParams"]
2621 ) -> ListObject["Session"]:
2622 """
2623 Returns a list of Checkout Sessions.
2624 """
2625 result = cls._static_request(
2626 "get",
2627 cls.class_url(),
2628 params=params,
2629 )
2630 if not isinstance(result, ListObject):
2631 raise TypeError(
2632 "Expected list object from API, got %s"
2633 % (type(result).__name__)
2634 )
2635
2636 return result
2637
2638 @classmethod
2639 async def list_async(
2640 cls, **params: Unpack["SessionListParams"]
2641 ) -> ListObject["Session"]:
2642 """
2643 Returns a list of Checkout Sessions.
2644 """
2645 result = await cls._static_request_async(
2646 "get",
2647 cls.class_url(),
2648 params=params,
2649 )
2650 if not isinstance(result, ListObject):
2651 raise TypeError(
2652 "Expected list object from API, got %s"
2653 % (type(result).__name__)
2654 )
2655
2656 return result
2657
2658 @classmethod
2659 def _cls_list_line_items(
2660 cls, session: str, **params: Unpack["SessionListLineItemsParams"]
2661 ) -> ListObject["LineItem"]:
2662 """
2663 When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2664 """
2665 return cast(
2666 ListObject["LineItem"],
2667 cls._static_request(
2668 "get",
2669 "/v1/checkout/sessions/{session}/line_items".format(
2670 session=sanitize_id(session)
2671 ),
2672 params=params,
2673 ),
2674 )
2675
2676 @overload
2677 @staticmethod
2678 def list_line_items(
2679 session: str, **params: Unpack["SessionListLineItemsParams"]
2680 ) -> ListObject["LineItem"]:
2681 """
2682 When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2683 """
2684 ...
2685
2686 @overload
2687 def list_line_items(
2688 self, **params: Unpack["SessionListLineItemsParams"]
2689 ) -> ListObject["LineItem"]:
2690 """
2691 When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2692 """
2693 ...
2694
2695 @class_method_variant("_cls_list_line_items")
2696 def list_line_items( # pyright: ignore[reportGeneralTypeIssues]
2697 self, **params: Unpack["SessionListLineItemsParams"]
2698 ) -> ListObject["LineItem"]:
2699 """
2700 When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2701 """
2702 return cast(
2703 ListObject["LineItem"],
2704 self._request(
2705 "get",
2706 "/v1/checkout/sessions/{session}/line_items".format(
2707 session=sanitize_id(self.get("id"))
2708 ),
2709 params=params,
2710 ),
2711 )
2712
2713 @classmethod
2714 async def _cls_list_line_items_async(
2715 cls, session: str, **params: Unpack["SessionListLineItemsParams"]
2716 ) -> ListObject["LineItem"]:
2717 """
2718 When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2719 """
2720 return cast(
2721 ListObject["LineItem"],
2722 await cls._static_request_async(
2723 "get",
2724 "/v1/checkout/sessions/{session}/line_items".format(
2725 session=sanitize_id(session)
2726 ),
2727 params=params,
2728 ),
2729 )
2730
2731 @overload
2732 @staticmethod
2733 async def list_line_items_async(
2734 session: str, **params: Unpack["SessionListLineItemsParams"]
2735 ) -> ListObject["LineItem"]:
2736 """
2737 When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2738 """
2739 ...
2740
2741 @overload
2742 async def list_line_items_async(
2743 self, **params: Unpack["SessionListLineItemsParams"]
2744 ) -> ListObject["LineItem"]:
2745 """
2746 When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2747 """
2748 ...
2749
2750 @class_method_variant("_cls_list_line_items_async")
2751 async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues]
2752 self, **params: Unpack["SessionListLineItemsParams"]
2753 ) -> ListObject["LineItem"]:
2754 """
2755 When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
2756 """
2757 return cast(
2758 ListObject["LineItem"],
2759 await self._request_async(
2760 "get",
2761 "/v1/checkout/sessions/{session}/line_items".format(
2762 session=sanitize_id(self.get("id"))
2763 ),
2764 params=params,
2765 ),
2766 )
2767
2768 @classmethod
2769 def modify(
2770 cls, id: str, **params: Unpack["SessionModifyParams"]
2771 ) -> "Session":
2772 """
2773 Updates a Checkout Session object.
2774
2775 Related guide: [Dynamically update a Checkout Session](https://docs.stripe.com/payments/advanced/dynamic-updates)
2776 """
2777 url = "%s/%s" % (cls.class_url(), sanitize_id(id))
2778 return cast(
2779 "Session",
2780 cls._static_request(
2781 "post",
2782 url,
2783 params=params,
2784 ),
2785 )
2786
2787 @classmethod
2788 async def modify_async(
2789 cls, id: str, **params: Unpack["SessionModifyParams"]
2790 ) -> "Session":
2791 """
2792 Updates a Checkout Session object.
2793
2794 Related guide: [Dynamically update a Checkout Session](https://docs.stripe.com/payments/advanced/dynamic-updates)
2795 """
2796 url = "%s/%s" % (cls.class_url(), sanitize_id(id))
2797 return cast(
2798 "Session",
2799 await cls._static_request_async(
2800 "post",
2801 url,
2802 params=params,
2803 ),
2804 )
2805
2806 @classmethod
2807 def retrieve(
2808 cls, id: str, **params: Unpack["SessionRetrieveParams"]
2809 ) -> "Session":
2810 """
2811 Retrieves a Checkout Session object.
2812 """
2813 instance = cls(id, **params)
2814 instance.refresh()
2815 return instance
2816
2817 @classmethod
2818 async def retrieve_async(
2819 cls, id: str, **params: Unpack["SessionRetrieveParams"]
2820 ) -> "Session":
2821 """
2822 Retrieves a Checkout Session object.
2823 """
2824 instance = cls(id, **params)
2825 await instance.refresh_async()
2826 return instance
2827
2828 _inner_class_types = {
2829 "adaptive_pricing": AdaptivePricing,
2830 "after_expiration": AfterExpiration,
2831 "automatic_tax": AutomaticTax,
2832 "branding_settings": BrandingSettings,
2833 "collected_information": CollectedInformation,
2834 "consent": Consent,
2835 "consent_collection": ConsentCollection,
2836 "currency_conversion": CurrencyConversion,
2837 "custom_fields": CustomField,
2838 "custom_text": CustomText,
2839 "customer_details": CustomerDetails,
2840 "discounts": Discount,
2841 "invoice_creation": InvoiceCreation,
2842 "name_collection": NameCollection,
2843 "optional_items": OptionalItem,
2844 "payment_method_configuration_details": PaymentMethodConfigurationDetails,
2845 "payment_method_options": PaymentMethodOptions,
2846 "permissions": Permissions,
2847 "phone_number_collection": PhoneNumberCollection,
2848 "presentment_details": PresentmentDetails,
2849 "saved_payment_method_options": SavedPaymentMethodOptions,
2850 "shipping_address_collection": ShippingAddressCollection,
2851 "shipping_cost": ShippingCost,
2852 "shipping_options": ShippingOption,
2853 "tax_id_collection": TaxIdCollection,
2854 "total_details": TotalDetails,
2855 "wallet_options": WalletOptions,
2856 }