# `Stripe.Checkout.Session`
[🔗](https://github.com/code-corps/stripity_stripe/blob/v3.3.3/lib/generated/checkout__session.ex#L1)

A Checkout Session represents your customer's session as they pay for
one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout)
or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a
new Session each time your customer attempts to pay.

Once payment is successful, the Checkout Session will contain a reference
to the [Customer](https://stripe.com/docs/api/customers), and either the successful
[PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active
[Subscription](https://stripe.com/docs/api/subscriptions).

You can create a Checkout Session on your server and redirect to its URL
to begin Checkout.

Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart)

# `acss_debit`

```elixir
@type acss_debit() :: %{
  optional(:currency) =&gt; :cad | :usd,
  optional(:mandate_options) =&gt; mandate_options(),
  optional(:setup_future_usage) =&gt; :none | :off_session | :on_session,
  optional(:target_date) =&gt; binary(),
  optional(:verification_method) =&gt; :automatic | :instant | :microdeposits
}
```

contains details about the ACSS Debit payment method options.

# `adaptive_pricing`

```elixir
@type adaptive_pricing() :: %{optional(:enabled) =&gt; boolean()}
```

Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).

# `address`

```elixir
@type address() :: %{
  optional(:city) =&gt; binary(),
  optional(:country) =&gt; binary(),
  optional(:line1) =&gt; binary(),
  optional(:line2) =&gt; binary(),
  optional(:postal_code) =&gt; binary(),
  optional(:state) =&gt; binary()
}
```

Shipping address.

# `adjustable_quantity`

```elixir
@type adjustable_quantity() :: %{
  optional(:enabled) =&gt; boolean(),
  optional(:maximum) =&gt; integer(),
  optional(:minimum) =&gt; integer()
}
```

When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.

# `affirm`

```elixir
@type affirm() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none
}
```

contains details about the Affirm payment method options.

# `after_expiration`

```elixir
@type after_expiration() :: %{optional(:recovery) =&gt; recovery()}
```

Configure actions after a Checkout Session has expired.

# `after_submit`

```elixir
@type after_submit() :: %{optional(:message) =&gt; binary()}
```

# `afterpay_clearpay`

```elixir
@type afterpay_clearpay() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none
}
```

contains details about the Afterpay Clearpay payment method options.

# `alipay`

```elixir
@type alipay() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the Alipay payment method options.

# `alma`

```elixir
@type alma() :: %{optional(:capture_method) =&gt; :manual}
```

contains details about the Alma payment method options.

# `amazon_pay`

```elixir
@type amazon_pay() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none | :off_session
}
```

contains details about the AmazonPay payment method options.

# `au_becs_debit`

```elixir
@type au_becs_debit() :: %{
  optional(:setup_future_usage) =&gt; :none,
  optional(:target_date) =&gt; binary()
}
```

contains details about the AU Becs Debit payment method options.

# `automatic_tax`

```elixir
@type automatic_tax() :: %{
  optional(:enabled) =&gt; boolean(),
  optional(:liability) =&gt; liability()
}
```

Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.

# `bacs_debit`

```elixir
@type bacs_debit() :: %{
  optional(:mandate_options) =&gt; mandate_options(),
  optional(:setup_future_usage) =&gt; :none | :off_session | :on_session,
  optional(:target_date) =&gt; binary()
}
```

contains details about the Bacs Debit payment method options.

# `bancontact`

```elixir
@type bancontact() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the Bancontact payment method options.

# `bank_transfer`

```elixir
@type bank_transfer() :: %{
  optional(:eu_bank_transfer) =&gt; eu_bank_transfer(),
  optional(:requested_address_types) =&gt; [
    :aba | :iban | :sepa | :sort_code | :spei | :swift | :zengin
  ],
  optional(:type) =&gt;
    :eu_bank_transfer
    | :gb_bank_transfer
    | :jp_bank_transfer
    | :mx_bank_transfer
    | :us_bank_transfer
}
```

Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.

# `billie`

```elixir
@type billie() :: %{optional(:capture_method) =&gt; :manual}
```

contains details about the Billie payment method options.

# `billing_mode`

```elixir
@type billing_mode() :: %{
  optional(:flexible) =&gt; flexible(),
  optional(:type) =&gt; :classic | :flexible
}
```

Controls how prorations and invoices for subscriptions are calculated and orchestrated.

# `boleto`

```elixir
@type boleto() :: %{
  optional(:expires_after_days) =&gt; integer(),
  optional(:setup_future_usage) =&gt; :none | :off_session | :on_session
}
```

contains details about the Boleto payment method options.

# `branding_settings`

```elixir
@type branding_settings() :: %{
  optional(:background_color) =&gt; binary() | binary(),
  optional(:border_style) =&gt; :pill | :rectangular | :rounded,
  optional(:button_color) =&gt; binary() | binary(),
  optional(:display_name) =&gt; binary(),
  optional(:font_family) =&gt;
    :be_vietnam_pro
    | :bitter
    | :chakra_petch
    | :default
    | :hahmlet
    | :inconsolata
    | :inter
    | :lato
    | :lora
    | :m_plus_1_code
    | :montserrat
    | :noto_sans
    | :noto_sans_jp
    | :noto_serif
    | :nunito
    | :open_sans
    | :pridi
    | :pt_sans
    | :pt_serif
    | :raleway
    | :roboto
    | :roboto_slab
    | :source_sans_pro
    | :titillium_web
    | :ubuntu_mono
    | :zen_maru_gothic,
  optional(:icon) =&gt; icon(),
  optional(:logo) =&gt; logo()
}
```

The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is `custom`.

# `business`

```elixir
@type business() :: %{
  optional(:enabled) =&gt; boolean(),
  optional(:optional) =&gt; boolean()
}
```

Controls settings applied for collecting the customer's business name on the session.

# `card`

```elixir
@type card() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:installments) =&gt; installments(),
  optional(:request_extended_authorization) =&gt; :if_available | :never,
  optional(:request_incremental_authorization) =&gt; :if_available | :never,
  optional(:request_multicapture) =&gt; :if_available | :never,
  optional(:request_overcapture) =&gt; :if_available | :never,
  optional(:request_three_d_secure) =&gt; :any | :automatic | :challenge,
  optional(:restrictions) =&gt; restrictions(),
  optional(:setup_future_usage) =&gt; :off_session | :on_session,
  optional(:statement_descriptor_suffix_kana) =&gt; binary(),
  optional(:statement_descriptor_suffix_kanji) =&gt; binary()
}
```

contains details about the Card payment method options.

# `cashapp`

```elixir
@type cashapp() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none | :off_session | :on_session
}
```

contains details about the Cashapp Pay payment method options.

# `collected_information`

```elixir
@type collected_information() :: %{optional(:shipping_details) =&gt; shipping_details()}
```

Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions.

# `consent_collection`

```elixir
@type consent_collection() :: %{
  optional(:payment_method_reuse_agreement) =&gt; payment_method_reuse_agreement(),
  optional(:promotions) =&gt; :auto | :none,
  optional(:terms_of_service) =&gt; :none | :required
}
```

Configure fields for the Checkout Session to gather active consent from customers.

# `created`

```elixir
@type created() :: %{
  optional(:gt) =&gt; integer(),
  optional(:gte) =&gt; integer(),
  optional(:lt) =&gt; integer(),
  optional(:lte) =&gt; integer()
}
```

# `custom_fields`

```elixir
@type custom_fields() :: %{
  optional(:dropdown) =&gt; dropdown(),
  optional(:key) =&gt; binary(),
  optional(:label) =&gt; label(),
  optional(:numeric) =&gt; numeric(),
  optional(:optional) =&gt; boolean(),
  optional(:text) =&gt; text(),
  optional(:type) =&gt; :dropdown | :numeric | :text
}
```

# `custom_text`

```elixir
@type custom_text() :: %{
  optional(:after_submit) =&gt; after_submit() | binary(),
  optional(:shipping_address) =&gt; shipping_address() | binary(),
  optional(:submit) =&gt; submit() | binary(),
  optional(:terms_of_service_acceptance) =&gt;
    terms_of_service_acceptance() | binary()
}
```

Display additional text for your customers using custom text.

# `customer_balance`

```elixir
@type customer_balance() :: %{
  optional(:bank_transfer) =&gt; bank_transfer(),
  optional(:funding_type) =&gt; :bank_transfer,
  optional(:setup_future_usage) =&gt; :none
}
```

contains details about the Customer Balance payment method options.

# `customer_details`

```elixir
@type customer_details() :: %{optional(:email) =&gt; binary()}
```

# `customer_update`

```elixir
@type customer_update() :: %{
  optional(:address) =&gt; :auto | :never,
  optional(:name) =&gt; :auto | :never,
  optional(:shipping) =&gt; :auto | :never
}
```

Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.

# `delivery_estimate`

```elixir
@type delivery_estimate() :: %{
  optional(:maximum) =&gt; maximum(),
  optional(:minimum) =&gt; minimum()
}
```

The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.

# `demo_pay`

```elixir
@type demo_pay() :: %{optional(:setup_future_usage) =&gt; :none | :off_session}
```

contains details about the DemoPay payment method options.

# `discounts`

```elixir
@type discounts() :: %{
  optional(:coupon) =&gt; binary(),
  optional(:promotion_code) =&gt; binary()
}
```

# `dropdown`

```elixir
@type dropdown() :: %{
  optional(:default_value) =&gt; binary(),
  optional(:options) =&gt; [options()]
}
```

Configuration for `type=dropdown` fields.

# `end_behavior`

```elixir
@type end_behavior() :: %{
  optional(:missing_payment_method) =&gt; :cancel | :create_invoice | :pause
}
```

Defines how the subscription should behave when the user's free trial ends.

# `eps`

```elixir
@type eps() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the EPS payment method options.

# `eu_bank_transfer`

```elixir
@type eu_bank_transfer() :: %{optional(:country) =&gt; binary()}
```

Configuration for eu_bank_transfer funding type.

# `financial_connections`

```elixir
@type financial_connections() :: %{
  optional(:permissions) =&gt; [
    :balances | :ownership | :payment_method | :transactions
  ],
  optional(:prefetch) =&gt; [:balances | :ownership | :transactions]
}
```

Additional fields for Financial Connections Session creation

# `fixed_amount`

```elixir
@type fixed_amount() :: %{
  optional(:amount) =&gt; integer(),
  optional(:currency) =&gt; binary(),
  optional(:currency_options) =&gt; map()
}
```

Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.

# `flexible`

```elixir
@type flexible() :: %{optional(:proration_discounts) =&gt; :included | :itemized}
```

Configure behavior for flexible billing mode.

# `fpx`

```elixir
@type fpx() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the FPX payment method options.

# `giropay`

```elixir
@type giropay() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the Giropay payment method options.

# `grabpay`

```elixir
@type grabpay() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the Grabpay payment method options.

# `icon`

```elixir
@type icon() :: %{
  optional(:file) =&gt; binary(),
  optional(:type) =&gt; :file | :url,
  optional(:url) =&gt; binary()
}
```

The icon for the Checkout Session. For best results, use a square image.

# `ideal`

```elixir
@type ideal() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the Ideal payment method options.

# `individual`

```elixir
@type individual() :: %{
  optional(:enabled) =&gt; boolean(),
  optional(:optional) =&gt; boolean()
}
```

Controls settings applied for collecting the customer's individual name on the session.

# `installments`

```elixir
@type installments() :: %{optional(:enabled) =&gt; boolean()}
```

Installment options for card payments

# `invoice_creation`

```elixir
@type invoice_creation() :: %{
  optional(:enabled) =&gt; boolean(),
  optional(:invoice_data) =&gt; invoice_data()
}
```

Generate a post-purchase Invoice for one-time payments.

# `invoice_data`

```elixir
@type invoice_data() :: %{
  optional(:account_tax_ids) =&gt; [binary()] | binary(),
  optional(:custom_fields) =&gt; [custom_fields()] | binary(),
  optional(:description) =&gt; binary(),
  optional(:footer) =&gt; binary(),
  optional(:issuer) =&gt; issuer(),
  optional(:metadata) =&gt; %{optional(binary()) =&gt; binary()},
  optional(:rendering_options) =&gt; rendering_options() | binary()
}
```

Parameters passed when creating invoices for payment-mode Checkout Sessions.

# `invoice_settings`

```elixir
@type invoice_settings() :: %{optional(:issuer) =&gt; issuer()}
```

All invoices will be billed using the specified settings.

# `issuer`

```elixir
@type issuer() :: %{
  optional(:account) =&gt; binary(),
  optional(:type) =&gt; :account | :self
}
```

The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.

# `kakao_pay`

```elixir
@type kakao_pay() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none | :off_session
}
```

contains details about the Kakao Pay payment method options.

# `klarna`

```elixir
@type klarna() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none,
  optional(:subscriptions) =&gt; [subscriptions()] | binary()
}
```

contains details about the Klarna payment method options.

# `konbini`

```elixir
@type konbini() :: %{
  optional(:expires_after_days) =&gt; integer(),
  optional(:setup_future_usage) =&gt; :none
}
```

contains details about the Konbini payment method options.

# `kr_card`

```elixir
@type kr_card() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none | :off_session
}
```

contains details about the Korean card payment method options.

# `label`

```elixir
@type label() :: %{optional(:custom) =&gt; binary(), optional(:type) =&gt; :custom}
```

The label for the field, displayed to the customer.

# `liability`

```elixir
@type liability() :: %{
  optional(:account) =&gt; binary(),
  optional(:type) =&gt; :account | :self
}
```

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.

# `line_items`

```elixir
@type line_items() :: %{
  optional(:adjustable_quantity) =&gt; adjustable_quantity(),
  optional(:dynamic_tax_rates) =&gt; [binary()],
  optional(:price) =&gt; binary(),
  optional(:price_data) =&gt; price_data(),
  optional(:quantity) =&gt; integer(),
  optional(:tax_rates) =&gt; [binary()]
}
```

# `link`

```elixir
@type link() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none | :off_session
}
```

contains details about the Link payment method options.

# `logo`

```elixir
@type logo() :: %{
  optional(:file) =&gt; binary(),
  optional(:type) =&gt; :file | :url,
  optional(:url) =&gt; binary()
}
```

The logo for the Checkout Session.

# `mandate_options`

```elixir
@type mandate_options() :: %{
  optional(:custom_mandate_url) =&gt; binary() | binary(),
  optional(:default_for) =&gt; [:invoice | :subscription],
  optional(:interval_description) =&gt; binary(),
  optional(:payment_schedule) =&gt; :combined | :interval | :sporadic,
  optional(:transaction_type) =&gt; :business | :personal
}
```

Additional fields for Mandate creation

# `maximum`

```elixir
@type maximum() :: %{
  optional(:unit) =&gt; :business_day | :day | :hour | :month | :week,
  optional(:value) =&gt; integer()
}
```

The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.

# `minimum`

```elixir
@type minimum() :: %{
  optional(:unit) =&gt; :business_day | :day | :hour | :month | :week,
  optional(:value) =&gt; integer()
}
```

The lower bound of the estimated range. If empty, represents no lower bound.

# `mobilepay`

```elixir
@type mobilepay() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none
}
```

contains details about the Mobilepay payment method options.

# `multibanco`

```elixir
@type multibanco() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the Multibanco payment method options.

# `name_collection`

```elixir
@type name_collection() :: %{
  optional(:business) =&gt; business(),
  optional(:individual) =&gt; individual()
}
```

Controls name collection settings for the session.

You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional.

If a [Customer](https://stripe.com/docs/api/customers) is created or provided, the names can be saved to the Customer object as well.

# `naver_pay`

```elixir
@type naver_pay() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none | :off_session
}
```

contains details about the Naver Pay payment method options.

# `next_billing`

```elixir
@type next_billing() :: %{optional(:amount) =&gt; integer(), optional(:date) =&gt; binary()}
```

Describes the upcoming charge for this subscription.

# `numeric`

```elixir
@type numeric() :: %{
  optional(:default_value) =&gt; binary(),
  optional(:maximum_length) =&gt; integer(),
  optional(:minimum_length) =&gt; integer()
}
```

Configuration for `type=numeric` fields.

# `optional_items`

```elixir
@type optional_items() :: %{
  optional(:adjustable_quantity) =&gt; adjustable_quantity(),
  optional(:price) =&gt; binary(),
  optional(:quantity) =&gt; integer()
}
```

# `options`

```elixir
@type options() :: %{optional(:label) =&gt; binary(), optional(:value) =&gt; binary()}
```

# `oxxo`

```elixir
@type oxxo() :: %{
  optional(:expires_after_days) =&gt; integer(),
  optional(:setup_future_usage) =&gt; :none
}
```

contains details about the OXXO payment method options.

# `p24`

```elixir
@type p24() :: %{
  optional(:setup_future_usage) =&gt; :none,
  optional(:tos_shown_and_accepted) =&gt; boolean()
}
```

contains details about the P24 payment method options.

# `payco`

```elixir
@type payco() :: %{optional(:capture_method) =&gt; :manual}
```

contains details about the PAYCO payment method options.

# `payment_intent_data`

```elixir
@type payment_intent_data() :: %{
  optional(:application_fee_amount) =&gt; integer(),
  optional(:capture_method) =&gt; :automatic | :automatic_async | :manual,
  optional(:description) =&gt; binary(),
  optional(:metadata) =&gt; %{optional(binary()) =&gt; binary()},
  optional(:on_behalf_of) =&gt; binary(),
  optional(:receipt_email) =&gt; binary(),
  optional(:setup_future_usage) =&gt; :off_session | :on_session,
  optional(:shipping) =&gt; shipping(),
  optional(:statement_descriptor) =&gt; binary(),
  optional(:statement_descriptor_suffix) =&gt; binary(),
  optional(:transfer_data) =&gt; transfer_data(),
  optional(:transfer_group) =&gt; binary()
}
```

A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.

# `payment_method_data`

```elixir
@type payment_method_data() :: %{
  optional(:allow_redisplay) =&gt; :always | :limited | :unspecified
}
```

This parameter allows you to set some attributes on the payment method created during a Checkout session.

# `payment_method_options`

```elixir
@type payment_method_options() :: %{
  optional(:sofort) =&gt; sofort(),
  optional(:customer_balance) =&gt; customer_balance(),
  optional(:satispay) =&gt; satispay(),
  optional(:boleto) =&gt; boleto(),
  optional(:alipay) =&gt; alipay(),
  optional(:au_becs_debit) =&gt; au_becs_debit(),
  optional(:amazon_pay) =&gt; amazon_pay(),
  optional(:bancontact) =&gt; bancontact(),
  optional(:bacs_debit) =&gt; bacs_debit(),
  optional(:affirm) =&gt; affirm(),
  optional(:mobilepay) =&gt; mobilepay(),
  optional(:pay_by_bank) =&gt; map(),
  optional(:grabpay) =&gt; grabpay(),
  optional(:eps) =&gt; eps(),
  optional(:billie) =&gt; billie(),
  optional(:ideal) =&gt; ideal(),
  optional(:pix) =&gt; pix(),
  optional(:giropay) =&gt; giropay(),
  optional(:multibanco) =&gt; multibanco(),
  optional(:revolut_pay) =&gt; revolut_pay(),
  optional(:klarna) =&gt; klarna(),
  optional(:card) =&gt; card(),
  optional(:twint) =&gt; twint(),
  optional(:naver_pay) =&gt; naver_pay(),
  optional(:acss_debit) =&gt; acss_debit(),
  optional(:link) =&gt; link(),
  optional(:kr_card) =&gt; kr_card(),
  optional(:konbini) =&gt; konbini(),
  optional(:p24) =&gt; p24(),
  optional(:paypal) =&gt; paypal(),
  optional(:fpx) =&gt; fpx(),
  optional(:oxxo) =&gt; oxxo(),
  optional(:paynow) =&gt; paynow(),
  optional(:alma) =&gt; alma(),
  optional(:wechat_pay) =&gt; wechat_pay(),
  optional(:demo_pay) =&gt; demo_pay(),
  optional(:samsung_pay) =&gt; samsung_pay(),
  optional(:kakao_pay) =&gt; kakao_pay(),
  optional(:cashapp) =&gt; cashapp(),
  optional(:sepa_debit) =&gt; sepa_debit(),
  optional(:afterpay_clearpay) =&gt; afterpay_clearpay(),
  optional(:payco) =&gt; payco(),
  optional(:us_bank_account) =&gt; us_bank_account(),
  optional(:swish) =&gt; swish()
}
```

Payment-method-specific configuration.

# `payment_method_reuse_agreement`

```elixir
@type payment_method_reuse_agreement() :: %{optional(:position) =&gt; :auto | :hidden}
```

Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.

# `paynow`

```elixir
@type paynow() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the PayNow payment method options.

# `paypal`

```elixir
@type paypal() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:preferred_locale) =&gt;
    :&quot;cs-CZ&quot;
    | :&quot;da-DK&quot;
    | :&quot;de-AT&quot;
    | :&quot;de-DE&quot;
    | :&quot;de-LU&quot;
    | :&quot;el-GR&quot;
    | :&quot;en-GB&quot;
    | :&quot;en-US&quot;
    | :&quot;es-ES&quot;
    | :&quot;fi-FI&quot;
    | :&quot;fr-BE&quot;
    | :&quot;fr-FR&quot;
    | :&quot;fr-LU&quot;
    | :&quot;hu-HU&quot;
    | :&quot;it-IT&quot;
    | :&quot;nl-BE&quot;
    | :&quot;nl-NL&quot;
    | :&quot;pl-PL&quot;
    | :&quot;pt-PT&quot;
    | :&quot;sk-SK&quot;
    | :&quot;sv-SE&quot;,
  optional(:reference) =&gt; binary(),
  optional(:risk_correlation_id) =&gt; binary(),
  optional(:setup_future_usage) =&gt; :none | :off_session
}
```

contains details about the PayPal payment method options.

# `permissions`

```elixir
@type permissions() :: %{
  optional(:update_shipping_details) =&gt; :client_only | :server_only
}
```

This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions.

For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.

# `phone_number_collection`

```elixir
@type phone_number_collection() :: %{optional(:enabled) =&gt; boolean()}
```

Controls phone number collection settings for the session.

We recommend that you review your privacy policy and check with your legal contacts
before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).

# `pix`

```elixir
@type pix() :: %{
  optional(:amount_includes_iof) =&gt; :always | :never,
  optional(:expires_after_seconds) =&gt; integer(),
  optional(:setup_future_usage) =&gt; :none
}
```

contains details about the Pix payment method options.

# `price_data`

```elixir
@type price_data() :: %{
  optional(:currency) =&gt; binary(),
  optional(:product) =&gt; binary(),
  optional(:product_data) =&gt; product_data(),
  optional(:recurring) =&gt; recurring(),
  optional(:tax_behavior) =&gt; :exclusive | :inclusive | :unspecified,
  optional(:unit_amount) =&gt; integer(),
  optional(:unit_amount_decimal) =&gt; binary()
}
```

Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.

# `product_data`

```elixir
@type product_data() :: %{
  optional(:description) =&gt; binary(),
  optional(:images) =&gt; [binary()],
  optional(:metadata) =&gt; %{optional(binary()) =&gt; binary()},
  optional(:name) =&gt; binary(),
  optional(:tax_code) =&gt; binary(),
  optional(:unit_label) =&gt; binary()
}
```

Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.

# `recovery`

```elixir
@type recovery() :: %{
  optional(:allow_promotion_codes) =&gt; boolean(),
  optional(:enabled) =&gt; boolean()
}
```

Configure a Checkout Session that can be used to recover an expired session.

# `recurring`

```elixir
@type recurring() :: %{
  optional(:interval) =&gt; :day | :month | :week | :year,
  optional(:interval_count) =&gt; integer()
}
```

The recurring components of a price such as `interval` and `interval_count`.

# `rendering_options`

```elixir
@type rendering_options() :: %{
  optional(:amount_tax_display) =&gt; :exclude_tax | :include_inclusive_tax,
  optional(:template) =&gt; binary()
}
```

# `restrictions`

```elixir
@type restrictions() :: %{
  optional(:brands_blocked) =&gt; [
    :american_express | :discover_global_network | :mastercard | :visa
  ]
}
```

Restrictions to apply to the card payment method. For example, you can block specific card brands.

# `revolut_pay`

```elixir
@type revolut_pay() :: %{
  optional(:capture_method) =&gt; :manual,
  optional(:setup_future_usage) =&gt; :none | :off_session
}
```

contains details about the RevolutPay payment method options.

# `samsung_pay`

```elixir
@type samsung_pay() :: %{optional(:capture_method) =&gt; :manual}
```

contains details about the Samsung Pay payment method options.

# `satispay`

```elixir
@type satispay() :: %{optional(:capture_method) =&gt; :manual}
```

contains details about the Satispay payment method options.

# `saved_payment_method_options`

```elixir
@type saved_payment_method_options() :: %{
  optional(:allow_redisplay_filters) =&gt; [:always | :limited | :unspecified],
  optional(:payment_method_remove) =&gt; :disabled | :enabled,
  optional(:payment_method_save) =&gt; :disabled | :enabled
}
```

Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.

# `sepa_debit`

```elixir
@type sepa_debit() :: %{
  optional(:mandate_options) =&gt; mandate_options(),
  optional(:setup_future_usage) =&gt; :none | :off_session | :on_session,
  optional(:target_date) =&gt; binary()
}
```

contains details about the Sepa Debit payment method options.

# `setup_intent_data`

```elixir
@type setup_intent_data() :: %{
  optional(:description) =&gt; binary(),
  optional(:metadata) =&gt; %{optional(binary()) =&gt; binary()},
  optional(:on_behalf_of) =&gt; binary()
}
```

A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.

# `shipping`

```elixir
@type shipping() :: %{
  optional(:address) =&gt; address(),
  optional(:carrier) =&gt; binary(),
  optional(:name) =&gt; binary(),
  optional(:phone) =&gt; binary(),
  optional(:tracking_number) =&gt; binary()
}
```

Shipping information for this payment.

# `shipping_address`

```elixir
@type shipping_address() :: %{optional(:message) =&gt; binary()}
```

# `shipping_address_collection`

```elixir
@type shipping_address_collection() :: %{
  optional(:allowed_countries) =&gt; [
    :AC
    | :AD
    | :AE
    | :AF
    | :AG
    | :AI
    | :AL
    | :AM
    | :AO
    | :AQ
    | :AR
    | :AT
    | :AU
    | :AW
    | :AX
    | :AZ
    | :BA
    | :BB
    | :BD
    | :BE
    | :BF
    | :BG
    | :BH
    | :BI
    | :BJ
    | :BL
    | :BM
    | :BN
    | :BO
    | :BQ
    | :BR
    | :BS
    | :BT
    | :BV
    | :BW
    | :BY
    | :BZ
    | :CA
    | :CD
    | :CF
    | :CG
    | :CH
    | :CI
    | :CK
    | :CL
    | :CM
    | :CN
    | :CO
    | :CR
    | :CV
    | :CW
    | :CY
    | :CZ
    | :DE
    | :DJ
    | :DK
    | :DM
    | :DO
    | :DZ
    | :EC
    | :EE
    | :EG
    | :EH
    | :ER
    | :ES
    | :ET
    | :FI
    | :FJ
    | :FK
    | :FO
    | :FR
    | :GA
    | :GB
    | :GD
    | :GE
    | :GF
    | :GG
    | :GH
    | :GI
    | :GL
    | :GM
    | :GN
    | :GP
    | :GQ
    | :GR
    | :GS
    | :GT
    | :GU
    | :GW
    | :GY
    | :HK
    | :HN
    | :HR
    | :HT
    | :HU
    | :ID
    | :IE
    | :IL
    | :IM
    | :IN
    | :IO
    | :IQ
    | :IS
    | :IT
    | :JE
    | :JM
    | :JO
    | :JP
    | :KE
    | :KG
    | :KH
    | :KI
    | :KM
    | :KN
    | :KR
    | :KW
    | :KY
    | :KZ
    | :LA
    | :LB
    | :LC
    | :LI
    | :LK
    | :LR
    | :LS
    | :LT
    | :LU
    | :LV
    | :LY
    | :MA
    | :MC
    | :MD
    | :ME
    | :MF
    | :MG
    | :MK
    | :ML
    | :MM
    | :MN
    | :MO
    | :MQ
    | :MR
    | :MS
    | :MT
    | :MU
    | :MV
    | :MW
    | :MX
    | :MY
    | :MZ
    | :NA
    | :NC
    | :NE
    | :NG
    | :NI
    | :NL
    | :NO
    | :NP
    | :NR
    | :NU
    | :NZ
    | :OM
    | :PA
    | :PE
    | :PF
    | :PG
    | :PH
    | :PK
    | :PL
    | :PM
    | :PN
    | :PR
    | :PS
    | :PT
    | :PY
    | :QA
    | :RE
    | :RO
    | :RS
    | :RU
    | :RW
    | :SA
    | :SB
    | :SC
    | :SD
    | :SE
    | :SG
    | :SH
    | :SI
    | :SJ
    | :SK
    | :SL
    | :SM
    | :SN
    | :SO
    | :SR
    | :SS
    | :ST
    | :SV
    | :SX
    | :SZ
    | :TA
    | :TC
    | :TD
    | :TF
    | :TG
    | :TH
    | :TJ
    | :TK
    | :TL
    | :TM
    | :TN
    | :TO
    | :TR
    | :TT
    | :TV
    | :TW
    | :TZ
    | :UA
    | :UG
    | :US
    | :UY
    | :UZ
    | :VA
    | :VC
    | :VE
    | :VG
    | :VN
    | :VU
    | :WF
    | :WS
    | :XK
    | :YE
    | :YT
    | :ZA
    | :ZM
    | :ZW
    | :ZZ
  ]
}
```

When set, provides configuration for Checkout to collect a shipping address from a customer.

# `shipping_details`

```elixir
@type shipping_details() :: %{
  optional(:address) =&gt; address(),
  optional(:name) =&gt; binary()
}
```

The shipping details to apply to this Session.

# `shipping_options`

```elixir
@type shipping_options() :: %{
  optional(:shipping_rate) =&gt; binary(),
  optional(:shipping_rate_data) =&gt; shipping_rate_data()
}
```

# `shipping_rate_data`

```elixir
@type shipping_rate_data() :: %{
  optional(:delivery_estimate) =&gt; delivery_estimate(),
  optional(:display_name) =&gt; binary(),
  optional(:fixed_amount) =&gt; fixed_amount(),
  optional(:metadata) =&gt; %{optional(binary()) =&gt; binary()},
  optional(:tax_behavior) =&gt; :exclusive | :inclusive | :unspecified,
  optional(:tax_code) =&gt; binary(),
  optional(:type) =&gt; :fixed_amount
}
```

Parameters to be passed to Shipping Rate creation for this shipping option.

# `sofort`

```elixir
@type sofort() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the Sofort payment method options.

# `submit`

```elixir
@type submit() :: %{optional(:message) =&gt; binary()}
```

# `subscription_data`

```elixir
@type subscription_data() :: %{
  optional(:application_fee_percent) =&gt; number(),
  optional(:billing_cycle_anchor) =&gt; integer(),
  optional(:billing_mode) =&gt; billing_mode(),
  optional(:default_tax_rates) =&gt; [binary()],
  optional(:description) =&gt; binary(),
  optional(:invoice_settings) =&gt; invoice_settings(),
  optional(:metadata) =&gt; %{optional(binary()) =&gt; binary()},
  optional(:on_behalf_of) =&gt; binary(),
  optional(:proration_behavior) =&gt; :create_prorations | :none,
  optional(:transfer_data) =&gt; transfer_data(),
  optional(:trial_end) =&gt; integer(),
  optional(:trial_period_days) =&gt; integer(),
  optional(:trial_settings) =&gt; trial_settings()
}
```

A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.

# `subscriptions`

```elixir
@type subscriptions() :: %{
  optional(:interval) =&gt; :day | :month | :week | :year,
  optional(:interval_count) =&gt; integer(),
  optional(:name) =&gt; binary(),
  optional(:next_billing) =&gt; next_billing(),
  optional(:reference) =&gt; binary()
}
```

# `swish`

```elixir
@type swish() :: %{optional(:reference) =&gt; binary()}
```

contains details about the Swish payment method options.

# `t`

```elixir
@type t() :: %Stripe.Checkout.Session{
  adaptive_pricing: term() | nil,
  after_expiration: term() | nil,
  allow_promotion_codes: boolean() | nil,
  amount_subtotal: integer() | nil,
  amount_total: integer() | nil,
  automatic_tax: term(),
  billing_address_collection: binary() | nil,
  branding_settings: term(),
  cancel_url: binary() | nil,
  client_reference_id: binary() | nil,
  client_secret: binary() | nil,
  collected_information: term() | nil,
  consent: term() | nil,
  consent_collection: term() | nil,
  created: integer(),
  currency: binary() | nil,
  currency_conversion: term() | nil,
  custom_fields: term(),
  custom_text: term(),
  customer: (binary() | Stripe.Customer.t() | Stripe.DeletedCustomer.t()) | nil,
  customer_creation: binary() | nil,
  customer_details: term() | nil,
  customer_email: binary() | nil,
  discounts: term() | nil,
  excluded_payment_method_types: term(),
  expires_at: integer(),
  id: binary(),
  invoice: (binary() | Stripe.Invoice.t()) | nil,
  invoice_creation: term() | nil,
  line_items: term(),
  livemode: boolean(),
  locale: binary() | nil,
  metadata: term() | nil,
  mode: binary(),
  name_collection: term(),
  object: binary(),
  optional_items: term() | nil,
  origin_context: binary() | nil,
  payment_intent: (binary() | Stripe.PaymentIntent.t()) | nil,
  payment_link: (binary() | Stripe.PaymentLink.t()) | nil,
  payment_method_collection: binary() | nil,
  payment_method_configuration_details: term() | nil,
  payment_method_options: term() | nil,
  payment_method_types: term(),
  payment_status: binary(),
  permissions: term() | nil,
  phone_number_collection: term(),
  presentment_details: term(),
  recovered_from: binary() | nil,
  redirect_on_completion: binary(),
  return_url: binary(),
  saved_payment_method_options: term() | nil,
  setup_intent: (binary() | Stripe.SetupIntent.t()) | nil,
  shipping_address_collection: term() | nil,
  shipping_cost: term() | nil,
  shipping_options: term(),
  status: binary() | nil,
  submit_type: binary() | nil,
  subscription: (binary() | Stripe.Subscription.t()) | nil,
  success_url: binary() | nil,
  tax_id_collection: term(),
  total_details: term() | nil,
  ui_mode: binary() | nil,
  url: binary() | nil,
  wallet_options: term() | nil
}
```

The `checkout.session` type.

  * `adaptive_pricing` Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
  * `after_expiration` When set, provides configuration for actions to take if this Checkout Session expires.
  * `allow_promotion_codes` Enables user redeemable promotion codes.
  * `amount_subtotal` Total of all items before discounts or taxes are applied.
  * `amount_total` Total of all items after discounts and taxes are applied.
  * `automatic_tax` 
  * `billing_address_collection` Describes whether Checkout should collect the customer's billing address. Defaults to `auto`.
  * `branding_settings` 
  * `cancel_url` 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.
  * `client_reference_id` A unique string to reference the Checkout Session. This can be a
customer ID, a cart ID, or similar, and can be used to reconcile the
Session with your internal systems.
  * `client_secret` 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.
 For `ui_mode: custom`, use the client secret with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end.
  * `collected_information` Information about the customer collected within the Checkout Session.
  * `consent` Results of `consent_collection` for this session.
  * `consent_collection` When set, provides configuration for the Checkout Session to gather active consent from customers.
  * `created` Time at which the object was created. Measured in seconds since the Unix epoch.
  * `currency` 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).
  * `currency_conversion` Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31.
  * `custom_fields` Collect additional information from your customer using custom fields. Up to 3 fields are supported.
  * `custom_text` 
  * `customer` The ID of the customer for this Session.
For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout
will create a new customer object based on information provided
during the payment flow unless an existing customer was provided when
the Session was created.
  * `customer_creation` Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
  * `customer_details` 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.
  * `customer_email` If provided, this value will be used when the Customer object is created.
If not provided, customers will be asked to enter their email address.
Use this parameter to prefill customer data if you already have an email
on file. To access information about the customer once the payment flow is
complete, use the `customer` attribute.
  * `discounts` List of coupons and promotion codes attached to the Checkout Session.
  * `excluded_payment_method_types` 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).
  * `expires_at` The timestamp at which the Checkout Session will expire.
  * `id` Unique identifier for the object.
  * `invoice` ID of the invoice created by the Checkout Session, if it exists.
  * `invoice_creation` Details on the state of invoice creation for the Checkout Session.
  * `line_items` The line items purchased by the customer.
  * `livemode` Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
  * `locale` The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
  * `metadata` Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  * `mode` The mode of the Checkout Session.
  * `name_collection` 
  * `object` String representing the object's type. Objects of the same type share the same value.
  * `optional_items` The optional items presented to the customer at checkout.
  * `origin_context` Where the user is coming from. This informs the optimizations that are applied to the session.
  * `payment_intent` 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://stripe.com/docs/api/checkout/sessions/expire) instead.
  * `payment_link` The ID of the Payment Link that created this Session.
  * `payment_method_collection` Configure whether a Checkout Session should collect a payment method. Defaults to `always`.
  * `payment_method_configuration_details` Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
  * `payment_method_options` Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
  * `payment_method_types` A list of the types of payment methods (e.g. card) this Checkout
Session is allowed to accept.
  * `payment_status` The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.
You can use this value to decide when to fulfill your customer's order.
  * `permissions` This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.

For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
  * `phone_number_collection` 
  * `presentment_details` 
  * `recovered_from` The ID of the original expired Checkout Session that triggered the recovery flow.
  * `redirect_on_completion` This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
  * `return_url` 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.
  * `saved_payment_method_options` Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
  * `setup_intent` 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://stripe.com/docs/api/checkout/sessions/expire) instead.
  * `shipping_address_collection` When set, provides configuration for Checkout to collect a shipping address from a customer.
  * `shipping_cost` The details of the customer cost of shipping, including the customer chosen ShippingRate.
  * `shipping_options` The shipping rate options applied to this Session.
  * `status` The status of the Checkout Session, one of `open`, `complete`, or `expired`.
  * `submit_type` Describes the type of transaction being performed by Checkout in order to customize
relevant text on the page, such as the submit button. `submit_type` can only be
specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
  * `subscription` The ID of the [Subscription](https://stripe.com/docs/api/subscriptions) for Checkout Sessions in `subscription` mode.
  * `success_url` The URL the customer will be directed to after the payment or
subscription creation is successful.
  * `tax_id_collection` 
  * `total_details` Tax and discount details for the computed total amount.
  * `ui_mode` The UI mode of the Session. Defaults to `hosted`.
  * `url` 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://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`
This value is only present when the session is active.
  * `wallet_options` Wallet-specific configuration for this Checkout Session.

# `tax_id_collection`

```elixir
@type tax_id_collection() :: %{
  optional(:enabled) =&gt; boolean(),
  optional(:required) =&gt; :if_supported | :never
}
```

Controls tax ID collection during checkout.

# `terms_of_service_acceptance`

```elixir
@type terms_of_service_acceptance() :: %{optional(:message) =&gt; binary()}
```

# `text`

```elixir
@type text() :: %{
  optional(:default_value) =&gt; binary(),
  optional(:maximum_length) =&gt; integer(),
  optional(:minimum_length) =&gt; integer()
}
```

Configuration for `type=text` fields.

# `transfer_data`

```elixir
@type transfer_data() :: %{
  optional(:amount_percent) =&gt; number(),
  optional(:destination) =&gt; binary()
}
```

If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.

# `trial_settings`

```elixir
@type trial_settings() :: %{optional(:end_behavior) =&gt; end_behavior()}
```

Settings related to subscription trials.

# `twint`

```elixir
@type twint() :: %{optional(:setup_future_usage) =&gt; :none}
```

contains details about the TWINT payment method options.

# `us_bank_account`

```elixir
@type us_bank_account() :: %{
  optional(:financial_connections) =&gt; financial_connections(),
  optional(:setup_future_usage) =&gt; :none | :off_session | :on_session,
  optional(:target_date) =&gt; binary(),
  optional(:verification_method) =&gt; :automatic | :instant
}
```

contains details about the Us Bank Account payment method options.

# `wallet_options`

```elixir
@type wallet_options() :: %{optional(:link) =&gt; link()}
```

Wallet-specific configuration.

# `wechat_pay`

```elixir
@type wechat_pay() :: %{
  optional(:app_id) =&gt; binary(),
  optional(:client) =&gt; :android | :ios | :web,
  optional(:setup_future_usage) =&gt; :none
}
```

contains details about the WeChat Pay payment method options.

# `create`

```elixir
@spec create(
  params :: %{
    optional(:submit_type) =&gt; :auto | :book | :donate | :pay | :subscribe,
    optional(:branding_settings) =&gt; branding_settings(),
    optional(:shipping_address_collection) =&gt; shipping_address_collection(),
    optional(:custom_text) =&gt; custom_text(),
    optional(:excluded_payment_method_types) =&gt; [
      :acss_debit
      | :affirm
      | :afterpay_clearpay
      | :alipay
      | :alma
      | :amazon_pay
      | :au_becs_debit
      | :bacs_debit
      | :bancontact
      | :billie
      | :blik
      | :boleto
      | :card
      | :cashapp
      | :crypto
      | :customer_balance
      | :eps
      | :fpx
      | :giropay
      | :grabpay
      | :ideal
      | :kakao_pay
      | :klarna
      | :konbini
      | :kr_card
      | :mb_way
      | :mobilepay
      | :multibanco
      | :naver_pay
      | :nz_bank_account
      | :oxxo
      | :p24
      | :pay_by_bank
      | :payco
      | :paynow
      | :paypal
      | :pix
      | :promptpay
      | :revolut_pay
      | :samsung_pay
      | :satispay
      | :sepa_debit
      | :sofort
      | :swish
      | :twint
      | :us_bank_account
      | :wechat_pay
      | :zip
    ],
    optional(:metadata) =&gt; %{optional(binary()) =&gt; binary()},
    optional(:custom_fields) =&gt; [custom_fields()],
    optional(:setup_intent_data) =&gt; setup_intent_data(),
    optional(:redirect_on_completion) =&gt; :always | :if_required | :never,
    optional(:payment_method_configuration) =&gt; binary(),
    optional(:name_collection) =&gt; name_collection(),
    optional(:shipping_options) =&gt; [shipping_options()],
    optional(:locale) =&gt;
      :auto
      | :bg
      | :cs
      | :da
      | :de
      | :el
      | :en
      | :&quot;en-GB&quot;
      | :es
      | :&quot;es-419&quot;
      | :et
      | :fi
      | :fil
      | :fr
      | :&quot;fr-CA&quot;
      | :hr
      | :hu
      | :id
      | :it
      | :ja
      | :ko
      | :lt
      | :lv
      | :ms
      | :mt
      | :nb
      | :nl
      | :pl
      | :pt
      | :&quot;pt-BR&quot;
      | :ro
      | :ru
      | :sk
      | :sl
      | :sv
      | :th
      | :tr
      | :vi
      | :zh
      | :&quot;zh-HK&quot;
      | :&quot;zh-TW&quot;,
    optional(:payment_intent_data) =&gt; payment_intent_data(),
    optional(:customer_email) =&gt; binary(),
    optional(:client_reference_id) =&gt; binary(),
    optional(:saved_payment_method_options) =&gt; saved_payment_method_options(),
    optional(:tax_id_collection) =&gt; tax_id_collection(),
    optional(:permissions) =&gt; permissions(),
    optional(:payment_method_types) =&gt; [
      :acss_debit
      | :affirm
      | :afterpay_clearpay
      | :alipay
      | :alma
      | :amazon_pay
      | :au_becs_debit
      | :bacs_debit
      | :bancontact
      | :billie
      | :blik
      | :boleto
      | :card
      | :cashapp
      | :crypto
      | :customer_balance
      | :eps
      | :fpx
      | :giropay
      | :grabpay
      | :ideal
      | :kakao_pay
      | :klarna
      | :konbini
      | :kr_card
      | :link
      | :mb_way
      | :mobilepay
      | :multibanco
      | :naver_pay
      | :nz_bank_account
      | :oxxo
      | :p24
      | :pay_by_bank
      | :payco
      | :paynow
      | :paypal
      | :pix
      | :promptpay
      | :revolut_pay
      | :samsung_pay
      | :satispay
      | :sepa_debit
      | :sofort
      | :swish
      | :twint
      | :us_bank_account
      | :wechat_pay
      | :zip
    ],
    optional(:discounts) =&gt; [discounts()],
    optional(:payment_method_collection) =&gt; :always | :if_required,
    optional(:optional_items) =&gt; [optional_items()],
    optional(:currency) =&gt; binary(),
    optional(:payment_method_options) =&gt; payment_method_options(),
    optional(:invoice_creation) =&gt; invoice_creation(),
    optional(:phone_number_collection) =&gt; phone_number_collection(),
    optional(:adaptive_pricing) =&gt; adaptive_pricing(),
    optional(:automatic_tax) =&gt; automatic_tax(),
    optional(:cancel_url) =&gt; binary(),
    optional(:wallet_options) =&gt; wallet_options(),
    optional(:customer_creation) =&gt; :always | :if_required,
    optional(:expires_at) =&gt; integer(),
    optional(:subscription_data) =&gt; subscription_data(),
    optional(:return_url) =&gt; binary(),
    optional(:after_expiration) =&gt; after_expiration(),
    optional(:billing_address_collection) =&gt; :auto | :required,
    optional(:customer) =&gt; binary(),
    optional(:expand) =&gt; [binary()],
    optional(:payment_method_data) =&gt; payment_method_data(),
    optional(:origin_context) =&gt; :mobile_app | :web,
    optional(:ui_mode) =&gt; :custom | :embedded | :hosted,
    optional(:mode) =&gt; :payment | :setup | :subscription,
    optional(:consent_collection) =&gt; consent_collection(),
    optional(:allow_promotion_codes) =&gt; boolean(),
    optional(:success_url) =&gt; binary(),
    optional(:line_items) =&gt; [line_items()],
    optional(:customer_update) =&gt; customer_update()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
```

<p>Creates a Checkout Session object.</p>

#### Details

 * Method: `post`
 * Path: `/v1/checkout/sessions`

# `expire`

```elixir
@spec expire(
  session :: binary(),
  params :: %{optional(:expand) =&gt; [binary()]},
  opts :: Keyword.t()
) ::
  {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
```

<p>A Checkout Session can be expired when it is in one of these statuses: <code>open</code> </p>

<p>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.</p>

#### Details

 * Method: `post`
 * Path: `/v1/checkout/sessions/{session}/expire`

# `list`

```elixir
@spec list(
  params :: %{
    optional(:created) =&gt; created() | integer(),
    optional(:customer) =&gt; binary(),
    optional(:customer_details) =&gt; customer_details(),
    optional(:ending_before) =&gt; binary(),
    optional(:expand) =&gt; [binary()],
    optional(:limit) =&gt; integer(),
    optional(:payment_intent) =&gt; binary(),
    optional(:payment_link) =&gt; binary(),
    optional(:starting_after) =&gt; binary(),
    optional(:status) =&gt; :complete | :expired | :open,
    optional(:subscription) =&gt; binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
```

<p>Returns a list of Checkout Sessions.</p>

#### Details

 * Method: `get`
 * Path: `/v1/checkout/sessions`

# `list_line_items`

```elixir
@spec list_line_items(
  session :: binary(),
  params :: %{
    optional(:ending_before) =&gt; binary(),
    optional(:expand) =&gt; [binary()],
    optional(:limit) =&gt; integer(),
    optional(:starting_after) =&gt; binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(Stripe.Item.t())}
  | {:error, Stripe.ApiErrors.t()}
  | {:error, term()}
```

<p>When retrieving a Checkout Session, there is an includable <strong>line_items</strong> property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.</p>

#### Details

 * Method: `get`
 * Path: `/v1/checkout/sessions/{session}/line_items`

# `retrieve`

```elixir
@spec retrieve(
  session :: binary(),
  params :: %{optional(:expand) =&gt; [binary()]},
  opts :: Keyword.t()
) ::
  {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
```

<p>Retrieves a Checkout Session object.</p>

#### Details

 * Method: `get`
 * Path: `/v1/checkout/sessions/{session}`

# `update`

```elixir
@spec update(
  session :: binary(),
  params :: %{
    optional(:collected_information) =&gt; collected_information(),
    optional(:expand) =&gt; [binary()],
    optional(:metadata) =&gt; %{optional(binary()) =&gt; binary()} | binary(),
    optional(:shipping_options) =&gt; [shipping_options()] | binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
```

<p>Updates a Checkout Session object.</p>

<p>Related guide: <a href="/payments/checkout/dynamic-updates">Dynamically update Checkout</a></p>

#### Details

 * Method: `post`
 * Path: `/v1/checkout/sessions/{session}`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
