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

# Create a new Checkout Element

> Create a new Checkout Element with specified offers.
      
      Checkout Elements are embeddable or hosted checkout experiences that can be 
      integrated into your website or application. They handle the entire checkout 
      flow including payment collection, tax calculation, and order creation.
      
      Supported configurations:
      - Single one-time purchase: One offer for a standard product
      - Multiple one-time purchases: Multiple offers in a cart
      - Subscription: One subscription offer (cannot be combined with other offers)



## OpenAPI

````yaml /api-reference/api-docs.yaml post /v0/elements/checkout/create
openapi: 3.1.0
info:
  title: Fungies API v0
  version: 0.3.5
servers:
  - url: https://api.fungies.io
security: []
tags:
  - name: discounts
    description: Discounts related endpoints
  - name: keys
    description: Offer product keys related endpoints
  - name: orders
    description: Orders related endpoints
  - name: payments
    description: Payments related endpoints
  - name: offers
    description: Offers related endpoints
  - name: products
    description: Products related endpoints
  - name: subscriptions
    description: Subscriptions related endpoints
  - name: users
    description: Users related endpoints
  - name: variants
    description: Product variants related endpoints
  - name: plans
    description: Product plans related endpoints
  - name: elements
    description: Elements related endpoints
paths:
  /v0/elements/checkout/create:
    post:
      tags:
        - elements
      summary: Create a new Checkout Element
      description: |-
        Create a new Checkout Element with specified offers.
              
              Checkout Elements are embeddable or hosted checkout experiences that can be 
              integrated into your website or application. They handle the entire checkout 
              flow including payment collection, tax calculation, and order creation.
              
              Supported configurations:
              - Single one-time purchase: One offer for a standard product
              - Multiple one-time purchases: Multiple offers in a cart
              - Subscription: One subscription offer (cannot be combined with other offers)
      operationId: PostV0ElementsCheckoutCreate
      requestBody:
        description: POST /v0/elements/checkout/create Request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostV0ElementsCheckoutCreateRequestBody'
      responses:
        '200':
          description: POST /v0/elements/checkout/create Positive response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostV0ElementsCheckoutCreatePositiveResponse
        '400':
          description: POST /v0/elements/checkout/create Negative response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostV0ElementsCheckoutCreateNegativeResponse
              examples:
                example1:
                  value:
                    status: error
                    error:
                      message: Sample error message
      security:
        - APIKEY_1: []
          APIKEY_2: []
components:
  schemas:
    PostV0ElementsCheckoutCreateRequestBody:
      type: object
      properties:
        name:
          type: string
        offersIds:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
        customFields:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              value:
                oneOf:
                  - type: string
                  - type: number
                    format: double
                    minimum: -1.7976931348623157e+308
                    maximum: 1.7976931348623157e+308
            required:
              - id
              - value
      required:
        - offersIds
    PostV0ElementsCheckoutCreatePositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
          properties:
            checkoutElement:
              type: object
              properties:
                object:
                  type: string
                  enum:
                    - checkoutElement
                  default: checkoutElement
                id:
                  type: string
                  format: uuid
                name:
                  type:
                    - string
                    - 'null'
                  default: null
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - DRAFT
                subscriptionOffer:
                  type: boolean
                  default: false
                offers:
                  type: array
                  items:
                    type: object
                    properties:
                      object:
                        type: string
                        enum:
                          - offer
                        default: offer
                      id:
                        type: string
                        format: uuid
                      internalId:
                        type:
                          - string
                          - 'null'
                        default: null
                    required:
                      - id
              required:
                - id
                - status
                - offers
          required:
            - checkoutElement
      required:
        - status
        - data
    PostV0ElementsCheckoutCreateNegativeResponse:
      type: object
      properties:
        status:
          type: string
          const: error
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - status
        - error
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: header
      name: x-fngs-public-key
    APIKEY_2:
      type: apiKey
      in: header
      name: x-fngs-secret-key

````