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

# Retrieve a checkout session



## OpenAPI

````yaml /openapi/v1.yaml get /checkout-sessions/{id}
openapi: 3.1.0
info:
  title: Payoes API
  version: 1.0.0
  description: >
    REST API for creating and managing Stellar payments, customers, checkout
    sessions,

    payment links, and invoices.


    ## Authentication


    Send your API key as a Bearer token. Sandbox keys use the `pk_test_` prefix
    and

    only access sandbox data. Live keys use `pk_live_` and only access
    production data.


    ## Environments


    Sandbox and production are fully isolated. Resources created in one
    environment

    are not visible from API keys scoped to the other.
servers:
  - url: https://payoes.com/api/v1
    description: Production host (replace with your deployment URL)
  - url: http://localhost:3000/api/v1
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Payments
    description: Direct payment intents with hosted Stellar checkout
  - name: Customers
    description: Payer profiles scoped to your organization and environment
  - name: Checkout sessions
    description: Hosted checkout flows with optional redirect URLs
  - name: Payment links
    description: Reusable shareable links that start checkout on each visit
  - name: Invoices
    description: Customer invoices with draft, finalize, and checkout lifecycle
paths:
  /checkout-sessions/{id}:
    get:
      tags:
        - Checkout sessions
      summary: Retrieve a checkout session
      operationId: getCheckoutSession
      parameters:
        - $ref: '#/components/parameters/CheckoutSessionId'
      responses:
        '200':
          description: Checkout session details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSession'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    CheckoutSessionId:
      name: id
      in: path
      required: true
      description: Public checkout session ID
      schema:
        type: string
        example: cs_abc123xyz
  schemas:
    CheckoutSession:
      type: object
      required:
        - id
        - object
        - status
        - checkout_url
        - created_at
      properties:
        id:
          type: string
          example: cs_abc123xyz
        object:
          type: string
          enum:
            - checkout.session
        status:
          $ref: '#/components/schemas/CheckoutSessionStatus'
        payment_intent_id:
          type: string
          nullable: true
        amount:
          type: string
          nullable: true
        settlement_asset:
          allOf:
            - $ref: '#/components/schemas/AssetRef'
          nullable: true
        allowed_assets:
          type: array
          items:
            $ref: '#/components/schemas/AssetRef'
        paid_asset:
          allOf:
            - $ref: '#/components/schemas/AssetRef'
          nullable: true
        payment_status:
          $ref: '#/components/schemas/PaymentStatus'
        customer_id:
          type: string
          nullable: true
        success_url:
          type: string
          format: uri
          nullable: true
        cancel_url:
          type: string
          format: uri
          nullable: true
        checkout_url:
          type: string
          format: uri
        expires_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
    CheckoutSessionStatus:
      type: string
      enum:
        - open
        - complete
        - expired
    AssetRef:
      type: object
      required:
        - asset_code
      properties:
        asset_code:
          type: string
          description: Stellar asset code (1–12 alphanumeric characters, or XLM)
          example: USDC
        issuer_address:
          type: string
          nullable: true
          description: Issuer public key for credit assets. Null for XLM.
    PaymentStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
        - expired
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Payment not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key from the Payoes dashboard (`pk_test_...` or `pk_live_...`)

````