View Source Stripe.Checkout.Session (Striped v0.2.0)
A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through Checkout or 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, and either the successful PaymentIntent or an active Subscription.
You can create a Checkout Session on your server and pass its ID to the client to begin Checkout.
Related guide: Checkout Quickstart.
Link to this section Summary
Types
Payment-method-specific configuration.
Shipping information for this payment.
Payment-method-specific configuration.
Configure actions after a Checkout Session has expired.
Payment-method-specific configuration.
Payment-method-specific configuration.
Payment-method-specific configuration.
Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
Payment-method-specific configuration.
Payment-method-specific configuration.
contains details about the Customer Balance payment method options.
Payment-method-specific configuration.
Payment-method-specific configuration.
Configure fields for the Checkout Session to gather active consent from customers.
Payment-method-specific configuration.
Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when customer
is provided.
Parameters to be passed to Shipping Rate creation for this shipping option
Payment-method-specific configuration.
Configuration for the bank transfer funding type, if the funding_type
is set to bank_transfer
.
contains details about the Us Bank Account payment method options.
Parameters to be passed to Shipping Rate creation for this shipping option
Payment-method-specific configuration.
Payment-method-specific configuration.
Payment-method-specific configuration.
Payment-method-specific configuration.
contains details about the Card payment method options.
Payment-method-specific configuration.
Payment-method-specific configuration.
contains details about the ACSS Debit payment method options.
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
Payment-method-specific configuration.
Payment-method-specific configuration.
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in payment
mode.
Payment-method-specific configuration.
Payment-method-specific configuration.
Controls phone number collection settings for the session.
Payment-method-specific configuration.
Data used to generate a new Price object inline. One of price
or price_data
is required.
Configure actions after a Checkout Session has expired.
Data used to generate a new Price object inline. One of price
or price_data
is required.
Payment-method-specific configuration.
A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in setup
mode.
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in payment
mode.
When set, provides configuration for Checkout to collect a shipping address from a customer.
Payment-method-specific configuration.
A subset of parameters to be passed to subscription creation for Checkout Sessions in subscription
mode.
The checkout.session
type.
Controls tax ID collection settings for the session.
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in payment
mode.
Payment-method-specific configuration.
Payment-method-specific configuration.
Functions
Creates a Session object.
A Session can be expired when it is in one of these statuses: open
Returns a list of Checkout Sessions.
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.
Retrieves a Session object.
Link to this section Types
@type acss_debit() :: %{ optional(:currency) => :cad | :usd, :mandate_options => mandate_options(), optional(:setup_future_usage) => :none | :off_session | :on_session, optional(:verification_method) => :automatic | :instant | :microdeposits }
Payment-method-specific configuration.
@type address() :: %{
optional(:city) => :string,
optional(:country) => :string,
optional(:line1) => :string,
optional(:line2) => :string,
optional(:postal_code) => :string,
optional(:state) => :string
}
Shipping information for this payment.
@type adjustable_quantity() :: %{
optional(:enabled) => :boolean,
optional(:maximum) => :integer,
optional(:minimum) => :integer
}
@type affirm() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type after_expiration() :: %{recovery: recovery()}
Configure actions after a Checkout Session has expired.
@type afterpay_clearpay() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type alipay() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type au_becs_debit() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type automatic_tax() :: %{optional(:enabled) => :boolean}
Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
@type bacs_debit() :: %{
optional(:setup_future_usage) => :none | :off_session | :on_session
}
Payment-method-specific configuration.
@type bancontact() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type bank_transfer() :: %{ :eu_bank_transfer => eu_bank_transfer(), optional(:requested_address_types) => [ :iban | :sepa | :sort_code | :spei | :zengin ], optional(:type) => :eu_bank_transfer | :gb_bank_transfer | :jp_bank_transfer | :mx_bank_transfer }
contains details about the Customer Balance payment method options.
@type boleto() :: %{
optional(:expires_after_days) => :integer,
optional(:setup_future_usage) => :none | :off_session | :on_session
}
Payment-method-specific configuration.
@type card() :: %{ :installments => installments(), optional(:setup_future_usage) => :off_session | :on_session, optional(:statement_descriptor_suffix_kana) => :string, optional(:statement_descriptor_suffix_kanji) => :string }
Payment-method-specific configuration.
@type consent_collection() :: %{
optional(:promotions) => :auto | :none,
optional(:terms_of_service) => :none | :required
}
Configure fields for the Checkout Session to gather active consent from customers.
@type customer_balance() :: %{ :bank_transfer => bank_transfer(), optional(:funding_type) => :bank_transfer, optional(:setup_future_usage) => :none }
Payment-method-specific configuration.
@type customer_details() :: %{email: :string}
@type customer_update() :: %{
optional(:address) => :auto | :never,
optional(:name) => :auto | :never,
optional(:shipping) => :auto | :never
}
Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when customer
is provided.
Parameters to be passed to Shipping Rate creation for this shipping option
@type discounts() :: %{
optional(:coupon) => :string,
optional(:promotion_code) => :string
}
@type eps() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type eu_bank_transfer() :: %{optional(:country) => :string}
Configuration for the bank transfer funding type, if the funding_type
is set to bank_transfer
.
@type financial_connections() :: %{
optional(:permissions) => [
:balances | :ownership | :payment_method | :transactions
]
}
contains details about the Us Bank Account payment method options.
@type fixed_amount() :: %{
optional(:amount) => :integer,
optional(:currency) => :string,
currency_options: :object
}
Parameters to be passed to Shipping Rate creation for this shipping option
@type fpx() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type giropay() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type grabpay() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type ideal() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type installments() :: %{optional(:enabled) => :boolean}
contains details about the Card payment method options.
@type klarna() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type konbini() :: %{
optional(:expires_after_days) => :integer,
optional(:setup_future_usage) => :none
}
Payment-method-specific configuration.
@type line_items() :: %{ :adjustable_quantity => adjustable_quantity(), optional(:amount) => :integer, optional(:currency) => :string, optional(:description) => :string, optional(:dynamic_tax_rates) => [:string], optional(:images) => [:string], optional(:name) => :string, optional(:price) => :string, :price_data => price_data(), optional(:quantity) => :integer, optional(:tax_rates) => [:string] }
@type mandate_options() :: %{
optional(:custom_mandate_url) => :string | :string,
optional(:default_for) => [:invoice | :subscription],
optional(:interval_description) => :string,
optional(:payment_schedule) => :combined | :interval | :sporadic,
optional(:transaction_type) => :business | :personal
}
contains details about the ACSS Debit payment method options.
@type maximum() :: %{
optional(:unit) => :business_day | :day | :hour | :month | :week,
optional(:value) => :integer
}
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
@type minimum() :: %{
optional(:unit) => :business_day | :day | :hour | :month | :week,
optional(:value) => :integer
}
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
@type oxxo() :: %{
optional(:expires_after_days) => :integer,
optional(:setup_future_usage) => :none
}
Payment-method-specific configuration.
@type p24() :: %{
optional(:setup_future_usage) => :none,
optional(:tos_shown_and_accepted) => :boolean
}
Payment-method-specific configuration.
@type payment_intent_data() :: %{ optional(:application_fee_amount) => :integer, optional(:capture_method) => :automatic | :manual, optional(:description) => :string, :metadata => :object, optional(:on_behalf_of) => :string, optional(:receipt_email) => :string, optional(:setup_future_usage) => :off_session | :on_session, :shipping => shipping(), optional(:statement_descriptor) => :string, optional(:statement_descriptor_suffix) => :string, :transfer_data => transfer_data(), optional(:transfer_group) => :string }
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in payment
mode.
@type payment_method_options() :: %{ acss_debit: acss_debit(), affirm: affirm(), afterpay_clearpay: afterpay_clearpay(), alipay: alipay(), au_becs_debit: au_becs_debit(), bacs_debit: bacs_debit(), bancontact: bancontact(), boleto: boleto(), card: card(), customer_balance: customer_balance(), eps: eps(), fpx: fpx(), giropay: giropay(), grabpay: grabpay(), ideal: ideal(), klarna: klarna(), konbini: konbini(), oxxo: oxxo(), p24: p24(), paynow: paynow(), pix: pix(), sepa_debit: sepa_debit(), sofort: sofort(), us_bank_account: us_bank_account(), wechat_pay: wechat_pay() }
Payment-method-specific configuration.
@type paynow() :: %{
optional(:setup_future_usage) => :none,
optional(:tos_shown_and_accepted) => :boolean
}
Payment-method-specific configuration.
@type phone_number_collection() :: %{optional(:enabled) => :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.
@type pix() :: %{optional(:expires_after_seconds) => :integer}
Payment-method-specific configuration.
@type price_data() :: %{ optional(:currency) => :string, optional(:product) => :string, :product_data => product_data(), :recurring => recurring(), optional(:tax_behavior) => :exclusive | :inclusive | :unspecified, optional(:unit_amount) => :integer, optional(:unit_amount_decimal) => :string }
@type product_data() :: %{
optional(:description) => :string,
optional(:images) => [:string],
:metadata => :object,
optional(:name) => :string,
optional(:tax_code) => :string
}
Data used to generate a new Price object inline. One of price
or price_data
is required.
@type recovery() :: %{
optional(:allow_promotion_codes) => :boolean,
optional(:enabled) => :boolean
}
Configure actions after a Checkout Session has expired.
@type recurring() :: %{
optional(:interval) => :day | :month | :week | :year,
optional(:interval_count) => :integer
}
Data used to generate a new Price object inline. One of price
or price_data
is required.
@type sepa_debit() :: %{
optional(:setup_future_usage) => :none | :off_session | :on_session
}
Payment-method-specific configuration.
@type setup_intent_data() :: %{
optional(:description) => :string,
:metadata => :object,
optional(:on_behalf_of) => :string
}
A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in setup
mode.
@type shipping() :: %{ :address => address(), optional(:carrier) => :string, optional(:name) => :string, optional(:phone) => :string, optional(:tracking_number) => :string }
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in payment
mode.
@type shipping_address_collection() :: %{
optional(:allowed_countries) => [
: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
| :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.
@type shipping_options() :: %{ optional(:shipping_rate) => :string, shipping_rate_data: shipping_rate_data() }
@type shipping_rate_data() :: %{ :delivery_estimate => delivery_estimate(), optional(:display_name) => :string, :fixed_amount => fixed_amount(), :metadata => :object, optional(:tax_behavior) => :exclusive | :inclusive | :unspecified, optional(:tax_code) => :string, optional(:type) => :fixed_amount }
@type sofort() :: %{optional(:setup_future_usage) => :none}
Payment-method-specific configuration.
@type subscription_data() :: %{ optional(:application_fee_percent) => :number, optional(:coupon) => :string, optional(:default_tax_rates) => [:string], optional(:description) => :string, optional(:items) => [:object], :metadata => :object, :transfer_data => transfer_data(), optional(:trial_end) => :integer, optional(:trial_from_plan) => :boolean, optional(:trial_period_days) => :integer }
A subset of parameters to be passed to subscription creation for Checkout Sessions in subscription
mode.
@type t() :: %Stripe.Checkout.Session{ 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, cancel_url: binary(), client_reference_id: binary() | nil, consent: term() | nil, consent_collection: term() | nil, created: integer(), currency: binary() | nil, customer: (binary() | Stripe.Customer.t() | Stripe.DeletedCustomer.t()) | nil, customer_creation: binary() | nil, customer_details: term() | nil, customer_email: binary() | nil, expires_at: integer(), id: binary(), line_items: term(), livemode: boolean(), locale: binary() | nil, metadata: term() | nil, mode: binary(), object: binary(), payment_intent: (binary() | Stripe.PaymentIntent.t()) | nil, payment_link: (binary() | Stripe.PaymentLink.t()) | nil, payment_method_collection: binary() | nil, payment_method_options: term() | nil, payment_method_types: term(), payment_status: binary(), phone_number_collection: term(), recovered_from: binary() | nil, setup_intent: (binary() | Stripe.SetupIntent.t()) | nil, shipping_address_collection: term() | nil, shipping_cost: term() | nil, shipping_details: term() | nil, shipping_options: term(), status: binary() | nil, submit_type: binary() | nil, subscription: (binary() | Stripe.Subscription.t()) | nil, success_url: binary(), tax_id_collection: term(), total_details: term() | nil, url: binary() | nil }
The checkout.session
type.
payment_status
The payment status of the Checkout Session, one ofpaid
,unpaid
, orno_payment_required
. You can use this value to decide when to fulfill your customer's order.livemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.payment_method_options
Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.line_items
The line items purchased by the customer.customer_creation
Configure whether a Checkout Session creates a Customer when the Checkout Session completes.payment_link
The ID of the Payment Link that created this Session.metadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.payment_method_types
A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept.locale
The IETF language tag of the locale Checkout is displayed in. If blank orauto
, the browser's locale is used.shipping_address_collection
When set, provides configuration for Checkout to collect a shipping address from a customer.consent_collection
When set, provides configuration for the Checkout Session to gather active consent from customers.payment_intent
The ID of the PaymentIntent for Checkout Sessions inpayment
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 thecustomer
attribute.customer_details
The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions insetup
mode.phone_number_collection
customer
The ID of the customer for this Session. For Checkout Sessions inpayment
orsubscription
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.shipping_cost
The details of the customer cost of shipping, including the customer chosen ShippingRate.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 inpayment
mode, but not Checkout Sessions insubscription
orsetup
mode.mode
The mode of the Checkout Session.success_url
The URL the customer will be directed to after the payment or subscription creation is successful.recovered_from
The ID of the original expired Checkout Session that triggered the recovery flow.object
String representing the object's type. Objects of the same type share the same value.total_details
Tax and discount details for the computed total amount.expires_at
The timestamp at which the Checkout Session will expire.automatic_tax
setup_intent
The ID of the SetupIntent for Checkout Sessions insetup
mode.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.after_expiration
When set, provides configuration for actions to take if this Checkout Session expires.tax_id_collection
currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.created
Time at which the object was created. Measured in seconds since the Unix epoch.amount_subtotal
Total of all items before discounts or taxes are applied.amount_total
Total of all items after discounts and taxes are applied.payment_method_collection
Configure whether a Checkout Session should collect a payment method.url
The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the URL will use your subdomain. Otherwise, it’ll usecheckout.stripe.com.
This value is only present when the session is active.subscription
The ID of the subscription for Checkout Sessions insubscription
mode.allow_promotion_codes
Enables user redeemable promotion codes.billing_address_collection
Describes whether Checkout should collect the customer's billing address.cancel_url
The URL the customer will be directed to if they decide to cancel payment and return to your website.status
The status of the Checkout Session, one ofopen
,complete
, orexpired
.shipping_details
Shipping information for this Checkout Session.consent
Results ofconsent_collection
for this session.id
Unique identifier for the object. Used to pass toredirectToCheckout
in Stripe.js.shipping_options
The shipping rate options applied to this Session.
@type tax_id_collection() :: %{optional(:enabled) => :boolean}
Controls tax ID collection settings for the session.
@type transfer_data() :: %{
optional(:amount) => :integer,
optional(:destination) => :string
}
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in payment
mode.
@type us_bank_account() :: %{ :financial_connections => financial_connections(), optional(:setup_future_usage) => :none | :off_session | :on_session, optional(:verification_method) => :automatic | :instant }
Payment-method-specific configuration.
@type wechat_pay() :: %{
optional(:app_id) => :string,
optional(:client) => :android | :ios | :web,
optional(:setup_future_usage) => :none
}
Payment-method-specific configuration.
Link to this section Functions
@spec create( client :: term(), params :: %{ optional(:after_expiration) => after_expiration(), optional(:allow_promotion_codes) => :boolean, optional(:automatic_tax) => automatic_tax(), optional(:billing_address_collection) => :auto | :required, :cancel_url => :string, optional(:client_reference_id) => :string, optional(:consent_collection) => consent_collection(), optional(:currency) => :string, optional(:customer) => :string, optional(:customer_creation) => :always | :if_required, optional(:customer_email) => :string, optional(:customer_update) => customer_update(), optional(:discounts) => [discounts()], optional(:expand) => [:string], optional(:expires_at) => :integer, optional(:line_items) => [line_items()], optional(:locale) => :auto | :bg | :cs | :da | :de | :el | :en | :"en-GB" | :es | :"es-419" | :et | :fi | :fil | :fr | :"fr-CA" | :hr | :hu | :id | :it | :ja | :ko | :lt | :lv | :ms | :mt | :nb | :nl | :pl | :pt | :"pt-BR" | :ro | :ru | :sk | :sl | :sv | :th | :tr | :vi | :zh | :"zh-HK" | :"zh-TW", :metadata => :object, optional(:mode) => :payment | :setup | :subscription, optional(:payment_intent_data) => payment_intent_data(), optional(:payment_method_collection) => :always | :if_required, optional(:payment_method_options) => payment_method_options(), optional(:payment_method_types) => [ :acss_debit | :affirm | :afterpay_clearpay | :alipay | :au_becs_debit | :bacs_debit | :bancontact | :blik | :boleto | :card | :customer_balance | :eps | :fpx | :giropay | :grabpay | :ideal | :klarna | :konbini | :oxxo | :p24 | :paynow | :pix | :promptpay | :sepa_debit | :sofort | :us_bank_account | :wechat_pay ], optional(:phone_number_collection) => phone_number_collection(), optional(:setup_intent_data) => setup_intent_data(), optional(:shipping_address_collection) => shipping_address_collection(), optional(:shipping_options) => [shipping_options()], optional(:shipping_rates) => [:string], optional(:submit_type) => :auto | :book | :donate | :pay, optional(:subscription_data) => subscription_data(), :success_url => :string, optional(:tax_id_collection) => tax_id_collection() } ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a Session object.
Details
- Method:
post
- Path:
/v1/checkout/sessions
@spec expire( client :: term(), session :: binary(), params :: %{optional(:expand) => [:string]} ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
A Session can be expired when it is in one of these statuses: open
After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.
Details
- Method:
post
- Path:
/v1/checkout/sessions/{session}/expire
@spec list( client :: term(), params :: %{ optional(:customer) => :string, :customer_details => customer_details(), optional(:ending_before) => :string, optional(:expand) => [:string], optional(:limit) => :integer, optional(:payment_intent) => :string, optional(:starting_after) => :string, optional(:subscription) => :string } ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of Checkout Sessions.
Details
- Method:
get
- Path:
/v1/checkout/sessions
@spec list_line_items( client :: term(), session :: binary(), params :: %{ optional(:ending_before) => :string, optional(:expand) => [:string], optional(:limit) => :integer, optional(:starting_after) => :string } ) :: {:ok, Stripe.List.t(Stripe.Item.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
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.
Details
- Method:
get
- Path:
/v1/checkout/sessions/{session}/line_items
@spec retrieve( client :: term(), session :: binary(), params :: %{optional(:expand) => [:string]} ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves a Session object.
Details
- Method:
get
- Path:
/v1/checkout/sessions/{session}