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

# Create a checkout session (client token)

> Start a new checkout session and obtain a client token for payment.



## OpenAPI

````yaml /swagger/openapi-billing.json post /checkout/create_client_session
openapi: 3.0.0
info:
  title: OpenAPI3
  version: 1.0.0
servers:
  - url: https://billing.funnelfox.com/{org_id}/v1
    description: FunnelFox Billing API
    variables:
      org_id:
        default: your-org-id
        description: Your organization ID
security:
  - FunnelFoxSecretKey: []
paths:
  /checkout/create_client_session:
    post:
      tags:
        - Checkout
      summary: Create a checkout session (client token)
      description: Start a new checkout session and obtain a client token for payment.
      parameters:
        - name: org_id
          in: path
          required: true
          description: Organization ID
          schema:
            type: string
          style: simple
          explode: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutClientSessionIn'
      responses:
        '200':
          description: Client token and order ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutClientSessionOut'
      security: []
components:
  schemas:
    CheckoutClientSessionIn:
      properties:
        region:
          description: >-
            Payment service provider region (useful when merchant has multiple
            payment provider accounts)
          maxLength: 64
          pattern: ^[a-z]{1,20}$
          title: Region
          type: string
        integration_type:
          $ref: '#/components/schemas/IntegrationEnum'
        pp_ident:
          description: Unique identifier of the price point
          maxLength: 256
          pattern: ^[-A-Za-z_0-9]{1,256}$
          title: price point ident
          type: string
        external_id:
          description: Your unique identifier for the user
          maxLength: 256
          title: Customer Id
          type: string
        email_address:
          maxLength: 1024
          title: Email Address
          type: string
        country_code:
          type: string
          nullable: true
        client_metadata:
          additionalProperties: true
          description: Custom metadata from your client application
          title: Client Metadata
          type: object
      required:
        - region
        - integration_type
        - pp_ident
        - external_id
        - email_address
      title: CheckoutClientSessionIn
      type: object
    CheckoutClientSessionOut:
      properties:
        client_token:
          title: Client Token
          type: string
        order_id:
          format: uuid
          title: Order Id
          type: string
      required:
        - client_token
        - order_id
      title: CheckoutClientSessionOut
      type: object
    IntegrationEnum:
      enum:
        - fakeintegration
        - primer
        - stripe
      title: IntegrationEnum
      type: string
  securitySchemes:
    FunnelFoxSecretKey:
      type: apiKey
      in: header
      name: ff-secret-key
      description: Secret key for FunnelFox Billing API. Required for all requests.

````