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

# POST /checkout

> Create a checkout session for an admitted participant



## OpenAPI

````yaml /api/openapi/checkout-api.json post /checkout
openapi: 3.1.0
info:
  description: Checkout API for Fanfare
  title: Fanfare Checkout API
  version: 1.0.0
servers:
  - description: Production
    url: https://checkout.fanfare.io/api
  - description: Local development
    url: http://localhost:4805
security:
  - CheckoutSecretKeyAuth: []
paths:
  /checkout:
    post:
      tags:
        - Checkout
      description: Create a checkout session for an admitted participant
      operationId: postCheckout
      requestBody:
        content:
          application/json:
            schema:
              properties:
                admissionToken:
                  type: string
                cancelUrl:
                  type: string
                currencyCode:
                  type: string
                distributionId:
                  format: uuid
                  type: string
                idempotencyKey:
                  type: string
                productId:
                  format: uuid
                  type: string
                quantity:
                  type: number
                successUrl:
                  type: string
                variantId:
                  format: uuid
                  type: string
              required:
                - admissionToken
                - distributionId
                - productId
                - variantId
                - quantity
                - currencyCode
                - successUrl
                - cancelUrl
                - idempotencyKey
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  checkoutUrl:
                    type: string
                  deadline:
                    type: string
                  expiresAt:
                    type: string
                  orderId:
                    type: string
                  paymentId:
                    type: string
                required:
                  - orderId
                  - paymentId
                  - checkoutUrl
                  - expiresAt
                  - deadline
                type: object
          description: Checkout session created
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    const: validation_error
                  issues:
                    items:
                      properties:
                        expected:
                          type: string
                        kind:
                          type: string
                        message:
                          type: string
                        path:
                          items:
                            properties:
                              input: {}
                              key:
                                anyOf:
                                  - type: string
                                  - type: number
                              origin:
                                type: string
                              type:
                                type: string
                            required:
                              - type
                              - origin
                              - input
                              - key
                            type: object
                          type: array
                        received:
                          type: string
                        type:
                          type: string
                      required:
                        - kind
                        - type
                        - expected
                        - received
                        - message
                        - path
                      type: object
                    type: array
                required:
                  - error
                  - issues
                type: object
          description: Bad Request - Invalid input schema
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Unauthorized - Authentication required
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Forbidden - User must be authenticated
        '500':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Internal server error
components:
  securitySchemes:
    CheckoutSecretKeyAuth:
      description: Fanfare secret key. Keep secret credentials on your server.
      scheme: bearer
      type: http

````

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