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

# Create Price

> Creates a new price. Supply `product` to attach the price to an existing product, or `product_data` to create a new product inline in the same request. A price is one-time unless you include `recurring`, in which case it bills on the given interval. Amounts are in the smallest currency unit (cents) and charged in USD. If HSA/FSA eligibility is not set on the price, the parent product's eligibility applies.



## OpenAPI

````yaml /openapi.json post /v1/prices
openapi: 3.1.0
info:
  title: Flex API
  description: >-
    The Flex API powers HSA/FSA payment processing for healthcare commerce:
    checkout sessions, payment intents, subscriptions, customers, refunds,
    disputes, and eligibility. Authenticate with your partner API key as a
    Bearer token. All endpoints are scoped to your partner account, and test
    mode is fully supported via test API keys.
  version: 0.1.0
servers:
  - url: https://api.withflex.com
security:
  - BearerAuth: []
tags:
  - name: Balance Transactions
  - name: Captures
  - name: Checkout Sessions
  - name: Coupons
  - name: Customers
  - name: Disputes
  - name: Events
  - name: Exports
  - name: Files
  - name: Invoices
  - name: Letters
  - name: Orders
  - name: Payment Intents
  - name: Payment Links
  - name: Payouts
  - name: Prices
  - name: Products
  - name: Promo Codes
  - name: Receipts
  - name: Refunds
  - name: Setup Intents
  - name: Shipping Rates
  - name: Subscriptions
paths:
  /v1/prices:
    post:
      tags:
        - Prices
      summary: Create Price
      description: >-
        Creates a new price. Supply `product` to attach the price to an existing
        product, or `product_data` to create a new product inline in the same
        request. A price is one-time unless you include `recurring`, in which
        case it bills on the given interval. Amounts are in the smallest
        currency unit (cents) and charged in USD. If HSA/FSA eligibility is not
        set on the price, the parent product's eligibility applies.
      operationId: v1.prices.create
      requestBody:
        description: An envelope wrapping a single price object.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PriceBody_for_NewPriceRequest'
            example:
              price:
                product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceBody_for_Price'
              example:
                price:
                  price_id: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                  owner_partner_id: facct_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                  description: Premium SPF 50 mineral sunscreen
                  unit_amount: 0
                  recurring: {}
                  active: false
                  product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                  created_at: '2026-06-15T14:30:00Z'
                  type: one_time
                  metadata:
                    order_id: '8842'
                    channel: shopify
                  hsa_fsa_eligibility: not_eligible
                  test_mode: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - loc:
                      - string
                    msg: string
                    type: string
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
      security:
        - BearerAuth:
            - prices:write
components:
  schemas:
    PriceBody_for_NewPriceRequest:
      description: An envelope wrapping a single price object.
      type: object
      required:
        - price
      properties:
        price:
          $ref: '#/components/schemas/NewPriceRequest'
          description: The price object.
      example:
        price:
          product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
    PriceBody_for_Price:
      description: An envelope wrapping a single price object.
      type: object
      required:
        - price
      properties:
        price:
          $ref: '#/components/schemas/Price'
          description: The price object.
      example:
        price:
          price_id: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          owner_partner_id: facct_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          description: Premium SPF 50 mineral sunscreen
          unit_amount: 0
          recurring: {}
          active: false
          product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          created_at: '2026-06-15T14:30:00Z'
          type: one_time
          metadata:
            order_id: '8842'
            channel: shopify
          hsa_fsa_eligibility: not_eligible
          test_mode: false
    HttpErrorOut:
      title: HttpError
      description: The error response returned when a request cannot be completed.
      type: object
      required:
        - code
        - detail
      properties:
        code:
          description: A short machine-readable error code identifying the type of error.
          type: string
        detail:
          description: A human-readable explanation of what went wrong.
          type: string
      example:
        code: string
        detail: string
    HTTPValidationError:
      description: The error response returned when request validation fails (HTTP 422).
      type: object
      required:
        - detail
      properties:
        detail:
          description: The list of validation errors, one entry per invalid field.
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
      example:
        detail:
          - loc:
              - string
            msg: string
            type: string
    NewPriceRequest:
      description: >-
        Parameters for creating a price. Reference an existing product with
        `product`, or create one inline with `product_data`.
      type: object
      example:
        product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
      required:
        - unit_amount
      properties:
        description:
          description: A brief description of the price.
          type:
            - string
            - 'null'
          example: Premium SPF 50 mineral sunscreen
        unit_amount:
          description: >-
            A positive integer in cents (or 0 for a free price) representing how
            much to charge.
          type: integer
          format: int64
          minimum: 0
          example: 2500
          maximum: 4294967295
        recurring:
          description: >-
            The recurring components of a price such as interval and trial
            period days.
          anyOf:
            - $ref: '#/components/schemas/Recurring'
            - type: 'null'
        metadata:
          description: Metadata to attach to the price.
          type:
            - object
            - 'null'
          example:
            order_id: '8842'
            channel: shopify
        product:
          description: The ID of the product that this price will belong to.
          type: string
          example: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        product_data:
          $ref: '#/components/schemas/CreateProductRequest'
          description: Data used to generate a new Product object inline.
    Price:
      description: >-
        Prices define the unit cost and (optional) billing cycle for both
        recurring and one-time purchases of products. Prices belong to a given
        product. Different physical goods or levels of service should be
        represented by products, and pricing options should be represented by
        prices.
      type: object
      required:
        - active
        - created_at
        - price_id
        - product
        - test_mode
        - type
        - unit_amount
      properties:
        price_id:
          description: The unique identifier for the price.
          type: string
          example: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        owner_partner_id:
          description: >-
            The ID of the account that owns this price. For prices shared across
            an organization this may be a sibling account; otherwise it is your
            own account ID.
          type:
            - string
            - 'null'
          example: facct_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        description:
          description: The description of the price.
          type:
            - string
            - 'null'
          example: Premium SPF 50 mineral sunscreen
        trial_period_days:
          description: >-
            The number of trial period days before the customer is first charged
            for a recurring price.
          type:
            - integer
            - 'null'
          format: int32
        unit_amount:
          description: >-
            The amount to charge per unit, in the smallest currency unit (e.g.,
            `2500` = $25.00 USD).
          type: integer
          format: int32
        recurring:
          description: >-
            The recurring components of a price such as interval and trial
            period days.
          anyOf:
            - $ref: '#/components/schemas/Recurring'
            - type: 'null'
        active:
          description: Whether the price is currently active.
          type: boolean
          example: false
        product:
          $ref: '#/components/schemas/Expandable_for_Product'
          description: >-
            The product this price belongs to. Returned as a product ID by
            default, or as the full Product object when expanded.
        created_at:
          $ref: '#/components/schemas/Timestamptz'
          description: The date the price was created.
          example: '2026-06-15T14:30:00Z'
        type:
          $ref: '#/components/schemas/PriceType'
          description: >-
            The type of the price: a single one-time charge, or a recurring
            charge billed on a schedule.
        metadata:
          description: Metadata information for the price object
          type:
            - object
            - 'null'
          example:
            order_id: '8842'
            channel: shopify
        hsa_fsa_eligibility:
          description: The HSA/FSA eligibility for the price.
          anyOf:
            - $ref: '#/components/schemas/HSAFSAElegibility'
            - type: 'null'
        test_mode:
          description: Whether the price is in test mode.
          type: boolean
          example: false
      example:
        price_id: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        owner_partner_id: facct_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        description: Premium SPF 50 mineral sunscreen
        unit_amount: 0
        recurring:
          interval: day
        active: false
        product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        created_at: '2026-06-15T14:30:00Z'
        type: one_time
        metadata:
          order_id: '8842'
          channel: shopify
        hsa_fsa_eligibility: not_eligible
        test_mode: false
    ValidationErrorItem:
      description: >-
        Validation errors have their own schema to provide context for invalid
        requests eg. mismatched types and out of bounds values. There may be any
        number of these per 422 UNPROCESSABLE ENTITY error.
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          description: >-
            The location as a [`Vec`] of [`String`]s -- often in the form
            `["body", "field_name"]`, `["query", "field_name"]`, etc. They may,
            however, be arbitarily deep.
          type: array
          items:
            type: string
        msg:
          description: The message accompanying the validation error item.
          type: string
        type:
          description: >-
            The type of error, often "type_error" or "value_error", but
            sometimes with more context like as "value_error.number.not_ge"
          type: string
      example:
        loc:
          - string
        msg: string
        type: string
    Recurring:
      description: >-
        Describes how a recurring price bills over time. Present on prices of
        type `recurring`; `null` for one-time prices.
      type: object
      required:
        - interval
      properties:
        interval:
          $ref: '#/components/schemas/RecurringInterval'
          description: The billing cadence for the price.
        interval_count:
          description: The number of intervals
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
          maximum: 4294967295
        trial_period_days:
          description: >-
            The number of trial period days before the customer is charged for
            the first time. Whole days only. For a precise trial-end timestamp
            (e.g. non-integer days), use `subscription_data.trial_end` on the
            Create Checkout Session request instead.
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
          maximum: 4294967295
      example:
        interval: day
    CreateProductRequest:
      description: >-
        Parameters for creating a product. HSA/FSA eligibility is determined
        automatically by Flex from the name, description, and identifiers you
        provide, and cannot be set directly.
      type: object
      required:
        - name
      properties:
        name:
          description: The product's name, meant to be displayed to the customer.
          type: string
          example: Example
        description:
          description: >-
            The product's description, a short blurb meant to be displayed to
            the customer.
          type:
            - string
            - 'null'
          example: Premium SPF 50 mineral sunscreen
        upc_code:
          description: >-
            The product's UPC code. If provided, this will be used to check
            whether the product is on the eligible product list.
          type:
            - string
            - 'null'
          example: example_value
        gtin:
          description: >-
            The product's GTIN. If provided, this will be used to check whether
            the product is on the eligible product list.
          type:
            - string
            - 'null'
          example: example_value
        reference_gtin:
          description: >-
            If the product is HSA/FSA eligible through private label, this
            should be provided.
          type:
            - string
            - 'null'
          example: example_value
        url:
          description: A URL of a publicly-accessible image of the product.
          type:
            - string
            - 'null'
          example: https://example.com
        client_reference_id:
          description: >-
            An optional identifier for the product set by the client. Immutable
            after creation.
          type:
            - string
            - 'null'
          example: example_value
        metadata:
          description: >-
            Set of key-value pairs that you can attach to a product. This can be
            useful for storing additional information about the product in a
            structured format.
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          example:
            order_id: '8842'
            channel: shopify
        image_urls:
          description: >-
            URLs of publicly-accessible product images for eligibility
            determination.
          type:
            - array
            - 'null'
          items:
            type: string
          example:
            - https://example.com/image.png
        categories:
          description: Product categories (e.g., "Vitamins", "First Aid").
          type:
            - array
            - 'null'
          items:
            type: string
        components:
          description: Product components or ingredients (e.g., "Vitamin C", "Zinc").
          type:
            - array
            - 'null'
          items:
            type: string
      example:
        name: Example
        description: Premium SPF 50 mineral sunscreen
        upc_code: example_value
        gtin: example_value
        reference_gtin: example_value
        url: https://example.com
        client_reference_id: example_value
        metadata:
          order_id: '8842'
          channel: shopify
        image_urls:
          - https://example.com/image.png
    Expandable_for_Product:
      anyOf:
        - type: string
          example: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        - $ref: '#/components/schemas/Product'
      example: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
      description: An expandable field — either a string ID or an expanded Product object.
    Timestamptz:
      description: >-
        A timestamp encoded as an RFC 3339 / ISO 8601 string (e.g.
        `2026-06-15T14:30:00Z`).
      type: string
      example: string
    PriceType:
      description: Whether the price is charged once or on a recurring schedule.
      type: string
      enum:
        - one_time
        - recurring
      example: one_time
    HSAFSAElegibility:
      description: >-
        How a product qualifies for HSA/FSA payment, which determines the
        substantiation required to pay with a benefits card.
      type: string
      enum:
        - not_eligible
        - auto_substantiation
        - private_label
        - letter_of_medical_necessity
        - prescription
        - vision
        - service
      example: not_eligible
    RecurringInterval:
      description: The frequency at which a recurring price bills.
      type: string
      enum:
        - day
        - week
        - month
        - year
      example: day
    Product:
      description: >-
        A Product defines what you sell. Flex determines its HSA/FSA eligibility
        from the name, description, and identifiers you provide.
      type: object
      required:
        - active
        - created_at
        - hsa_fsa_eligibility
        - name
        - product_id
        - test_mode
      properties:
        product_id:
          description: The unique identifier for the product.
          type: string
          example: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        owner_partner_id:
          description: >-
            The ID of the account that owns this product. For products shared
            across an organization this may be a sibling account; otherwise it
            is your own account ID.
          type:
            - string
            - 'null'
          example: facct_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        name:
          description: The name of the product.
          type: string
          example: Example
        description:
          description: The description of the product.
          type:
            - string
            - 'null'
          example: Premium SPF 50 mineral sunscreen
        document_description:
          description: >-
            Medical-grade description optimized for use in Letters of Medical
            Necessity and receipts.
          deprecated: true
          type:
            - string
            - 'null'
        receipt_description:
          description: Shortened description tailored to receipt line items
          type:
            - string
            - 'null'
        created_at:
          $ref: '#/components/schemas/Timestamptz'
          description: The date the product was created.
          example: '2026-06-15T14:30:00Z'
        visit_type:
          description: >-
            The visit type of the product if a letter of medical necessity is
            required.
          anyOf:
            - $ref: '#/components/schemas/VisitTypeName'
            - type: 'null'
        active:
          description: Determines if the product is active or not.
          type: boolean
          example: false
        upc_code:
          description: The upc code of the product.
          type:
            - string
            - 'null'
        gtin:
          description: The gtin code of the product.
          type:
            - string
            - 'null'
        reference_gtin:
          description: >-
            The GTIN of a private-label reference product, used to establish
            HSA/FSA eligibility.
          type:
            - string
            - 'null'
        hsa_fsa_eligibility:
          $ref: '#/components/schemas/HSAFSAElegibility'
          description: The elegibility of the product for HSA/FSA.
        test_mode:
          description: Whether the product is in test mode or not.
          type: boolean
          example: false
        metadata:
          description: Metadata associated with the product.
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          example:
            order_id: '8842'
            channel: shopify
        url:
          description: The URL of the product.
          type:
            - string
            - 'null'
          example: https://example.com
        client_reference_id:
          description: >-
            An optional identifier for the product set by the client at creation
            time. Immutable after creation.
          type:
            - string
            - 'null'
          example: obj_01J9XR8M3K7VZ8N2YB4WJ6T0RA
      example:
        product_id: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        owner_partner_id: facct_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        name: Example
        description: Premium SPF 50 mineral sunscreen
        created_at: '2026-06-15T14:30:00Z'
        visit_type: cbtSleep
        active: false
        hsa_fsa_eligibility: not_eligible
        test_mode: false
        metadata:
          order_id: '8842'
          channel: shopify
        url: https://example.com
        client_reference_id: obj_01J9XR8M3K7VZ8N2YB4WJ6T0RA
    VisitTypeName:
      description: The name of the telehealth visit type.
      type: string
      enum:
        - cbtSleep
        - notApplicable
        - metabolomics
        - tinnitus
        - gym
        - exerciseDiet
        - orthopedic
        - alcohol
        - airPurification
        - vaginalHealth
        - menstrual
        - canopy
        - alopecia
        - genate
        - weightBlanket
        - bedJet
        - siderAl
        - sunwinkPowder
        - wavWatch
        - bodyComplete
        - ageRate
        - nitrousOxide
        - happyV
        - groupChat
        - icalmAnxiety
        - redBloom
        - foodom
        - branchErgonomicFurniture
        - curalife
        - eloraInfantWellness
        - nutriHealth
        - olipop
        - goldIntimate
        - touchStoneEssentials
        - utiva
        - sleepGeekz
        - figBrew
        - auBabyBlanket
        - babySleepSack
        - oshWellness
        - currentBodyRedLight
        - mito
        - circularRing
        - lymaRedLight
        - goodAirRx
        - tastermonial
        - karunaHome
        - ergoStandingChair
        - jbaGlucoseControl
        - bloomNutrition
        - buoyDrops
        - luxeWonderWig
        - saunaMarketplace
        - amrioreEyewear
        - pivotOrthoShoe
        - lumenCynergy
        - roga
        - pulsetto
        - mitoRedLight
        - gutPersonal
        - goFlaus
        - myHixel
        - calmigo
        - dotFit
        - stripesBeauty
        - mixHers
        - pmd
        - positivityWithPurpose
        - techRing
        - popVeneers
        - vertaClean
        - lumen
        - medicalMeal
        - emnHealth
        - detergentAllergy
        - lowImpactExercise
        - mediumImpactExercise
        - highImpactExercise
        - gardening
        - babyCarrier
        - coolingBed
        - posture
        - supplements
        - sleep
        - redLightTherapy
        - fitness
        - smartRing
        - womensVaginalHealth
        - fertilitySupport
        - femaleReproduction
        - femaleReproductionFood
        - pregnancyLiterature
        - iceBath
        - orthopedicShoes
        - sexualHealth
        - glucose
        - metabolicTest
        - skinCare
        - oralHealth
        - oralAnxiety
        - blueLightGlasses
        - anxiety
        - brainHealth
        - babyMonitor
        - compressionSocks
        - compressionShorts
        - waterPurification
        - medSpa
        - essentialOils
        - sleepBuds
        - latchLight
        - nutritionist
        - rairflow
        - enduranceTraining
        - hydration
        - hairGrowth
        - eD
        - postureFitness
        - childDevelopment
        - adaptiveClothing
        - adaptiveShoes
        - sleepConsulting
        - hairRemoval
        - menopause
        - maleFertility
        - anxietyHealth
        - bidets
        - speechHealth
        - smartGlasses
        - artOfLiving
        - breastMilk
        - breathWork
        - petSupport
        - diapers
        - gutSupplements
        - smartWatch
        - medicalBotox
        - biomechanicalAssessment
        - erectileReset
        - femaleOrgasm
        - pornAddiction
        - oralHealthMasticGum
      example: cbtSleep
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use a Bearer token to access this API.

````