> ## 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.

# Update Payment Link

> Updates an existing payment link. Only the supplied fields are changed; omitted fields are
left unchanged. The mutable fields are the label, the after-completion behavior, the active
flag, and shipping address collection — line items, discounts, and other parameters are fixed
once the link is created. Set `active` to `false` to archive the link, which removes it from
list results and makes checkout session generation from the link return a 404. Set `active`
back to `true` to restore it.



## OpenAPI

````yaml /openapi.json patch /v1/payment_links/{id}
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/{id}:
    patch:
      tags:
        - Payment Links
      summary: Update Payment Link
      description: >-
        Updates an existing payment link. Only the supplied fields are changed;
        omitted fields are

        left unchanged. The mutable fields are the label, the after-completion
        behavior, the active

        flag, and shipping address collection — line items, discounts, and other
        parameters are fixed

        once the link is created. Set `active` to `false` to archive the link,
        which removes it from

        list results and makes checkout session generation from the link return
        a 404. Set `active`

        back to `true` to restore it.
      operationId: v1.payment_links.update
      parameters:
        - in: path
          name: id
          required: true
          schema:
            examples:
              - fplink_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            type: string
          style: simple
          example: fplink_01J9XR8M3K7VZ8N2YB4WJ6T0RA
      requestBody:
        description: An envelope wrapping a single payment link object.
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PaymentLinkBody_for_UpdatePaymentLinkRequest
            example:
              payment_link:
                label: Example
                after_completion:
                  type: redirect
                  hosted_confirmation:
                    custom_message: Premium SPF 50 mineral sunscreen
                  redirect:
                    url: https://example.com
                active: false
                shipping_address_collection: false
        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_UpdatePaymentLinkRequest:
      description: An envelope wrapping a single payment link object.
      type: object
      required:
        - payment_link
      properties:
        payment_link:
          $ref: '#/components/schemas/UpdatePaymentLinkRequest'
          description: The payment link.
      example:
        payment_link:
          label: Example
          after_completion:
            type: redirect
            hosted_confirmation:
              custom_message: Premium SPF 50 mineral sunscreen
            redirect:
              url: https://example.com
          active: false
          shipping_address_collection: false
    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
    UpdatePaymentLinkRequest:
      description: >-
        Parameters for updating a payment link. Only the supplied fields are
        changed; omitted fields are left unchanged.
      type: object
      properties:
        label:
          description: >-
            Custom name shown for the payment link. Omit to leave the current
            label unchanged.
          type:
            - string
            - 'null'
          example: Example
        after_completion:
          description: >-
            Behavior after the customer completes a checkout session generated
            from this link. Omit to leave the current behavior unchanged.
          anyOf:
            - $ref: '#/components/schemas/AfterCompletion'
            - type: 'null'
        active:
          description: >-
            Set to false to archive this payment link. Inactive payment links
            are hidden from list views by default.
          type:
            - boolean
            - 'null'
          example: false
        shipping_address_collection:
          description: >-
            Whether to collect a shipping address from the customer at checkout.
            Omit to leave the current setting unchanged.
          type:
            - boolean
            - 'null'
          example: false
      example:
        label: Example
        after_completion:
          type: redirect
          hosted_confirmation:
            custom_message: Premium SPF 50 mineral sunscreen
          redirect:
            url: https://example.com
        active: false
        shipping_address_collection: false
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    RecurringInterval:
      description: The frequency at which a recurring price bills.
      type: string
      enum:
        - day
        - week
        - month
        - year
      example: day
  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.