> ## 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 Payment Link

> Creates a payment link: a shareable URL that generates a checkout session each time a customer
opens it. The mode is determined by `line_items` — it becomes `subscription` if any price is
recurring, otherwise `payment`; pass `mode=setup` to save a payment method without a charge
(setup mode requires a `label` and empty `line_items`). Creating a link may create supporting
objects as a side effect: inline `price_data` provisions a Product and Price (in Stripe and
Flex), inline shipping rate data creates a Shipping Rate, and inline `coupon_data` discounts
create Coupons. Promotion codes are not accepted as discounts here — use coupon IDs or inline
coupon data.



## OpenAPI

````yaml /openapi.json post /v1/payment_links
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/payment_links:
    post:
      tags:
        - Payment Links
      summary: Create Payment Link
      description: >-
        Creates a payment link: a shareable URL that generates a checkout
        session each time a customer

        opens it. The mode is determined by `line_items` — it becomes
        `subscription` if any price is

        recurring, otherwise `payment`; pass `mode=setup` to save a payment
        method without a charge

        (setup mode requires a `label` and empty `line_items`). Creating a link
        may create supporting

        objects as a side effect: inline `price_data` provisions a Product and
        Price (in Stripe and

        Flex), inline shipping rate data creates a Shipping Rate, and inline
        `coupon_data` discounts

        create Coupons. Promotion codes are not accepted as discounts here — use
        coupon IDs or inline

        coupon data.
      operationId: v1.payment_links.create
      requestBody:
        description: An envelope wrapping a single payment link object.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentLinkBody_for_CreatePaymentLink'
            example:
              payment_link:
                line_items:
                  - price: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                    price_data:
                      description: Premium SPF 50 mineral sunscreen
                      unit_amount: 2500
                      recurring:
                        interval: day
                        interval_count: 0
                        trial_period_days: 0
                      metadata:
                        order_id: '8842'
                        channel: shopify
                      product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                      product_data:
                        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
                        categories:
                          - string
                        components:
                          - string
                    quantity: 0
                    shipping_options:
                      shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                      shipping_rate_data:
                        display_name: Example
                        amount: 2500
                        metadata:
                          order_id: '8842'
                          channel: shopify
                    tax_rate:
                      amount: 2500
                    components:
                      - quantity: 1
                        dressing_mode: MIXED
                        component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                        client_reference_id: string
                label: Example
                shipping_address_collection: false
                shipping_options:
                  shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                  shipping_rate_data:
                    display_name: Example
                    amount: 2500
                    metadata:
                      order_id: '8842'
                      channel: shopify
                metadata:
                  order_id: '8842'
                  channel: shopify
                payment_intent_data:
                  capture_method: automatic
                  metadata:
                    order_id: '8842'
                    channel: shopify
                after_completion:
                  type: redirect
                  hosted_confirmation:
                    custom_message: Premium SPF 50 mineral sunscreen
                  redirect:
                    url: https://example.com
                allow_promotion_codes: false
                origin: shopify
                tax_rate:
                  amount: 2500
                discounts:
                  - coupon_id: fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                    promo_code_id: fpromo_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                    coupon_data:
                      applies_to:
                        products:
                          - fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                      name: Coupon
                      amount_off: 100
                      duration: once
                      percent_off: 10
                      max_redemptions: 100
                      metadata:
                        key: value
                mode: payment
                setup_future_use: on_session
        required: true
      responses:
        '200':
          description: An envelope wrapping a single payment link object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLinkBody_for_PaymentLink'
              example:
                payment_link:
                  payment_link_id: fplink_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                  label: Example
                  active: false
                  line_items:
                    - price: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                      price_data:
                        description: Premium SPF 50 mineral sunscreen
                        unit_amount: 2500
                        recurring:
                          interval: day
                          interval_count: 0
                          trial_period_days: 0
                        metadata:
                          order_id: '8842'
                          channel: shopify
                        product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                        product_data:
                          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
                          categories:
                            - string
                          components:
                            - string
                      quantity: 0
                      shipping_options:
                        shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                        shipping_rate_data:
                          display_name: Example
                          amount: 2500
                          metadata:
                            order_id: '8842'
                            channel: shopify
                      tax_rate:
                        amount: 2500
                      components:
                        - quantity: 1
                          dressing_mode: MIXED
                          component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                          client_reference_id: string
                  allow_promotion_codes: false
                  shipping_address_collection: false
                  shipping_options:
                    shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                    shipping_amount: 2500
                    display_name: Example
                  metadata:
                    order_id: '8842'
                    channel: shopify
                  url: https://example.com
                  created_at: '2026-06-15T14:30:00Z'
                  payment_intent_data:
                    capture_method: automatic
                    metadata:
                      order_id: '8842'
                      channel: shopify
                  after_completion:
                    type: redirect
                    hosted_confirmation:
                      custom_message: Premium SPF 50 mineral sunscreen
                    redirect:
                      url: https://example.com
                  origin: shopify
                  tax_rate:
                    amount: 2500
                  discounts:
                    - fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                  setup_future_use: on_session
                  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
components:
  schemas:
    PaymentLinkBody_for_CreatePaymentLink:
      description: An envelope wrapping a single payment link object.
      type: object
      required:
        - payment_link
      properties:
        payment_link:
          $ref: '#/components/schemas/CreatePaymentLink'
          description: The payment link.
      example:
        payment_link:
          line_items:
            - price: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              price_data:
                description: Premium SPF 50 mineral sunscreen
                unit_amount: 2500
                recurring:
                  interval: day
                  interval_count: 0
                  trial_period_days: 0
                metadata:
                  order_id: '8842'
                  channel: shopify
                product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                product_data:
                  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
                  categories:
                    - string
                  components:
                    - string
              quantity: 0
              shipping_options:
                shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                shipping_rate_data:
                  display_name: Example
                  amount: 2500
                  metadata:
                    order_id: '8842'
                    channel: shopify
              tax_rate:
                amount: 2500
              components:
                - quantity: 1
                  dressing_mode: MIXED
                  component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                  client_reference_id: string
          label: Example
          shipping_address_collection: false
          shipping_options:
            shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            shipping_rate_data:
              display_name: Example
              amount: 2500
              metadata:
                order_id: '8842'
                channel: shopify
          metadata:
            order_id: '8842'
            channel: shopify
          payment_intent_data:
            capture_method: automatic
            metadata:
              order_id: '8842'
              channel: shopify
          after_completion:
            type: redirect
            hosted_confirmation:
              custom_message: Premium SPF 50 mineral sunscreen
            redirect:
              url: https://example.com
          allow_promotion_codes: false
          origin: shopify
          tax_rate:
            amount: 2500
          discounts:
            - coupon_id: fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              promo_code_id: fpromo_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              coupon_data:
                applies_to:
                  products:
                    - fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                name: Coupon
                amount_off: 100
                duration: once
                percent_off: 10
                max_redemptions: 100
                metadata:
                  key: value
          mode: payment
          setup_future_use: on_session
    PaymentLinkBody_for_PaymentLink:
      description: An envelope wrapping a single payment link object.
      type: object
      required:
        - payment_link
      properties:
        payment_link:
          $ref: '#/components/schemas/PaymentLink'
          description: The payment link.
      example:
        payment_link:
          payment_link_id: fplink_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          label: Example
          active: false
          line_items:
            - price: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              price_data:
                description: Premium SPF 50 mineral sunscreen
                unit_amount: 2500
                recurring:
                  interval: day
                  interval_count: 0
                  trial_period_days: 0
                metadata:
                  order_id: '8842'
                  channel: shopify
                product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                product_data:
                  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
                  categories:
                    - string
                  components:
                    - string
              quantity: 0
              shipping_options:
                shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                shipping_rate_data:
                  display_name: Example
                  amount: 2500
                  metadata:
                    order_id: '8842'
                    channel: shopify
              tax_rate:
                amount: 2500
              components:
                - quantity: 1
                  dressing_mode: MIXED
                  component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                  client_reference_id: string
          allow_promotion_codes: false
          shipping_address_collection: false
          shipping_options:
            shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            shipping_amount: 2500
            display_name: Example
          metadata:
            order_id: '8842'
            channel: shopify
          url: https://example.com
          created_at: '2026-06-15T14:30:00Z'
          payment_intent_data:
            capture_method: automatic
            metadata:
              order_id: '8842'
              channel: shopify
          after_completion:
            type: redirect
            hosted_confirmation:
              custom_message: Premium SPF 50 mineral sunscreen
            redirect:
              url: https://example.com
          origin: shopify
          tax_rate:
            amount: 2500
          discounts:
            - fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          setup_future_use: on_session
          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
    CreatePaymentLink:
      description: Parameters for creating a payment link.
      type: object
      properties:
        line_items:
          description: >-
            The line items representing what is being sold. Required for
            payment/subscription modes. Must be empty or omitted for setup mode.
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/NewLineItem'
        label:
          description: >-
            Custom name shown for the payment link. When omitted, a label is
            auto-generated from the first line item's product (e.g. "Product
            name and 2 more"). Required for setup mode, where there are no
            products to derive a name from.
          type:
            - string
            - 'null'
          example: Example
        shipping_address_collection:
          description: >-
            Whether to collect a shipping address from the customer at checkout.
            Defaults to `false`.
          type:
            - boolean
            - 'null'
          example: false
        shipping_options:
          description: >-
            Shipping rate applied to checkout sessions generated from this link.
            Provide either an existing shipping rate ID or inline shipping rate
            data; inline data creates a new Shipping Rate. When omitted, no
            shipping fee is applied.
          anyOf:
            - $ref: '#/components/schemas/ShippingRateOptionsRequest'
            - type: 'null'
        metadata:
          description: >-
            Set of key-value pairs you can attach to the payment link for
            storing additional structured information.
          type:
            - object
            - 'null'
          example:
            order_id: '8842'
            channel: shopify
        payment_intent_data:
          description: >-
            Parameters passed through to the PaymentIntent created during
            checkout, such as the capture method and payment-intent-level
            metadata.
          anyOf:
            - $ref: '#/components/schemas/PaymentIntentDataRequest'
            - type: 'null'
        after_completion:
          description: >-
            Behavior after the customer completes a checkout session generated
            from this link. When omitted, defaults to showing the hosted
            confirmation page.
          anyOf:
            - $ref: '#/components/schemas/AfterCompletion'
            - type: 'null'
        allow_promotion_codes:
          description: >-
            Whether customers may enter promotion codes at checkout. Defaults to
            `false`.
          type:
            - boolean
            - 'null'
          example: false
        origin:
          description: >-
            The integration or surface this payment link originated from. `null`
            for links created directly via the API. Setting `renewal` is
            rejected: that origin is reserved for sessions Flex mints itself.
          anyOf:
            - $ref: '#/components/schemas/CheckoutSessionOrigin'
            - type: 'null'
        tax_rate:
          description: Session-level flat tax amount in cents (e.g., 500 = $5.00)
          anyOf:
            - $ref: '#/components/schemas/TaxRate'
            - type: 'null'
        discounts:
          description: >-
            Discounts to apply when generating checkout sessions. Supports
            existing coupon IDs or inline coupon creation via coupon_data.
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/DiscountType'
        mode:
          description: >-
            The mode of the checkout session. Defaults to "payment".
            `reimbursement` is rejected with `mode_not_supported`. Use "setup"
            to save a payment method without charging.
          anyOf:
            - $ref: '#/components/schemas/Mode'
            - type: 'null'
        setup_future_use:
          description: >-
            Controls how the payment method is saved for future use on checkout
            sessions generated from this link. Use "off_session" to save the
            card for future merchant-initiated charges, or "on_session" for
            payments where the customer is present. When omitted, defaults based
            on mode ("setup" → "off_session", otherwise "on_session").
          anyOf:
            - $ref: '#/components/schemas/FutureUse'
            - type: 'null'
      example:
        line_items:
          - price: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            price_data:
              description: Premium SPF 50 mineral sunscreen
              unit_amount: 2500
              recurring:
                interval: day
                interval_count: 0
                trial_period_days: 0
              metadata:
                order_id: '8842'
                channel: shopify
              product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              product_data:
                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
                categories:
                  - string
                components:
                  - string
            quantity: 0
            shipping_options:
              shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              shipping_rate_data:
                display_name: Example
                amount: 2500
                metadata:
                  order_id: '8842'
                  channel: shopify
            tax_rate:
              amount: 2500
            components:
              - quantity: 1
                dressing_mode: MIXED
                component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                client_reference_id: string
        label: Example
        shipping_address_collection: false
        shipping_options:
          shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          shipping_rate_data:
            display_name: Example
            amount: 2500
            metadata:
              order_id: '8842'
              channel: shopify
        metadata:
          order_id: '8842'
          channel: shopify
        payment_intent_data:
          capture_method: automatic
          metadata:
            order_id: '8842'
            channel: shopify
        after_completion:
          type: redirect
          hosted_confirmation:
            custom_message: Premium SPF 50 mineral sunscreen
          redirect:
            url: https://example.com
        allow_promotion_codes: false
        origin: shopify
        tax_rate:
          amount: 2500
        discounts:
          - coupon_id: fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            promo_code_id: fpromo_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            coupon_data:
              applies_to:
                products:
                  - fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              name: Coupon
              amount_off: 100
              duration: once
              percent_off: 10
              max_redemptions: 100
              metadata:
                key: value
        mode: payment
        setup_future_use: on_session
    PaymentLink:
      description: >-
        A Payment Link represents a shareable URL that generates a checkout
        session each time a customer opens it. Use it to sell products or
        collect a payment method without building your own checkout page.
      type: object
      required:
        - active
        - after_completion
        - allow_promotion_codes
        - created_at
        - payment_link_id
        - setup_future_use
        - shipping_address_collection
        - test_mode
        - url
      properties:
        payment_link_id:
          description: Unique identifier for the Payment Link
          type: string
          example: fplink_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        label:
          description: Provided or generated label for the payment link.
          type:
            - string
            - 'null'
          example: Example
        active:
          description: >-
            Whether the payment link is currently active. If false, the link can
            no longer be used to generate checkout sessions and customers
            visiting the URL will be shown a not-found page.
          type: boolean
          example: false
        line_items:
          description: The line items representing what is being sold.
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/NewLineItem'
        allow_promotion_codes:
          description: Whether promo codes are enabled
          type: boolean
          example: false
        shipping_address_collection:
          description: Whether we want to collect shipping details at checkout time
          type: boolean
          example: false
        shipping_options:
          description: The shipping rate options applied to the session.
          anyOf:
            - $ref: '#/components/schemas/ShippingRateOptions'
            - type: 'null'
        metadata:
          description: Metadata to attach to the payment session
          type:
            - object
            - 'null'
          example:
            order_id: '8842'
            channel: shopify
        url:
          description: The public URL that can be shared with customers.
          type: string
          example: https://example.com
        created_at:
          $ref: '#/components/schemas/Timestamptz'
          description: Time at which the object was created. ISO 8601 format.
          example: '2026-06-15T14:30:00Z'
        payment_intent_data:
          description: >-
            Indicates the parameters to be passed to PaymentIntent creation
            during checkout.
          anyOf:
            - $ref: '#/components/schemas/PaymentIntentData'
            - type: 'null'
        after_completion:
          $ref: '#/components/schemas/AfterCompletion'
          description: Behavior after the purchase is complete.
        origin:
          description: Origin of the payment link
          anyOf:
            - $ref: '#/components/schemas/CheckoutSessionOrigin'
            - type: 'null'
        tax_rate:
          description: Session-level flat tax amount in cents (e.g., 500 = $5.00)
          anyOf:
            - $ref: '#/components/schemas/TaxRate'
            - type: 'null'
        discounts:
          description: >-
            Pre-stored coupon IDs to apply as discounts when generating checkout
            sessions
          type:
            - array
            - 'null'
          items:
            type: string
            example: fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        setup_future_use:
          $ref: '#/components/schemas/FutureUse'
          description: >-
            How the payment method is saved for future use on checkout sessions
            generated from this link. "off_session" keeps the card on file for
            future merchant-initiated charges; "on_session" requires the
            customer to be present for future payments.
        test_mode:
          description: Whether the payment link was created in test mode
          type: boolean
          example: false
      example:
        payment_link_id: fplink_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        label: Example
        active: false
        line_items:
          - price: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            price_data:
              description: Premium SPF 50 mineral sunscreen
              unit_amount: 2500
              recurring:
                interval: day
                interval_count: 0
                trial_period_days: 0
              metadata:
                order_id: '8842'
                channel: shopify
              product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              product_data:
                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
                categories:
                  - string
                components:
                  - string
            quantity: 0
            shipping_options:
              shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
              shipping_rate_data:
                display_name: Example
                amount: 2500
                metadata:
                  order_id: '8842'
                  channel: shopify
            tax_rate:
              amount: 2500
            components:
              - quantity: 1
                dressing_mode: MIXED
                component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                client_reference_id: string
        allow_promotion_codes: false
        shipping_address_collection: false
        shipping_options:
          shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          shipping_amount: 2500
          display_name: Example
        metadata:
          order_id: '8842'
          channel: shopify
        url: https://example.com
        created_at: '2026-06-15T14:30:00Z'
        payment_intent_data:
          capture_method: automatic
          metadata:
            order_id: '8842'
            channel: shopify
        after_completion:
          type: redirect
          hosted_confirmation:
            custom_message: Premium SPF 50 mineral sunscreen
          redirect:
            url: https://example.com
        origin: shopify
        tax_rate:
          amount: 2500
        discounts:
          - fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        setup_future_use: on_session
        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
    NewLineItem:
      description: >-
        A line item to add to a Checkout Session, referencing an existing Price
        or supplying inline price data, together with the quantity and any
        per-item shipping or tax.
      type: object
      required:
        - quantity
      properties:
        price:
          description: >-
            The ID of the Price object. One of price or price_data is required.
            If both are sent, price wins and price_data is ignored.
          type:
            - string
            - 'null'
          example: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        price_data:
          description: >-
            Data used to generate a new Price object inline. One of price or
            price_data is required. If both are sent, price wins and price_data
            is ignored; price_data alone is used as-sent.
          anyOf:
            - $ref: '#/components/schemas/InlinePriceDataRequest'
            - type: 'null'
        quantity:
          description: The quantity of the line item being purchased.
          type: integer
          format: int32
          minimum: -2147483648
          maximum: 2147483647
        shipping_options:
          description: Shipping rate options for the line item.
          anyOf:
            - $ref: '#/components/schemas/ShippingRateOptionsRequest'
            - type: 'null'
        tax_rate:
          description: Tax rate for a specific line item
          anyOf:
            - $ref: '#/components/schemas/TaxRate'
            - type: 'null'
        components:
          description: >-
            The components of this line item's build, e.g. the ingredients of a
            bowl. A supplied list is the whole build for this order and is never
            merged with anything stored on the product. Omit it entirely for a
            fixed-recipe product, whose build is read from its own
            `medical_meal_recipe_v1` metadata instead; an explicit empty list is
            rejected. Each entry names its component by `component_id` or by
            your own `client_reference_id`, and must resolve to a component you
            own or a shared one. At most 50 entries per line item.
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/LineItemComponent'
          maxItems: 50
      example:
        price: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        price_data:
          description: Premium SPF 50 mineral sunscreen
          unit_amount: 2500
          recurring:
            interval: day
            interval_count: 0
            trial_period_days: 0
          metadata:
            order_id: '8842'
            channel: shopify
          product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          product_data:
            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
            categories:
              - string
            components:
              - string
        quantity: 0
        shipping_options:
          shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          shipping_rate_data:
            display_name: Example
            amount: 2500
            metadata:
              order_id: '8842'
              channel: shopify
        tax_rate:
          amount: 2500
        components:
          - quantity: 1
            dressing_mode: MIXED
            component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            client_reference_id: string
    ShippingRateOptionsRequest:
      description: >-
        Specifies the shipping rate to apply, either by referencing an existing
        rate or by providing inline data to create one. Provide one of
        `shipping_rate_id` or `shipping_rate_data`; at least one is required.
      type: object
      properties:
        shipping_rate_id:
          description: >-
            ID of an existing shipping rate to apply. Provide this or
            `shipping_rate_data`.
          type:
            - string
            - 'null'
          example: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        shipping_rate_data:
          description: >-
            Inline shipping rate parameters used to create a new shipping rate.
            Provide this or `shipping_rate_id`.
          anyOf:
            - $ref: '#/components/schemas/CreateShippingRateRequest'
            - type: 'null'
      example:
        shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        shipping_rate_data:
          display_name: Example
          amount: 2500
          metadata:
            order_id: '8842'
            channel: shopify
    PaymentIntentDataRequest:
      description: Parameters passed to the PaymentIntent created during checkout.
      type: object
      required:
        - capture_method
      properties:
        capture_method:
          $ref: '#/components/schemas/PaymentIntentCaptureMethod'
          description: >-
            How the PaymentIntent is captured: `automatic` captures the funds
            immediately after the customer authorizes the payment,
            `automatic_async` captures asynchronously, and `manual` authorizes
            the payment and requires a separate capture. Required when
            `payment_intent_data` is supplied; `automatic` is used when
            `payment_intent_data` is omitted entirely.
        metadata:
          description: >-
            Set of key-value pairs attached to the PaymentIntent created during
            checkout, for storing additional structured information.
          type:
            - object
            - 'null'
          example:
            order_id: '8842'
            channel: shopify
      example:
        capture_method: automatic
        metadata:
          order_id: '8842'
          channel: shopify
    AfterCompletion:
      description: >-
        Configures what the customer sees after completing a checkout session
        generated from a payment link.
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/AfterCompletionType'
          description: >-
            The behavior to apply after completion: `hosted_confirmation`
            (Default) shows a Flex-hosted confirmation page, and `redirect`
            sends the customer to a URL you specify.
        hosted_confirmation:
          description: >-
            Configuration for the hosted confirmation page. Applies when `type`
            is `hosted_confirmation`; `null` otherwise.
          anyOf:
            - $ref: '#/components/schemas/HostedConfirmation'
            - type: 'null'
        redirect:
          description: >-
            Configuration for the post-completion redirect. Applies when `type`
            is `redirect`; `null` otherwise.
          anyOf:
            - $ref: '#/components/schemas/Redirect'
            - type: 'null'
      example:
        type: redirect
        hosted_confirmation:
          custom_message: Premium SPF 50 mineral sunscreen
        redirect:
          url: https://example.com
    CheckoutSessionOrigin:
      description: Origin of where the checkout session was generated
      type: string
      enum:
        - shopify
        - shopline
        - prepurchase
        - postpurchase
        - renewal
      example: shopify
    TaxRate:
      description: >-
        A fixed tax amount to apply to a Checkout Session or line item. Use this
        to pass a tax figure you have calculated yourself, rather than having
        Flex compute it.
      type: object
      required:
        - amount
      properties:
        amount:
          description: >-
            The tax amount to apply, in the smallest currency unit (e.g., `175`
            = $1.75 USD).
          type: integer
          format: int32
          example: 2500
          minimum: -2147483648
          maximum: 2147483647
      example:
        amount: 2500
    DiscountType:
      description: >-
        Specifies a discount to apply, as one of: an existing coupon referenced
        by ID, an existing promotion code referenced by ID, or inline coupon
        data to create a new coupon and apply it.
      type: object
      properties:
        coupon_id:
          description: ID of an existing Coupon to apply.
          type: string
          example: fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        promo_code_id:
          description: >-
            ID of an existing PromoCode to apply. The discount is sourced from
            the coupon the promotion code references.
          type: string
          example: fpromo_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        coupon_data:
          $ref: '#/components/schemas/CreateCouponRequest'
          description: >-
            Inline coupon parameters used to create a new Coupon, which is then
            applied.
      example:
        coupon_id: fcoup_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        promo_code_id: fpromo_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        coupon_data:
          applies_to:
            products:
              - fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
          name: Coupon
          amount_off: 100
          duration: once
          percent_off: 10
          max_redemptions: 100
          metadata:
            key: value
    Mode:
      description: >-
        The mode of the checkout session, which determines what happens on
        completion: a one-time payment, starting a subscription, charging a
        saved payment method off-session, or saving a payment method for future
        use. `reimbursement` is in limited release: it issues a letter for a
        purchase made elsewhere and charges only an explicit `lmn_consultation`
        fee. Checkout sessions return `mode_not_supported` for it unless it is
        enabled for your account; payment links always do.
      type: string
      enum:
        - payment
        - subscription
        - off_session
        - setup
        - reimbursement
      example: payment
    FutureUse:
      type: string
      enum:
        - on_session
        - off_session
      x-ms-enum:
        name: FutureUse
        modelAsString: false
        values:
          - value: on_session
            name: OnSession
            description: Standard payments requiring customer auth
          - value: off_session
            name: OffSession
            description: Allows payments without the customer present in the flow
      description: >-
        - `on_session`: Standard payments requiring customer auth

        - `off_session`: Allows payments without the customer present in the
        flow
      example: on_session
    ShippingRateOptions:
      description: >-
        A resolved shipping option attached to a checkout session or payment
        link, capturing the applied shipping rate and its cost.
      type: object
      required:
        - shipping_amount
        - shipping_rate_id
      properties:
        shipping_rate_id:
          description: ID of the applied shipping rate.
          type: string
          example: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        shipping_amount:
          description: >-
            The shipping cost, in the smallest currency unit (e.g., `500` =
            $5.00 USD). Charged in USD.
          type: integer
          format: int32
          example: 2500
          minimum: -2147483648
          maximum: 2147483647
        display_name:
          description: >-
            The display name of the shipping rate (e.g., "Standard Shipping",
            "Express").
          type:
            - string
            - 'null'
          example: Example
      example:
        shipping_rate_id: fshr_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        shipping_amount: 2500
        display_name: Example
    Timestamptz:
      description: >-
        A timestamp encoded as an RFC 3339 / ISO 8601 string (e.g.
        `2026-06-15T14:30:00Z`).
      type: string
      example: string
    PaymentIntentData:
      description: >-
        Indicates the parameters to be passed to PaymentIntent creation during
        checkout
      type: object
      required:
        - capture_method
      properties:
        capture_method:
          $ref: '#/components/schemas/PaymentIntentCaptureMethod'
          description: >-
            How the PaymentIntent is captured: `automatic` captures the funds
            immediately after the customer authorizes the payment,
            `automatic_async` captures asynchronously, and `manual` authorizes
            the payment and requires a separate capture. Required when
            `payment_intent_data` is supplied; `automatic` is used when
            `payment_intent_data` is omitted entirely.
        metadata:
          description: >-
            Set of key-value pairs attached to the PaymentIntent created during
            checkout, for storing additional structured information.
          type:
            - object
            - 'null'
          example:
            order_id: '8842'
            channel: shopify
      example:
        capture_method: automatic
        metadata:
          order_id: '8842'
          channel: shopify
    InlinePriceDataRequest:
      description: >-
        The shape of a price defined inline on another resource, as
        `price_data`. Reference an existing product with `product`, or create
        one inline with `product_data`.
      type: object
      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.
      required:
        - unit_amount
      example:
        description: Premium SPF 50 mineral sunscreen
        unit_amount: 2500
        recurring:
          interval: day
          interval_count: 0
          trial_period_days: 0
        metadata:
          order_id: '8842'
          channel: shopify
        product: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        product_data:
          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
          categories:
            - string
          components:
            - string
    LineItemComponent:
      description: One component of a line item's build, as sent at checkout.
      type: object
      properties:
        quantity:
          description: >-
            How many portions of the component. A standard build is `1.0`, which
            is also the default when omitted. Must be a positive, finite number.
          default: 1
          type: number
          format: double
          example: 1
        dressing_mode:
          description: >-
            How the dressing was ordered: mixed into the bowl or served on the
            side. Only meaningful for dressing components; ignored otherwise. A
            mixed-in dressing counts toward eligibility gating, an on-the-side
            one does not, and an omitted mode is treated as mixed in (the
            conservative direction). Taken as sent — not cross-checked against
            the catalog.
          anyOf:
            - $ref: '#/components/schemas/DressingMode'
            - type: 'null'
        component_id:
          description: >-
            The component's `fcomp_` identifier, from `/v1/product_components`.
            The component must be one of yours or one of Flex's shared
            components. Each entry names at least one of `component_id` or
            `client_reference_id`; if both are sent, `component_id` wins and the
            reference is ignored.
          type: string
          example: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        client_reference_id:
          description: >-
            Your own identifier for the component, as registered on
            `/v1/product_components` (CON-1550). Each entry names at least one
            of `component_id` or `client_reference_id`; if both are sent,
            `component_id` wins and the reference is ignored.
          type: string
      example:
        quantity: 1
        dressing_mode: MIXED
        component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        client_reference_id: string
    CreateShippingRateRequest:
      description: Parameters for creating a shipping rate.
      type: object
      required:
        - amount
        - display_name
      properties:
        display_name:
          description: >-
            The name shown to the customer at checkout (e.g., `Standard
            Shipping`). Must be at least 2 characters.
          type: string
          minLength: 2
          example: Example
        amount:
          description: >-
            The shipping cost, in the smallest currency unit (e.g., `500` =
            $5.00 USD). Charged in USD.
          type: integer
          format: int32
          example: 2500
          minimum: -2147483648
          maximum: 2147483647
        metadata:
          description: >-
            Set of key-value pairs you can attach to the shipping rate for
            storing additional structured information.
          type:
            - object
            - 'null'
          example:
            order_id: '8842'
            channel: shopify
      example:
        display_name: Example
        amount: 2500
        metadata:
          order_id: '8842'
          channel: shopify
    PaymentIntentCaptureMethod:
      description: >-
        Controls when funds are captured: automatically once the payment is
        confirmed, or manually at a later time.
      type: string
      enum:
        - automatic
        - automatic_async
        - manual
      example: automatic
    AfterCompletionType:
      description: >-
        What happens after a payment link checkout completes: a redirect to your
        URL, or a Flex-hosted confirmation page.
      type: string
      enum:
        - redirect
        - hosted_confirmation
      example: redirect
    HostedConfirmation:
      description: >-
        Hosted confirmation page shown after a completed checkout when
        `after_completion.type` is `hosted_confirmation`.
      type: object
      properties:
        custom_message:
          description: >-
            A custom message displayed to the customer on the hosted
            confirmation page.
          type:
            - string
            - 'null'
          example: Premium SPF 50 mineral sunscreen
      example:
        custom_message: Premium SPF 50 mineral sunscreen
    Redirect:
      description: >-
        Redirect behavior applied after a completed checkout when
        `after_completion.type` is `redirect`.
      type: object
      required:
        - url
      properties:
        url:
          description: The URL the customer is redirected to after completing the checkout.
          type: string
          format: uri
          example: https://example.com
      example:
        url: https://example.com
    CreateCouponRequest:
      description: >-
        Parameters for creating a coupon. Exactly one of `amount_off` or
        `percent_off` must be set.
      type: object
      required:
        - name
      properties:
        applies_to:
          description: >-
            An object containing directions for what this Coupon will apply
            discounts to. If null, the coupon applies to the entire order.
          anyOf:
            - $ref: '#/components/schemas/AppliesTo'
            - type: 'null'
        name:
          description: Name of the coupon displayed to customers.
          type: string
          example: Coupon
        amount_off:
          description: >-
            A positive integer representing the amount to subtract from an
            invoice total (required if percent_off is not passed).
          type:
            - integer
            - 'null'
          format: int32
          maximum: 2147483647
          example: 100
          minimum: -2147483648
        duration:
          description: >-
            Specifies how long the discount will be in effect if used on a
            subscription. Defaults to once.
          anyOf:
            - $ref: '#/components/schemas/CouponDuration'
            - type: 'null'
          example: once
        duration_in_months:
          description: >-
            Required only if duration is repeating, in which case it must be a
            positive integer that specifies the number of months the discount
            will be in effect.
          type:
            - integer
            - 'null'
          format: int32
          maximum: 2147483647
          minimum: -2147483648
        percent_off:
          description: >-
            A positive float larger than 0, and smaller or equal to 100, that
            represents the discount the coupon will apply (required if
            amount_off is not passed).
          type:
            - number
            - 'null'
          format: double
          example: 10
        max_redemptions:
          description: >-
            A positive integer specifying the number of times the coupon can be
            redeemed before it’s no longer valid.
          type:
            - integer
            - 'null'
          format: int32
          maximum: 2147483647
          example: 100
          minimum: -2147483648
        metadata:
          description: Metadata to attach to this coupon.
          type:
            - object
            - 'null'
          example:
            key: value
      example:
        applies_to:
          products:
            - fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        name: Coupon
        amount_off: 100
        duration: once
        percent_off: 10
        max_redemptions: 100
        metadata:
          key: value
    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
        interval_count: 0
        trial_period_days: 0
    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
        categories:
          - string
        components:
          - string
    DressingMode:
      description: >-
        How a dressing component was ordered, as sent at checkout.


        Wire values are the partner payload agreement's (`MIXED` /
        `ON_THE_SIDE`); the eligibility engine's [`DressingPlacement`] is the
        internal counterpart, reached only through the [`From`] mapping below so
        the wire shape and the engine shape can evolve independently.
      type: string
      enum:
        - MIXED
        - ON_THE_SIDE
      example: MIXED
    AppliesTo:
      description: What a coupon's discount is restricted to.
      anyOf:
        - type: object
          required:
            - products
          properties:
            products:
              description: The product that this coupon applies to.
              type: array
              items:
                type: string
                example: fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        - type: object
          required:
            - prices
          properties:
            prices:
              description: The price that this coupon applies to.
              type: array
              items:
                type: string
                example: fprice_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        - type: object
          required:
            - fee_types
          properties:
            fee_types:
              description: The fee types that this coupon applies to.
              type: array
              items:
                $ref: '#/components/schemas/FeeType'
        - $ref: '#/components/schemas/AppliesToShipping'
      example:
        products:
          - fprod_01J9XR8M3K7VZ8N2YB4WJ6T0RA
    CouponDuration:
      type: string
      enum:
        - once
        - repeating
        - forever
      x-ms-enum:
        name: CouponDuration
        modelAsString: false
        values:
          - value: once
            name: Once
            description: >-
              Applies to the first charge from a subscription with this coupon
              applied.
          - value: repeating
            name: Repeating
            description: >-
              Applies to charges in the first duration_in_months months from a
              subscription with this coupon applied.
          - value: forever
            name: Forever
            description: >-
              Applies to all charges from a subscription with this coupon
              applied.
      description: >-
        - `once`: Applies to the first charge from a subscription with this
        coupon applied.

        - `repeating`: Applies to charges in the first duration_in_months months
        from a subscription with this coupon applied.

        - `forever`: Applies to all charges from a subscription with this coupon
        applied.
      example: once
    RecurringInterval:
      description: The frequency at which a recurring price bills.
      type: string
      enum:
        - day
        - week
        - month
        - year
      example: day
    FeeType:
      description: >-
        The kind of fee applied to a checkout session: a Letter of Medical
        Necessity consultation fee, or a custom fee you define.
      type: string
      enum:
        - lmn_consultation
        - custom
      example: lmn_consultation
    AppliesToShipping:
      description: The coupon applies to shipping.
      type: string
      enum:
        - shipping
      example: shipping
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use a Bearer token to access this API.

````

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