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

# Create Polar checkout session



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json post /api/v1/billing/checkout
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/billing/checkout:
    post:
      tags:
        - billing
      summary: Create Polar checkout session
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckoutRequest'
      responses:
        '201':
          description: Checkout session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCheckoutResponse'
        '400':
          description: Rejected checkout request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
        '502':
          description: Provider error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateCheckoutRequest:
      type: object
      properties:
        plan:
          type: string
          enum:
            - developer
            - pro
          description: Plan to upgrade to. Only 'developer' and 'pro' are purchasable.
      required:
        - plan
    CreateCheckoutResponse:
      type: object
      properties:
        checkout_url:
          type: string
          format: uri
      required:
        - checkout_url
    BillingError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT access token or API key (csk_...)

````