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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Sessions

> Explains customer sessions and checkout sessions and when to create each one in Yuno.

With Yuno, you can create sessions to initiate payments or register payment methods for future purchases. There are two types of sessions: **customer sessions** and **checkout sessions**. These sessions ensure the correct information is collected for each scenario.

## Customer session

Use customer sessions to enroll and store a customer's payment methods. Create a new customer session each time you register a payment method for a specific customer. You'll need the `customer_id` (a unique customer identifier) generated when creating the customer in Yuno. A customer session provides access to all available payment methods for enrollment, which you can offer to customers.

> [!NOTE]
>
> **Available payment methods**
>
> When creating either session type, customer or checkout, the Yuno system returns a list of all enabled payment methods. These are the payment methods configured in your Yuno dashboard, under the Connections and Checkout builder section.

For more detailed information on how to use the **Create customer session** endpoint, see [API reference](https://docs.y.uno/reference/customer-sessions-enrollment/the-customer-session-object.md).

## Checkout session

Use checkout sessions to create payments or initiate the payment flow. Each time a customer makes a payment, you must create a new session. You'll need the `customer_id` (a unique customer identifier) generated when creating the customer in Yuno. A checkout session provides access to all available payment methods for that customer, whether previously enrolled or not. A checkout session expires 2.5 hours after it is created, and updating it does not extend that time.

> [!NOTE]
>
> **Create a payment without a checkout session**
>
> Direct integration doesn't require Yuno's SDK, so you can create a payment without a checkout session.

For more detailed information on how to use the **Create checkout session** endpoint, see [API reference](https://docs.y.uno/reference/checkout-sessions/the-checkout-session-object.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.