> ## 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.

# Create Checkout Session

> Creates a checkout session to initialize the Yuno SDK.
Pass the returned `checkout_session` to `Yuno.initialize()` on the front-end.




## OpenAPI

````yaml openapi/yuno_sandbox_tested.json POST /v1/checkout/sessions
openapi: 3.1.0
info:
  title: Yuno Payments API
  version: 1.0.0
  description: >
    The Yuno Payments API is built around REST principles, using standard HTTP
    methods and JSON payloads.


    ## Authentication

    All requests require two headers:

    ```

    public-api-key: YOUR_PUBLIC_KEY

    private-secret-key: YOUR_PRIVATE_KEY

    ```


    ## Idempotency

    Payment mutations (create, capture, cancel, refund, payout) require an
    `X-Idempotency-Key` header (UUID).

    The API stores the key and returns the same response for duplicate requests
    within 24 hours.


    ## Environments

    | Environment | Base URL |

    |-------------|----------|

    | Sandbox | `https://api-sandbox.y.uno/v1` |

    | Production | `https://api.y.uno/v1` |
  contact:
    name: Yuno Support
    url: https://docs.y.uno
  license:
    name: Proprietary
servers:
  - url: https://api-sandbox.y.uno
    description: Sandbox
  - url: https://api.y.uno
    description: Production
  - url: https://api.eu.y.uno
    description: Production (EMEA)
security:
  - PublicApiKey: []
    PrivateSecretKey: []
tags:
  - name: Customers
    description: Create and manage customer records.
  - name: Checkout Sessions
    description: Initialize the Yuno SDK on the front-end.
  - name: Payment Methods
    description: Enroll and manage vaulted payment methods.
  - name: Payments
    description: Create and manage payment transactions.
  - name: Payment Links
    description: Hosted payment pages requiring no SDK.
  - name: Subscriptions
    description: Recurring billing management.
  - name: Payouts
    description: Disburse funds to individuals or entities.
  - name: Reports
    description: Generate and download transaction reports.
  - name: Currency Conversion
    description: Dynamic currency conversion (DCC).
paths:
  /v1/checkout/sessions:
    post:
      tags:
        - Checkout Sessions
      summary: Create Checkout Session
      description: >
        Creates a checkout session to initialize the Yuno SDK.

        Pass the returned `checkout_session` to `Yuno.initialize()` on the
        front-end.
      operationId: create-checkout-session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckoutSessionRequest'
            example:
              account_id: YOUR_ACCOUNT_ID
              merchant_order_id: order-001
              payment_description: 'Order #001'
              country: US
              customer_id: CUSTOMER_UUID
              amount:
                currency: USD
                value: 10000
              callback_url: https://example.com/checkout/callback
              workflow: SDK_CHECKOUT
      responses:
        '200':
          description: Checkout session created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSession'
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  schemas:
    CreateCheckoutSessionRequest:
      type: object
      required:
        - account_id
        - merchant_order_id
        - payment_description
        - country
      properties:
        account_id:
          type: string
          format: uuid
        merchant_order_id:
          type: string
          minLength: 3
          maxLength: 255
        payment_description:
          type: string
          minLength: 3
          maxLength: 255
        country:
          $ref: '#/components/schemas/Country'
        customer_id:
          type: string
          format: uuid
        callback_url:
          type: string
          format: uri
        amount:
          $ref: '#/components/schemas/Amount'
        workflow:
          type: string
          enum:
            - SDK_CHECKOUT
            - CHECKOUT
            - SDK_SEAMLESS
          default: SDK_CHECKOUT
        metadata:
          $ref: '#/components/schemas/Metadata'
    CheckoutSession:
      type: object
      properties:
        checkout_session:
          type: string
          format: uuid
        merchant_order_id:
          type: string
        country:
          type: string
        payment_description:
          type: string
        customer_id:
          type: string
          format: uuid
        amount:
          $ref: '#/components/schemas/Amount'
        workflow:
          type: string
        created_at:
          type: string
          format: date-time
    Country:
      type: string
      enum:
        - AR
        - BO
        - BR
        - CL
        - CO
        - CR
        - EC
        - SV
        - GT
        - HN
        - MX
        - NI
        - PA
        - PY
        - PE
        - US
        - UY
      description: ISO 3166-1 alpha-2 country code
    Amount:
      type: object
      required:
        - currency
        - value
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        value:
          type: number
          multipleOf: 0.0001
          description: Amount in cents (e.g. 10000 = $100.00)
    Metadata:
      type: array
      maxItems: 120
      items:
        type: object
        properties:
          key:
            type: string
            maxLength: 48
          value:
            type: string
            maxLength: 512
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
    Currency:
      type: string
      minLength: 3
      maxLength: 3
      description: ISO 4217 currency code (e.g. USD, BRL, MXN)
  responses:
    BadRequest:
      description: Invalid request — schema violation or missing required field
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````