What a checkout session is
A checkout session represents a single purchase intent. It commits the amount, currency, country, and your merchant order reference before any payment is created. Every Yuno payment runs inside one checkout session. Think of it as a container: the session defines what is being purchased, the payment defines how the customer pays for it.Session lifecycle
- Your server creates a checkout session through the API.
- Your client uses the returned
checkout_sessionto initialize the SDK or render the payment options. - Your server creates a payment that references the session.
- Yuno marks the session as completed once the payment reaches a terminal status.
Create a checkout session
Required fields
| Field | Type | Description |
|---|---|---|
amount.currency | string | ISO 4217 currency code (for example USD, BRL, MXN) |
amount.value | number | Payment amount as a decimal |
country | string | ISO 3166-1 alpha-2 country code |
merchant_order_id | string | Your internal order reference |
account_id | string | Your account_id from the Dashboard’s Developers section |
payment_description | string | Human readable description shown to the customer |
Optional fields
| Field | Type | Description |
|---|---|---|
customer_id | string | Yuno customer_id for one click flows, see customers |
workflow | string | Integration mode: SDK_CHECKOUT, SDK_LITE, SDK_SEAMLESS, SDK_HEADLESS, DIRECT |
callback_url | string | Server notification URL for webhooks |
return_url | string | Customer redirect URL after payment. Required for 3DS, Pix, and redirect methods |
metadata | object | Key value pairs for your own tracking |
POST /v1/checkout/sessions returns HTTP 200, not 201. The session is not a REST resource in the traditional sense, it is an initialized flow.Discover available methods
Once a session exists, ask Yuno which methods are available for this combination of country, currency, and your configured providers.Session tokens
The create response includes acheckout_session token that you use to:
- Initialize the Yuno SDK on the client.
- Reference the purchase intent when creating the payment server side.
- Determine available methods based on country, currency, and your provider configuration.
Relationship to payments
| Aspect | Checkout session | Payment |
|---|---|---|
| Purpose | Defines what is being purchased | Defines how the purchase is paid |
| Created by | Your server | Your server |
| Cardinality | One per purchase attempt | One per checkout session |
| Contains | Amount, currency, country, customer | Method, token, customer detail, provider result |
What next
Payments
Create, capture, refund, and cancel with code.
Payment flow
The conceptual lifecycle and status state machine.
Customers
Attach a customer for one click and saved methods.
Checkout session object
The full object schema in the API reference.