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

# Retrieve a checkout session

> Retrieves a session owned by your project. Includes `payment` once a payment transaction has been detected.



## OpenAPI

````yaml /openapi.json get /v1/checkout/sessions/{id}
openapi: 3.0.3
info:
  title: Warp API
  version: 1.0.0
  description: >-
    Public Warp API: hosted checkout sessions for Pay with Warp, hosted ZK proof
    verification, and Warp Verify attestation checks.
  contact:
    name: Warp Support
    email: support@usewarp.net
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.usewarp.net
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Checkout sessions
    description: Create and track hosted checkout sessions.
  - name: ZK verification
    description: Verify Groth16 proofs against circuits deployed from the Warp Platform.
  - name: Attestations
    description: Public Warp Verify attestation checks.
  - name: Health
    description: Service status.
paths:
  /v1/checkout/sessions/{id}:
    get:
      tags:
        - Checkout sessions
      summary: Retrieve a checkout session
      description: >-
        Retrieves a session owned by your project. Includes `payment` once a
        payment transaction has been detected.
      operationId: retrieveCheckoutSession
      parameters:
        - name: id
          in: path
          required: true
          description: Session ID (`ps_...`).
          schema:
            type: string
      responses:
        '200':
          description: The session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSession'
        '401':
          description: Missing or invalid secret key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unauthorized
                  message: Invalid API key
        '404':
          description: Not found (or owned by another project)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                  message: Resource not found
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                  message: Too many requests. Retry after the window resets.
components:
  schemas:
    CheckoutSession:
      type: object
      properties:
        id:
          type: string
          example: ps_8f14e45fceea167a5a36dedd4bea2543
        object:
          type: string
          enum:
            - checkout.session
        amount_usd:
          type: string
          description: Amount in USD as a decimal string.
          example: '49.99'
        currency:
          type: string
          enum:
            - USD
        description:
          type: string
          nullable: true
        metadata:
          type: object
          nullable: true
          additionalProperties: true
        status:
          $ref: '#/components/schemas/CheckoutSessionStatus'
        network:
          type: string
          enum:
            - mainnet
            - testnet
          description: Determined by the secret key used to create the session.
        return_url:
          type: string
          nullable: true
        cancel_url:
          type: string
          nullable: true
        expires_at:
          type: string
          format: date-time
          description: 30 minutes after creation.
        created_at:
          type: string
          format: date-time
        checkout_url:
          type: string
          format: uri
          description: Hosted checkout page to redirect the customer to.
          example: >-
            https://checkout.usewarp.net/session/ps_8f14e45fceea167a5a36dedd4bea2543
        payment:
          type: object
          allOf:
            - $ref: '#/components/schemas/Payment'
          nullable: true
          description: Present on retrieve once a payment has been detected.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                Machine-readable error code: `invalid_request`, `unauthorized`,
                `not_found`, `proof_not_ready`, `onchain_unavailable`,
                `rate_limited` or `internal_error`.
              example: invalid_request
            message:
              type: string
              description: Human-readable description.
    CheckoutSessionStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
        - expired
      description: >-
        `pending`: waiting for payment. `processing`: a transaction was
        submitted and is being verified. `completed`: payment verified.
        `failed`: verification failed. `expired`: no payment within 30 minutes.
    Payment:
      type: object
      description: The on-chain payment for a session.
      properties:
        chain:
          type: string
          description: Network the customer paid on.
          example: base
        token:
          type: string
          description: >-
            Token the customer paid with. You receive this token; there is no
            conversion.
          example: USDC
        tx_hash:
          type: string
          description: Transaction hash (lowercase).
          example: 0x5f2c...
        amount:
          type: string
          description: Token amount paid, as a decimal string.
          example: '49.99'
        confirmations:
          type: integer
          description: Block confirmations observed.
        completed_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your project secret key: `sk_test_...` (testnet) or `sk_live_...`
        (mainnet). Use it only on your server.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.