Search documentation of polar_express

# PolarExpress.Services.CheckoutsService (polar_express v0.1.5)

Copy Markdown View Source

Checkouts

Checkouts API operations.

## Summary

### Functions

confirm_checkout_session_from_client(client, client_secret, params \\ %{}, opts \\ [])

Confirm Checkout Session from Client

create_checkout_session(client, params \\ %{}, opts \\ [])

Create Checkout Session

get_checkout_session(client, id, params \\ %{}, opts \\ [])

Get Checkout Session

get_checkout_session_from_client(client, client_secret, params \\ %{}, opts \\ [])

Get Checkout Session from Client

list_checkout_sessions(client, params \\ %{}, opts \\ [])

List Checkout Sessions

update_checkout_session(client, id, params \\ %{}, opts \\ [])

Update Checkout Session

update_checkout_session_from_client(client, client_secret, params \\ %{}, opts \\ [])

Update Checkout Session from Client

## Functions

# confirm_checkout_session_from_client(client, client_secret, params \\ %{}, opts \\ [])

    @spec confirm_checkout_session_from_client(
      PolarExpress.Client.t(),
      String.t(),
      map(),
      keyword()
    ) ::
      {:ok, PolarExpress.Schemas.CheckoutPublicConfirmed.t()}
      | {:error, PolarExpress.Error.t()}

Confirm Checkout Session from Client

Confirm a checkout session by client secret.

Orders and subscriptions will be processed.

See `PolarExpress.Params.CheckoutsConfirmCheckoutSessionFromClientParams` for parameter details.

# create_checkout_session(client, params \\ %{}, opts \\ [])

    @spec create_checkout_session(PolarExpress.Client.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Checkout.t()} | {:error, PolarExpress.Error.t()}

Create Checkout Session

Create a checkout session.

Scopes: `checkouts:write`

See `PolarExpress.Params.CheckoutsCreateCheckoutSessionParams` for parameter details.

# get_checkout_session(client, id, params \\ %{}, opts \\ [])

    @spec get_checkout_session(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Checkout.t()} | {:error, PolarExpress.Error.t()}

Get Checkout Session

Get a checkout session by ID.

Scopes: `checkouts:read` `checkouts:write`

See `PolarExpress.Params.CheckoutsGetCheckoutSessionParams` for parameter details.

# get_checkout_session_from_client(client, client_secret, params \\ %{}, opts \\ [])

    @spec get_checkout_session_from_client(
      PolarExpress.Client.t(),
      String.t(),
      map(),
      keyword()
    ) ::
      {:ok, PolarExpress.Schemas.CheckoutPublic.t()}
      | {:error, PolarExpress.Error.t()}

Get Checkout Session from Client

Get a checkout session by client secret.

See `PolarExpress.Params.CheckoutsGetCheckoutSessionFromClientParams` for parameter details.

# list_checkout_sessions(client, params \\ %{}, opts \\ [])

    @spec list_checkout_sessions(PolarExpress.Client.t(), map(), keyword()) ::
      {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}

List Checkout Sessions

List checkout sessions.

Scopes: `checkouts:read` `checkouts:write`

See `PolarExpress.Params.CheckoutsListCheckoutSessionsParams` for parameter details.

# update_checkout_session(client, id, params \\ %{}, opts \\ [])

    @spec update_checkout_session(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Checkout.t()} | {:error, PolarExpress.Error.t()}

Update Checkout Session

Update a checkout session.

Scopes: `checkouts:write`

See `PolarExpress.Params.CheckoutsUpdateCheckoutSessionParams` for parameter details.

# update_checkout_session_from_client(client, client_secret, params \\ %{}, opts \\ [])

    @spec update_checkout_session_from_client(
      PolarExpress.Client.t(),
      String.t(),
      map(),
      keyword()
    ) ::
      {:ok, PolarExpress.Schemas.CheckoutPublic.t()}
      | {:error, PolarExpress.Error.t()}

Update Checkout Session from Client

Update a checkout session by client secret.

See `PolarExpress.Params.CheckoutsUpdateCheckoutSessionFromClientParams` for parameter details.