# `Stripe.Services.Checkout.SessionService`
[🔗](https://github.com/jeffhuen/tiger_stripe/blob/main/lib/stripe/services/checkout/session_service.ex#L2)

Session

A Checkout Session represents your customer's session as they pay for
one-time purchases or subscriptions through [Checkout](https://docs.stripe.com/payments/checkout)
or [Payment Links](https://docs.stripe.com/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://docs.stripe.com/api/customers), and either the successful
[PaymentIntent](https://docs.stripe.com/api/payment_intents) or an active
[Subscription](https://docs.stripe.com/api/subscriptions).

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

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

# `create`

```elixir
@spec create(Stripe.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Create a Checkout Session

Creates a Checkout Session object.

# `expire`

```elixir
@spec expire(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.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.

# `list`

```elixir
@spec list(Stripe.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

List all Checkout Sessions

Returns a list of Checkout Sessions.

# `retrieve`

```elixir
@spec retrieve(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Retrieve a Checkout Session

Retrieves a Checkout Session object.

# `update`

```elixir
@spec update(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Update a Checkout Session

Updates a Checkout Session object.

Related guide: [Dynamically update a Checkout Session](https://stripe.com/payments/advanced/dynamic-updates)

---

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