Session
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 redirect to its URL to begin Checkout.
Related guide: Checkout quickstart
Summary
Functions
Create a Checkout Session
Expire a Checkout Session
List all Checkout Sessions
Retrieve a Checkout Session
Update a Checkout Session
Functions
@spec create(StripeElixir.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Create a Checkout Session
Creates a Checkout Session object.
@spec expire(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Expire a Checkout Session
A Checkout Session can be expired when it is in one of these statuses: open
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.
@spec list(StripeElixir.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
List all Checkout Sessions
Returns a list of Checkout Sessions.
@spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Retrieve a Checkout Session
Retrieves a Checkout Session object.
@spec update(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Update a Checkout Session
Updates a Checkout Session object.
Related guide: Dynamically update a Checkout Session