Polarex.Checkouts (Polarex v0.2.3)

View Source

Provides API endpoints related to checkouts

Summary

Functions

Confirm Checkout Session from Client

Get Checkout Session from Client

Update Checkout Session from Client

Create Checkout Session

Get Checkout Session

List Checkout Sessions

Update Checkout Session

Functions

checkouts_client_confirm(client_secret, body, opts \\ [])

Confirm Checkout Session from Client

Confirm a checkout session by client secret.

Orders and subscriptions will be processed.

checkouts_client_get(client_secret, opts \\ [])

Get Checkout Session from Client

Get a checkout session by client secret.

checkouts_client_update(client_secret, body, opts \\ [])

Update Checkout Session from Client

Update a checkout session by client secret.

checkouts_create(body, opts \\ [])

@spec checkouts_create(
  Polarex.CheckoutProductsCreate.t(),
  keyword()
) :: {:ok, Polarex.Checkout.t()} | {:error, Polarex.HTTPValidationError.t()}

Create Checkout Session

Create a checkout session.

Scopes: checkouts:write

checkouts_get(id, opts \\ [])

@spec checkouts_get(
  String.t(),
  keyword()
) ::
  {:ok, Polarex.Checkout.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Get Checkout Session

Get a checkout session by ID.

Scopes: checkouts:read checkouts:write

checkouts_list(opts \\ [])

@spec checkouts_list(keyword()) ::
  {:ok, Polarex.ListResourceCheckout.t()}
  | {:error, Polarex.HTTPValidationError.t()}

List Checkout Sessions

List checkout sessions.

Scopes: checkouts:read checkouts:write

Options

  • organization_id: Filter by organization ID.
  • product_id: Filter by product ID.
  • customer_id: Filter by customer ID.
  • status: Filter by checkout session status.
  • query: Filter by customer email.
  • page: Page number, defaults to 1.
  • limit: Size of a page, defaults to 10. Maximum is 100.
  • sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.

checkouts_update(id, body, opts \\ [])

Update Checkout Session

Update a checkout session.

Scopes: checkouts:write