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

# List Checkout Sessions

> Retrieve a list of all checkout sessions and their status

Retrieve all checkout sessions initiated through your account, including their status and payment information.

<CodeGroup>
  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.videodb.io/billing/checkouts",
      headers={"x-access-token": "your_api_key"}
  )

  checkouts = response.json()

  for checkout in checkouts.get('checkouts', []):
      print(f"Checkout ID: {checkout.get('id')}")
      print(f"Amount: ${checkout.get('amount')}")
      print(f"Status: {checkout.get('status')}")
      print(f"Created: {checkout.get('created_at')}")
      print("---")
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.videodb.io/billing/checkouts", {
    method: "GET",
    headers: {
      "x-access-token": "your_api_key"
    }
  });

  const data = await response.json();

  for (const checkout of data.checkouts || []) {
      console.log(`Checkout ID: ${checkout.id}`);
      console.log(`Amount: $${checkout.amount}`);
      console.log(`Status: ${checkout.status}`);
      console.log(`Created: ${checkout.createdAt}`);
      console.log("---");
  }
  ```
</CodeGroup>

<Note>
  * Checkout sessions include both completed and abandoned sessions
  * Status values include "completed", "pending", and "expired"
  * Completed checkouts result in credit additions to your account
  * Each checkout session is associated with a specific purchase amount
</Note>

<CardGroup cols={2}>
  <Card title="Create Checkout" icon="shopping-cart" href="/api-reference/billing/create_checkout">
    Initiate a new checkout session to purchase credits
  </Card>

  <Card title="Top Up Credits" icon="coins" href="/api-reference/billing/create_topup">
    Manually add credits to your account
  </Card>
</CardGroup>


## OpenAPI

````yaml GET /billing/checkouts
openapi: 3.0.3
info:
  title: VideoDB Server API
  description: >
    VideoDB Server API for video, audio, and image processing with AI
    capabilities.

    This API provides comprehensive video management, search, indexing, and
    AI-powered features.
  version: 1.0.0
  contact:
    name: VideoDB Support
    url: https://videodb.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.videodb.io
    description: Production server
  - url: https://staging-api.videodb.io
    description: Staging server
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: User authentication and API key management
  - name: Collections
    description: Collection management operations
  - name: Videos
    description: Video upload, processing, and management
  - name: Audio
    description: Audio management operations
  - name: Images
    description: Image management operations
  - name: Search
    description: Content search and indexing
  - name: AI Generation
    description: AI-powered content generation
  - name: Billing
    description: Billing and usage management
  - name: RTStream
    description: Real-time streaming operations
  - name: Utilities
    description: Utility endpoints
  - name: Meeting
    description: Meeting recording and management
  - name: Capture
    description: Capture session management for recording streams
  - name: Editor
    description: Timeline editor operations
  - name: Transcode
    description: Media transcoding operations
  - name: Assets
    description: Cross-collection asset listing
paths:
  /billing/checkouts:
    get:
      summary: Get billing checkout history
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            example: 10
        - name: offset
          in: query
          schema:
            type: integer
            example: 0
      responses:
        '200':
          description: Checkout history
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: cs_test_xxx
                        amount:
                          type: number
                          example: 100
                        currency:
                          type: string
                          example: usd
                        status:
                          type: string
                          example: completed
                        created_at:
                          type: string
                          format: date-time
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-access-token
      description: API key for authentication (sk-xxx format)

````