> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionicfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Checkout sessions

> Hosted checkout attempts for one-time payments and subscription signup.

Checkout sessions are one buyer attempt to pay or start a subscription through Ionic checkout. Create them from your backend, send the buyer to hosted checkout or continue an embedded checkout flow, then retrieve the session to check the result.

The exact request and response payloads live on the generated endpoint pages.

## Endpoints

| Endpoint                                                                                  | Use it for                                                          |
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [Create checkout session](/api-reference/checkout-sessions/create-a-checkout-session)     | Create a hosted checkout session from inline or catalog line items. |
| [List checkout sessions](/api-reference/checkout-sessions/list-checkout-sessions)         | Review checkout history or build reporting.                         |
| [Get checkout session](/api-reference/checkout-sessions/retrieve-a-checkout-session)      | Retrieve one session by `cs_` ID.                                   |
| [Confirm checkout session](/api-reference/checkout-sessions/confirm-a-checkout-session)   | Lazily create the payment intent for an open session.               |
| [Adjust line item quantity](/api-reference/checkout-sessions/adjust-a-line-item-quantity) | Change adjustable quantities before payment confirmation.           |
| [Select optional item](/api-reference/checkout-sessions/select-an-optional-item)          | Add an optional item to an open session.                            |
| [Deselect optional item](/api-reference/checkout-sessions/deselect-an-optional-item)      | Remove a selected optional item from an open session.               |

## Notes

* `line_items` is required when creating a session.
* `mode: payment` accepts either catalog-backed items with `price_id` or inline items with `name`, `amount`, and `currency`.
* `mode: subscription` requires recurring catalog prices. Recurring items must share one currency and billing cadence.
* Hosted checkout confirms payment or activates the subscription for you. Do not call the merchant confirm endpoint from a hosted integration.
* `POST /v1/checkout/sessions/{id}/confirm` takes no JSON body and does not support subscription-mode sessions.
* Quantity and optional-item mutations only apply while a session is open and before the payment intent is attached.
* Hosted checkout URLs are buyer-facing capability URLs. Merchant API keys should stay on your server.
* Treat redirects as user-experience signals. Verify server-side state before fulfillment.
