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

# Create UCP Checkout Session

> Create a UCP shopping checkout session against the authenticated organization. The facade translates UCP line items to native agentic checkout sessions, reserves inventory, and returns a UCP checkout resource. Requires `UCP-Agent` and OAuth `checkout:write`.



## OpenAPI

````yaml /openapi.json post /ucp/v1/checkout-sessions
openapi: 3.1.0
info:
  title: OmniCommerce API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://omnicommerce.sg/terms
  description: >-
    OmniCommerce API surface for agents and developer integrations. Includes
    public endpoints (merchant discovery, product search, compare, catalog, ACO
    retrieval) and authenticated endpoints (product management via API key
    Bearer tokens).
servers:
  - url: https://omnicommerce.sg
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: agentic-checkout
    description: Merchant-fulfilled agentic checkout
    x-group: Agentic Checkout
  - name: commerce
    description: Root commerce discovery
    x-group: Commerce
  - name: developer-platform
    description: Authenticated developer platform APIs
    x-group: Developer Platform
  - name: looks
    description: AI-styled product looks
    x-group: Looks
  - name: oauth
    description: OAuth token endpoints
    x-group: OAuth
  - name: orders
    description: Workspace and agentic orders
    x-group: Orders
  - name: organizations
    description: Organization management
    x-group: Organizations
  - name: price-books
    description: Marketplace list-price markup rules
    x-group: Price Books
  - name: products
    description: Product CRUD, bulk import, and publish
    x-group: Products
  - name: promotions
    description: Central promotions and marketplace sync
    x-group: Promotions
  - name: public-agent
    description: Public agent discovery and catalog APIs
    x-group: Public Agent
  - name: settlements
    description: settlements
    x-group: Settlements
  - name: ucp
    description: Universal Commerce Protocol
    x-group: UCP
paths:
  /ucp/v1/checkout-sessions:
    post:
      tags:
        - ucp
      summary: Create UCP Checkout Session
      description: >-
        Create a UCP shopping checkout session against the authenticated
        organization. The facade translates UCP line items to native agentic
        checkout sessions, reserves inventory, and returns a UCP checkout
        resource. Requires `UCP-Agent` and OAuth `checkout:write`.
      operationId: post_ucp_v1_checkout_sessions
      parameters:
        - name: UCP-Agent
          in: header
          required: true
          description: UCP agent identity, for example `agent.example/1.0`.
          schema:
            type: string
            maxLength: 240
        - name: Idempotency-Key
          in: header
          required: false
          description: Optional idempotency key for safe retries.
          schema:
            type: string
            maxLength: 180
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              required:
                - line_items
              properties:
                line_items:
                  type: array
                  minItems: 1
                  maxItems: 100
                  items:
                    type: object
                    additionalProperties: true
                    required:
                      - item
                      - quantity
                    properties:
                      item:
                        type: object
                        additionalProperties: true
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            description: OmniCommerce product UUID.
                            maxLength: 160
                          title:
                            type: string
                          price:
                            type: integer
                          image_url:
                            type: string
                      quantity:
                        type: integer
                        minimum: 1
                        maximum: 999
                buyer:
                  type: object
                  additionalProperties: true
                fulfillment:
                  type: object
                  additionalProperties: true
                payment:
                  type: object
                  additionalProperties: true
                payment_rail:
                  type: string
                  enum:
                    - acp_stripe
                    - x402
                  default: acp_stripe
                metadata:
                  type: object
                  additionalProperties: true
            example:
              line_items:
                - item:
                    id: 00000000-0000-4000-8000-000000000001
                  quantity: 1
              buyer:
                email: buyer@example.com
              payment_rail: acp_stripe
      responses:
        '201':
          description: UCP checkout session created.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                required:
                  - ucp
                  - id
                  - line_items
                  - status
                  - currency
                  - totals
                properties:
                  ucp:
                    type: object
                    additionalProperties: true
                  id:
                    type: string
                  line_items:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      required:
                        - item
                        - quantity
                      properties:
                        item:
                          type: object
                          additionalProperties: true
                          required:
                            - id
                          properties:
                            id:
                              type: string
                              description: OmniCommerce product UUID.
                              maxLength: 160
                            title:
                              type: string
                            price:
                              type: integer
                            image_url:
                              type: string
                        quantity:
                          type: integer
                          minimum: 1
                          maximum: 999
                  buyer:
                    type: object
                    additionalProperties: true
                  fulfillment:
                    type: object
                    additionalProperties: true
                  status:
                    type: string
                    enum:
                      - ready_for_complete
                      - completed
                      - canceled
                  currency:
                    type: string
                  totals:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                  payment:
                    type: object
                    additionalProperties: true
                  order:
                    type: object
                    additionalProperties: true
                  settlement:
                    type: object
                    additionalProperties: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  ucp:
                    type: object
                    additionalProperties: true
                  messages:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '401':
          description: Unauthorized
        '403':
          description: Forbidden or checkout not enabled
        '409':
          description: Insufficient inventory
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Bearer API key for server-to-server access. Session auth is also
        supported in first-party UI flows.

````