Polar::Api::Checkouts
API client for checkouts operations
Constants
Constructors
Creates a new Checkouts instance
@param client [Client] The Polar API client instance
Instance methods
Confirm Checkout Session from Client
Confirm a checkout session by client secret.
Orders and subscriptions will be processed.
Endpoint: POST /v1/checkouts/client/{client_secret}/confirm
Parameters:
client_secret(required): The checkout session client secret.body(required): Request body as Polar::Models::CheckoutConfirmStripe
Returns: Polar::Models::CheckoutPublicConfirmed
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get Checkout Session from Client
Get a checkout session by client secret.
Endpoint: GET /v1/checkouts/client/{client_secret}
Parameters:
client_secret(required): The checkout session client secret.
Returns: Polar::Models::CheckoutPublic
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Update Checkout Session from Client
Update a checkout session by client secret.
Endpoint: PATCH /v1/checkouts/client/{client_secret}
Parameters:
client_secret(required): The checkout session client secret.body(required): Request body as Polar::Models::CheckoutUpdatePublic
Returns: Polar::Models::CheckoutPublic
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Create Checkout Session
Create a checkout session.
Scopes: checkouts:write
Endpoint: POST /v1/checkouts/
Parameters:
body(required): Request body as Polar::Models::CheckoutCreate
Returns: Polar::Models::Checkout
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get Checkout Session
Get a checkout session by ID.
Scopes: checkouts:read checkouts:write
Endpoint: GET /v1/checkouts/{id}
Parameters:
id(required): The checkout session ID.
Returns: Polar::Models::Checkout
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
List Checkout Sessions
List checkout sessions.
Scopes: checkouts:read checkouts:write
Endpoint: GET /v1/checkouts/
Parameters:
organization_id(optional): Filter by organization ID.product_id(optional): Filter by product ID.customer_id(optional): Filter by customer ID.status(optional): Filter by checkout session status.query(optional): Filter by customer email.page(optional): Page number, defaults to 1.limit(optional): Size of a page, defaults to 10. Maximum is 100.sorting(optional): 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.
Returns: Polar::Models::ListResource(Polar::Models::Checkout)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Update Checkout Session
Update a checkout session.
Scopes: checkouts:write
Endpoint: PATCH /v1/checkouts/{id}
Parameters:
id(required): The checkout session ID.body(required): Request body as Polar::Models::CheckoutUpdate
Returns: Polar::Models::Checkout
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors