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

# Check out a Stripe onramp session

> Check out a session and return its client secret.

Driven by the client SDK's `performCheckout` callback, not called on its own —
the SDK handles any required next action, such as 3DS, between calls.


## OpenAPI

````yaml api/openapi.json POST /v1/stripe/session/{sessionId}/checkout
openapi: 3.1.0
info:
  description: Fiat-to-USDC onramp API. The URL prefix (`/v1`) is the version contract.
  license:
    identifier: LicenseRef-Proprietary
    name: Proprietary
  title: Calm API
  version: v1
servers:
  - description: Production
    url: https://api.calmtreasury.xyz
  - description: Sandbox
    url: https://api.sandbox.calmtreasury.xyz
security: []
paths:
  /v1/stripe/session/{sessionId}/checkout:
    post:
      summary: Check out a Stripe onramp session
      description: >-
        Checks out a session and returns its `client_secret`. Driven by the
        client SDK's `performCheckout` callback — never called standalone; the
        SDK handles required next actions (3DS) between calls.
      operationId: checkoutStripeSession
      parameters:
        - in: path
          name: sessionId
          required: true
          schema:
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                wallet:
                  pattern: ^0x[a-fA-F0-9]{40}$
                  type: string
              required:
                - wallet
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  client_secret:
                    type:
                      - string
                      - 'null'
                required:
                  - client_secret
                type: object
          description: The checked-out session's client secret.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Bad Request — `error.code` includes: publishable_key_missing,
            validation_error.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Unauthorized — `error.code` includes: invalid_publishable_key.'
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Error — `error.code` includes: card_declined.'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Forbidden — `error.code` includes: origin_not_allowed.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Not Found — `error.code` includes: resource_missing.'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Conflict — `error.code` includes: idempotency_key_in_use.'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Too Many Requests — `error.code` includes: rate_limited.'
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Bad Gateway — an upstream dependency failed; the body carries the
            standard error envelope with a cause-specific `error.code`.
      security:
        - publishableKey: []
components:
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    publishableKey:
      description: Publishable key identifying the calling app.
      in: header
      name: x-calm-publishable-key
      type: apiKey

````