# Flex Documentation ## Docs - [Welcome to Flex](https://docs.withflex.com/index.md): Accept HSA/FSA payments with ease - [Introduction](https://docs.withflex.com/developer-guides/introduction.md): Welcome to Flex! The easiest way to start accepting [HSA](https://www.healthcare.gov/glossary/health-savings-account-hsa/)/[FSA](https://www.healthcare.gov/glossary/flexible-spending-account-fsa/) Payments - [Onboarding](https://docs.withflex.com/developer-guides/onboarding.md): Complete your Flex onboarding and finish setting up your account. - [How Checkout Works](https://docs.withflex.com/developer-guides/integration/checkout/how-checkout-works.md): Learn how to use checkout to collect HSA/FSA payments on your website. - [Flex Checkout Quick Start](https://docs.withflex.com/developer-guides/integration/checkout/quick-start.md): Flex Checkout is our low-code integration to accept HSA/FSA payments. - [Fulfill Orders](https://docs.withflex.com/developer-guides/integration/checkout/fulfillment.md): Learn how to fulfill orders after a customer pays via checkout or payment links. - [Define Your Checkout Experience](https://docs.withflex.com/developer-guides/integration/checkout/guides.md): Learn how to customize checkout sessions for common use cases like shipping, taxes, discounts, and embedded checkout. - [Overview](https://docs.withflex.com/developer-guides/integration/checkout/off-session-checkouts-copied-1.md): Learn how session checkouts work. - [Off Session Checkouts With a Product Requiring a Letter](https://docs.withflex.com/developer-guides/integration/checkout/example-walkthrough.md) - [Payment Links](https://docs.withflex.com/developer-guides/integration/payment-links/overview.md): Accept HSA/FSA payments without building a storefront. - [Create A Payment Link](https://docs.withflex.com/developer-guides/integration/payment-links/create.md): Use the Flex Dashboard to create payment links and start accepting HSA/FSA payments without code. - [Payouts & Balance Transactions API](https://docs.withflex.com/developer-guides/integration/payouts-balance-transactions.md): Track, filter, and reconcile money movements from Flex to your Shopify store - [Flex Shopify Payment App](https://docs.withflex.com/developer-guides/integration/shopify/overview.md): Flex provides a Shopify payment app to make it easy to accept HSA/FSA payments in your Shopify store checkout flow. - [How Flex Shopify Payments Work](https://docs.withflex.com/developer-guides/integration/shopify/how-shopify-payments-app-works.md): Learn how the Flex Shopify payment app processes HSA/FSA payments and handles different cart eligibility scenarios. - [Flex Shopify Payments App Installation](https://docs.withflex.com/developer-guides/integration/shopify/installation.md): Follow the steps below to connect your Shopify store to Flex. - [Reconciliation](https://docs.withflex.com/developer-guides/integration/shopify/reconciliation.md): Understand money movement from Flex with your Shopify Store. - [Shopify Test Store](https://docs.withflex.com/developer-guides/integration/shopify/shopify-test-store.md): Learn how to set up test payments and run test transactions on your Shopify store with Flex. - [Shopify Subscriptions](https://docs.withflex.com/developer-guides/integration/shopify/shopify-subscriptions.md): How to add the Flex reimbursement block to your Shopify Thank You page so subscription customers can get HSA/FSA reimbursement through Flex. - [Auto-Tag Flex Shopify Orders](https://docs.withflex.com/developer-guides/integration/shopify/auto-tag-orders.md): Automatically tag Flex orders in your Shopify admin so you can easily filter, organize, and review them alongside the rest of your orders. - [Flex for WooCommerce](https://docs.withflex.com/developer-guides/integration/woocommerce/overview.md): Flex provides a WooCommerce plugin to make it easy to accept HSA/FSA payments in your WooCommerce store checkout flow. - [How the Flex for WooCommerce Plugin Works](https://docs.withflex.com/developer-guides/integration/woocommerce/how-woocommerce-works.md): Learn how the Flex WooCommerce plugin processes HSA/FSA payments and handles different cart eligibility scenarios. - [Flex for WooCommerce Installation](https://docs.withflex.com/developer-guides/integration/woocommerce/installation.md): Follow the steps below to set up your Flex account and configure your WooCommerce store. - [Stripe Custom Payment Methods Overview](https://docs.withflex.com/developer-guides/integration/stripe/overview.md): Learn how to integrate Flex as a Stripe custom payment method alongside traditional payment options. - [Stripe Installation and Setup](https://docs.withflex.com/developer-guides/integration/stripe/installation.md): Set up Flex as a Stripe custom payment method in your application. - [Custom Payment Methods Implementation](https://docs.withflex.com/developer-guides/integration/stripe/custom-payment-methods.md): Step-by-step guide for implementing Flex as a Stripe custom payment method with complete code examples. - [Stripe Payouts & Identity Verification](https://docs.withflex.com/developer-guides/integration/stripe/payouts-and-verification.md): How Flex uses Stripe for payouts, why Stripe asks for personal information like an SSN, and how to manage your payout details. - [Flex MCP](https://docs.withflex.com/developer-guides/integration/mcp/overview.md): Connect Claude, Cursor, and other AI assistants directly to your Flex account using the Model Context Protocol. - [Quick start](https://docs.withflex.com/developer-guides/integration/mcp/quick-start.md): Connect Claude, Cursor, or another AI assistant to your Flex account in under five minutes. - [Tools & sample prompts](https://docs.withflex.com/developer-guides/integration/mcp/tools.md): What the Flex MCP exposes, and prompts you can copy into your AI assistant. - [Authentication](https://docs.withflex.com/developer-guides/integration/mcp/authentication.md): How the Flex MCP authenticates clients, and how to use test mode safely. - [Security best practices](https://docs.withflex.com/developer-guides/integration/mcp/security.md): Scope credentials, default to test mode, and rotate keys when using the Flex MCP. - [Integrating Flex with RevenueCat](https://docs.withflex.com/developer-guides/integration/revenuecat.md): Connect Flex with RevenueCat to sync subscription events, pass custom identifiers, and keep customer status up to date. - [Reimbursement](https://docs.withflex.com/developer-guides/integration/reimbursement.md): Learn how to set up reimbursement integrations where consumers receive a Letter of Medical Necessity to file for reimbursement. - [Test Mode](https://docs.withflex.com/developer-guides/integration/test-mode.md): Flex's test mode allows you to test your integration without making real charges or payments. - [How Products and Prices Work](https://docs.withflex.com/developer-guides/products-and-prices/how-products-and-prices-work.md): Learn how products and prices function as core resources for your Flex integration. - [Get Started With Products and Prices](https://docs.withflex.com/developer-guides/products-and-prices/get-started-with-products-and-prices.md): Understand how to structure your business offerings for payments with Flex. - [API Product Creation Walkthrough](https://docs.withflex.com/developer-guides/products-and-prices/api-product-creation-walkthrough.md) - [Subscriptions](https://docs.withflex.com/developer-guides/subscriptions/overview.md): Learn how to create and manage recurring HSA/FSA payments through Flex. - [Build a Subscription Integration](https://docs.withflex.com/developer-guides/subscriptions/getting-started.md): This guide describes how to sell a fixed-price monthly subscription offering using Flex. - [Flex Refund API Guide](https://docs.withflex.com/api-refund-best-practices.md) - [Disputes API Guide](https://docs.withflex.com/disputes-api-guide.md) - [Early Fraud Warnings](https://docs.withflex.com/early-fraud-warnings.md) - [Handle Stripe Radar reviews with Flex](https://docs.withflex.com/reviews.md): Step-by-step guide to wiring up review webhooks, building an internal review queue, and testing the flow end-to-end. - [Legacy Webhooks Deprecation](https://docs.withflex.com/developer-guides/webhooks/legacy-webhooks.md): Migrate from legacy webhooks to our new webhook system by September 1, 2025. - [Webhook Overview](https://docs.withflex.com/developer-guides/webhooks/overview.md): Listen to events at your webhook endpoint to automatically trigger reactions. - [Verify Webhooks](https://docs.withflex.com/developer-guides/webhooks/verifying-webhooks.md): Learn how to securely verify webhook signatures to ensure they originate from Flex. - [Event Types](https://docs.withflex.com/developer-guides/webhooks/events.md): Learn about the different event types Flex sends to your webhook endpoint. - [Using Redirects Instead of Webhooks](https://docs.withflex.com/developer-guides/webhooks/using-redirects.md): Learn how to handle checkout completion using redirects instead of webhooks for simpler implementation and testing - [Get Insights Into HSA/FSA as a Channel](https://docs.withflex.com/developer-guides/dashboard/overview.md): Understand HSA/FSA payment trends and performance through the Flex Dashboard. - [Invite Users](https://docs.withflex.com/developer-guides/dashboard/invite-users.md): Learn how to invite new members to your organization to access the partner dashboard and private documentation. - [Manage Your Products and Prices](https://docs.withflex.com/developer-guides/dashboard/manage-products-and-prices.md): Learn how to view and manage your products and prices through the Flex dashboard. - [Manage Your HSA/FSA Payments](https://docs.withflex.com/developer-guides/dashboard/manage-hsa-fsa-payments.md): Learn how to view, export, and refund HSA/FSA payments through the Flex dashboard. - [Manage Your Customers](https://docs.withflex.com/developer-guides/dashboard/manage-customers.md): Learn how to view and manage customer information through the Flex dashboard. - [Introduction to the Flex API](https://docs.withflex.com/api-reference/introduction.md): Learn the basics of integrating with the Flex API to accept HSA/FSA payments - [Expanding Resources](https://docs.withflex.com/api-reference/expanding-resources.md): Learn how to request expanded responses with additional information about related objects. - [List Shipping Rates](https://docs.withflex.com/api-reference/shipping-rates/list-shipping-rates.md): Returns a list of your shipping rates, most recent first. Pass `active` to return only active or only archived rates. - [Create Shipping Rate](https://docs.withflex.com/api-reference/shipping-rates/create-shipping-rate.md): Creates a new shipping rate. The rate is a fixed amount denominated in USD. New shipping rates are `active` by default. - [Get Shipping Rate](https://docs.withflex.com/api-reference/shipping-rates/get-shipping-rate.md): Retrieves the shipping rate with the given ID. - [Update Shipping Rate](https://docs.withflex.com/api-reference/shipping-rates/update-shipping-rate.md): Updates the specified shipping rate. You can update `active` and `metadata`; both are overwritten with the values passed, and omitting `metadata` clears it. The shipping rate's `display_name` and `amount` are immutable. - [List Disputes](https://docs.withflex.com/api-reference/disputes/list-disputes.md): Returns a list of your disputes, most recent first. - [Count Disputes](https://docs.withflex.com/api-reference/disputes/count-disputes.md): Returns the number of disputes that currently require a response. - [Get Dispute](https://docs.withflex.com/api-reference/disputes/get-dispute.md): Retrieves the details of an existing dispute. - [Update Dispute](https://docs.withflex.com/api-reference/disputes/update-dispute.md): Updates the evidence on a dispute, and optionally submits it to the card network. - [Close Dispute](https://docs.withflex.com/api-reference/disputes/close-dispute.md): Closes a dispute, accepting it as lost and forfeiting the disputed funds. - [Retry Event](https://docs.withflex.com/api-reference/events/retry-event.md): Redeliver an existing event to your webhook endpoints. The event is looked up by ID; a `404` is returned if no matching event exists. - [List Checkout Sessions](https://docs.withflex.com/api-reference/checkout-sessions/list-checkout-sessions.md): Returns a list of your Checkout Sessions, most recent first. - [Create Checkout Session](https://docs.withflex.com/api-reference/checkout-sessions/create-checkout-session.md): Creates a Checkout Session. The response includes a hosted `redirect_url` where the customer completes payment, along with the computed totals and eligibility. Flex classifies the line items for HSA/FSA eligibility and, when a Letter of Medical Necessity is required, sets up the collection flow. The… - [Get Checkout Session](https://docs.withflex.com/api-reference/checkout-sessions/get-checkout-session.md): Retrieves the Checkout Session with the given ID. Use the `expand` parameters to inline related objects such as the customer, payment intent, or subscription in the response. - [Get Line Items](https://docs.withflex.com/api-reference/checkout-sessions/get-line-items.md): Returns the line items for the given Checkout Session. Each line item includes its price, quantity, and computed amounts. - [Capture Checkout Session](https://docs.withflex.com/api-reference/checkout-sessions/capture-checkout-session.md): Captures funds previously authorized on a Checkout Session whose payment intents use the `manual` capture method. Capture the full authorized amount, or a partial amount by specifying `line_items` and component amounts (shipping, discount, tax). By default the remaining authorized amount stays avail… - [Preview Capture Allocation](https://docs.withflex.com/api-reference/checkout-sessions/preview-capture-allocation.md): Computes how a capture would be allocated across the Checkout Session's payment methods, without executing any capture. Takes the same request body as the capture endpoint and returns the per-payment-method allocations so you can preview a split-cart capture before committing. - [Reauth Checkout Session](https://docs.withflex.com/api-reference/checkout-sessions/reauth-checkout-session.md): Re-authorizes the payment on a Checkout Session whose authorization has expired or been fully captured, creating a new payment intent so the funds can be captured again. Use `amount_override` to authorize a different amount than the session total; otherwise the remaining authorizable amount is used.… - [Refund Checkout Session](https://docs.withflex.com/api-reference/checkout-sessions/refund-checkout-session.md): Refunds a captured Checkout Session, in whole or in part. Refund a total `amount`, specific `line_items`, or omit both to refund the full remaining amount; component amounts (tax, shipping, discount) can be supplied for accurate allocation. For split carts the refund is allocated across the eligible… - [Preview Refund Allocation](https://docs.withflex.com/api-reference/checkout-sessions/preview-refund-allocation.md): Computes how a refund would be allocated across the Checkout Session's payment methods, without executing any refund. Takes the same request body as the refund endpoint and returns the per-payment-method allocations so you can preview a split-cart refund before committing. - [Cancel Auth Checkout Session](https://docs.withflex.com/api-reference/checkout-sessions/cancel-auth-checkout-session.md): Cancels the authorization on a Checkout Session's payment intents, releasing the held funds back to the customer. Only payment intents in a cancellable state are canceled; the request fails with a 422 if the session has no payment intents or none are cancellable. - [Resend Checkout Session Receipts](https://docs.withflex.com/api-reference/checkout-sessions/resend-checkout-session-receipts.md): Resends existing receipt emails for a checkout session. - [Resend Checkout Session Lomn](https://docs.withflex.com/api-reference/checkout-sessions/resend-checkout-session-lomn.md): Resends existing LOMN (Letter of Medical Necessity) emails for a checkout session. - [List Coupons](https://docs.withflex.com/api-reference/coupons/list-coupons.md): Returns a list of your coupons. Optionally filter by `name`. - [Create Coupon](https://docs.withflex.com/api-reference/coupons/create-coupon.md): Creates a coupon. Exactly one of `amount_off` or `percent_off` must be provided; supplying both, or neither, is rejected. When `duration` is `repeating`, `duration_in_months` is required. - [Get Coupon](https://docs.withflex.com/api-reference/coupons/get-coupon.md): Retrieves a coupon by its ID. - [List customers](https://docs.withflex.com/api-reference/customers/list-customers.md): Returns a list of your customers, sorted by ID in descending order (most recently created first). Deleted customers are excluded. - [Create or update a customer](https://docs.withflex.com/api-reference/customers/create-or-update-a-customer.md): Creates a customer. This endpoint upserts by email: if a customer with the same email already exists, that customer is updated with the supplied values instead of a new one being created. A `customer.created` webhook event is fired only when a new customer is created (not on update). If `checkout_se… - [Retrieve a customer](https://docs.withflex.com/api-reference/customers/retrieve-a-customer.md): Retrieves the details of one of your customers. - [Delete a customer](https://docs.withflex.com/api-reference/customers/delete-a-customer.md): Deletes the specified customer. This is a soft delete: the customer is marked as deleted and no longer appears in list or retrieve responses, but historical records that reference the customer (such as payment intents and checkout sessions) continue to resolve it. - [Update a customer](https://docs.withflex.com/api-reference/customers/update-a-customer.md): Updates the specified customer. Only the fields you provide are changed; omitted fields are left unchanged. - [List a customer's payment methods](https://docs.withflex.com/api-reference/customers/list-a-customers-payment-methods.md): Returns a list of payment methods attached to the specified customer, sorted by ID in descending order (most recently created first). - [Retrieve a customer's payment method](https://docs.withflex.com/api-reference/customers/retrieve-a-customers-payment-method.md): Retrieves a single payment method by ID for the specified customer. - [List Exports](https://docs.withflex.com/api-reference/exports/list-exports.md): Returns a list of your exports, sorted with the most recently created exports first. - [Create Export](https://docs.withflex.com/api-reference/exports/create-export.md): Creates an export and starts generating the requested CSV file asynchronously. The export is returned with status `created` and is then processed in the background; poll it until its `status` is `completed` before requesting a download URL. - [Get Export](https://docs.withflex.com/api-reference/exports/get-export.md): Retrieves the details of an existing export, including its current `status`. Supply the unique export ID returned when the export was created. - [Cancel Export](https://docs.withflex.com/api-reference/exports/cancel-export.md): Cancels an export, setting its `status` to `cancelled`. An export that has already `completed` cannot be cancelled; an already-cancelled export is returned unchanged. - [Create Export Url](https://docs.withflex.com/api-reference/exports/create-export-url.md): Generates a temporary, presigned URL for downloading the export's generated CSV file. The export must have a generated file available — typically once its `status` is `completed`. The returned URL expires after a short period, so request a fresh one when it lapses. - [List Invoices](https://docs.withflex.com/api-reference/invoices/list-invoices.md): List invoices - [Get Invoice](https://docs.withflex.com/api-reference/invoices/get-invoice.md): Get an invoice by id - [Mark Invoice Uncollectible](https://docs.withflex.com/api-reference/invoices/mark-invoice-uncollectible.md): Mark an invoice as uncollectible. This will stop automatic collection attempts and move the associated subscription to an unpaid state. - [List Product Components](https://docs.withflex.com/api-reference/products/list-product-components.md): Returns the product components you have registered, newest first. - [Create Product Component](https://docs.withflex.com/api-reference/products/create-product-component.md): Registers a product component (an ingredient) and returns it with an `fcomp_` identifier you can attach to products. - [Get Product Component](https://docs.withflex.com/api-reference/products/get-product-component.md): Retrieves one of your product components by its `fcomp_` identifier, with the nutrition you recorded for it. Nutrient values are per 100 g. - [Update Product Component](https://docs.withflex.com/api-reference/products/update-product-component.md): Updates your nutrition for a product component. Only the fields you supply are changed. - [List Products](https://docs.withflex.com/api-reference/products/list-products.md): Returns a list of your products, sorted by creation date with the most recently created products appearing first. By default only active products are returned; pass `active=false` to list archived ones. You can also filter by `client_reference_id`, by a single `category`, or by metadata using `metad… - [Create Product](https://docs.withflex.com/api-reference/products/create-product.md): Creates a new product. Flex automatically determines the product's HSA/FSA eligibility from the supplied name, description, identifiers, and URL; if it can't be resolved synchronously, the product is created with eligibility pending and classification continues in the background, after which a `prod… - [Processing Status](https://docs.withflex.com/api-reference/products/processing-status.md): Returns how many of the account's products are still awaiting automatic HSA/FSA eligibility classification, capped for bounded cost on very large catalogs. Backs the dashboard "Syncing products" banner; clients derive any time estimate from `pending_classification` themselves. - [Get Product](https://docs.withflex.com/api-reference/products/get-product.md): Retrieves a product by ID. Resolves your own products, and (if you belong to an organization) products owned by a sibling account. - [Update Product](https://docs.withflex.com/api-reference/products/update-product.md): Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Updates never re-run HSA/FSA eligibility determination — eligibility is set when the product is created and only changes through review, so correcting a product's ingredi… - [List Payment Intents](https://docs.withflex.com/api-reference/payment-intents/list-payment-intents.md): Returns a list of payment intents - [Get Payment Intent](https://docs.withflex.com/api-reference/payment-intents/get-payment-intent.md): Retrieves the details of a PaymentIntent that has previously been created. - [Send Receipt](https://docs.withflex.com/api-reference/payment-intents/send-receipt.md): Send a receipt to customer for the associated payment - [Cancel Payment Intent](https://docs.withflex.com/api-reference/payment-intents/cancel-payment-intent.md): Cancels a PaymentIntent - [List Payment Links](https://docs.withflex.com/api-reference/payment-links/list-payment-links.md): Returns a list of your payment links. Only active links are returned; archived (inactive) links are omitted. Results are ordered by ID descending. Supports cursor pagination via `starting_after`/`ending_before`; `offset` is deprecated. Line items and discounts are not expanded here — retrieve a sing… - [Create Payment Link](https://docs.withflex.com/api-reference/payment-links/create-payment-link.md): 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… - [Get Payment Link](https://docs.withflex.com/api-reference/payment-links/get-payment-link.md): Retrieves the details of an existing payment link, including its line items and applied discounts. If the link has no label yet, one is generated from its first line item's product and persisted before the link is returned. - [Update Payment Link](https://docs.withflex.com/api-reference/payment-links/update-payment-link.md): Updates an existing payment link. Only the supplied fields are changed; omitted fields are left unchanged. The mutable fields are `label`, `after_completion`, and `active` — line items, discounts, and other parameters are fixed once the link is created. Set `active` to `false` to archive the link, w… - [List Payouts](https://docs.withflex.com/api-reference/payouts/list-payouts.md): Returns a list of payouts. - [List Prices](https://docs.withflex.com/api-reference/prices/list-prices.md): Returns a list of your prices, sorted by price ID in descending order (most recently created first). By default only active prices are returned; pass `active=false` to list archived ones, or filter to a single product with `product`. You can also filter by metadata using `metadata[key]=value` query… - [Create Price](https://docs.withflex.com/api-reference/prices/create-price.md): Creates a new price. Supply `product` to attach the price to an existing product, or `product_data` to create a new product inline in the same request. A price is one-time unless you include `recurring`, in which case it bills on the given interval. Amounts are in the smallest currency unit (cents)… - [Get Price](https://docs.withflex.com/api-reference/prices/get-price.md): Retrieves the price with the given ID. Pass `expand_product=true` to inline the full Product object instead of just its ID. Resolves your own prices, and (if you belong to an organization) prices owned by a sibling account. - [Update Price](https://docs.withflex.com/api-reference/prices/update-price.md): Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. Only `description` and `active` can be updated; the unit amount, currency, and recurring interval of a price are immutable. Setting `active` to `false` archives the price so it… - [List Promo Codes](https://docs.withflex.com/api-reference/promo-codes/list-promo-codes.md): Returns a list of your promotion codes. Optionally filter by `active`. - [Create Promo Code](https://docs.withflex.com/api-reference/promo-codes/create-promo-code.md): Creates a promotion code referencing an existing coupon. If `code` is omitted, a unique code is generated automatically. The supplied `code` must be unique across your promotion codes. - [Get Promo Code](https://docs.withflex.com/api-reference/promo-codes/get-promo-code.md): Retrieves a promotion code by its ID. - [Update Promo Code](https://docs.withflex.com/api-reference/promo-codes/update-promo-code.md): Updates a promotion code by its ID. Only `active` and `metadata` can be modified; the referenced coupon and the code are immutable. - [List Refunds](https://docs.withflex.com/api-reference/refunds/list-refunds.md): Returns a list of your refunds, most recent first. - [Create Refund](https://docs.withflex.com/api-reference/refunds/create-refund.md): Creates a refund for a previously succeeded payment intent and returns the resulting Refund. - [Get Refund](https://docs.withflex.com/api-reference/refunds/get-refund.md): Retrieves the details of an existing refund by its ID. - [Update Refund](https://docs.withflex.com/api-reference/refunds/update-refund.md): Updates the `reason` and/or `metadata` of an existing refund. Only these two fields can be changed; the refund amount, status, and associated payment cannot be modified after creation. Supplied metadata keys are merged into any existing metadata. - [List Reviews](https://docs.withflex.com/api-reference/reviews/list-reviews.md): Returns a list of your fraud reviews, newest-first. - [Get Review](https://docs.withflex.com/api-reference/reviews/get-review.md): Retrieves the details of a fraud review. - [List Subscriptions](https://docs.withflex.com/api-reference/subscriptions/list-subscriptions.md): Returns a list of your subscriptions, most recent first. Optionally filter by customer or status. Use `expand` (or `expand_customer`) to inline related objects such as the customer, latest invoice, item prices, or applied discounts. - [Get Subscription](https://docs.withflex.com/api-reference/subscriptions/get-subscription.md): Retrieves the subscription with the given ID. Use `expand` (or `expand_customer`) to inline related objects such as the customer, latest invoice, default payment method, item prices, or applied discounts. - [Cancel Subscription](https://docs.withflex.com/api-reference/subscriptions/cancel-subscription.md): Cancels a customer's subscription. By default the subscription is canceled immediately; set `cancel_at_period_end` to `true` to keep it active until the end of the current billing period instead. - [Update Subscription](https://docs.withflex.com/api-reference/subscriptions/update-subscription.md): Updates an existing subscription. Any omitted field is left unchanged, and an empty request body is a no-op that simply returns the current subscription. - [Resend Subscription Receipts](https://docs.withflex.com/api-reference/subscriptions/resend-subscription-receipts.md): Resends existing receipt emails for the initial checkout of a subscription. - [Get Refund Preview](https://docs.withflex.com/api-reference/subscriptions/get-refund-preview.md): Previews the prorated refund that would result from canceling a subscription. Runs the same validation as a real prorated refund but issues no refund and creates no records, so it is safe to call repeatedly. Returns the prorated amount available to refund, the amount paid on the latest invoice, the… - [List Balance Transactions](https://docs.withflex.com/api-reference/balance-transactions/list-balance-transactions.md): Returns a list of Balance transactions. - [List Setup Intents](https://docs.withflex.com/api-reference/setup-intents/list-setup-intents.md): Returns a list of SetupIntents, sorted by ID in descending order (most recent first). - [Create Setup Intent](https://docs.withflex.com/api-reference/setup-intents/create-setup-intent.md): Creates a SetupIntent to collect a customer's payment method details for future off-session use. - [Get Setup Intent](https://docs.withflex.com/api-reference/setup-intents/get-setup-intent.md): Retrieves the details of an existing SetupIntent. - [List captures](https://docs.withflex.com/api-reference/captures/list-captures.md): Returns a list of your captures. Optionally filter to a single checkout session with the `checkout_session` query parameter, and expand related objects (such as the payment intent) with `expand`. - [Retrieve a capture](https://docs.withflex.com/api-reference/captures/retrieve-a-capture.md): Retrieves the details of a capture. Use the `expand` query parameter to inline related objects (such as the payment intent). - [Update a capture](https://docs.withflex.com/api-reference/captures/update-a-capture.md): Updates the specified capture by setting the values of the fields you pass; only `metadata` can be changed. Other capture fields, including captured amounts, cannot be modified. - [List Files](https://docs.withflex.com/api-reference/files/list-files.md): Returns a list of your files, sorted by creation date with the most recently created files first. Pass `purpose` to filter to a single file purpose. Requires the `files_read` scope. - [Create File](https://docs.withflex.com/api-reference/files/create-file.md): Uploads a file to Flex. The request must be a `multipart/form-data` upload containing a `file` part and a `purpose` part. The file must be a JPEG, PNG, or PDF no larger than 5 MB; PNGs using 16-bit depth or Adam7 interlacing are rejected. The uploaded file can then be referenced by ID elsewhere in t… - [Retrieve File](https://docs.withflex.com/api-reference/files/retrieve-file.md): Retrieves the details of an existing file. Supply the unique file ID that was returned when the file was uploaded. Requires the `files_read` scope. - [Marketing HSA/FSA](https://docs.withflex.com/merchant-success/introduction.md): Resources to help you succeed with Flex HSA/FSA payments - [Getting Started](https://docs.withflex.com/merchant-success/overview/getting-started.md): Learn how to maximize the value of HSA/FSA payments after implementation. - [Shopify Marketing App](https://docs.withflex.com/merchant-success/overview/shopify-marketing.md): Promote HSA/FSA eligibility on your Shopify store with badges, a dedicated landing page, and product eligibility synced directly from Flex. - [Highlight Flex at Checkout on Shopify](https://docs.withflex.com/merchant-success/overview/highlight-flex.md): Best practices for surfacing Flex higher in Shopify checkout using native payment customization. - [Homepage](https://docs.withflex.com/merchant-success/website/homepage.md): Promote HSA/FSA acceptance with site banners and homepage spotlights. - [Product Detail Page (PDP)](https://docs.withflex.com/merchant-success/website/product-page.md): Add HSA/FSA eligibility badges to your product pages. - [Landing Page](https://docs.withflex.com/merchant-success/website/landing-page.md): Create a dedicated HSA/FSA landing page to educate customers and drive conversions. - [Checkout & Inline Cart](https://docs.withflex.com/merchant-success/website/inline-cart.md): Display HSA/FSA eligibility messaging in your cart and checkout pages. - [Launch Checklist](https://docs.withflex.com/merchant-success/marketing/launch-checklist.md): Your go-live plan. Follow these steps in order — no strategy needed, just execution. - [Brand & Messaging Hub](https://docs.withflex.com/merchant-success/marketing/brand-and-messaging-hub.md): Approved copy, compliance guidance, and brand assets, all in one place. Reference this page before publishing any HSA/FSA messaging across any channel. - [Email & SMS](https://docs.withflex.com/merchant-success/marketing/email-and-sms.md): Templates and guidance for lifecycle marketers and CRM teams. Start here to announce HSA/FSA acceptance, add Flex to your flows, and drive conversion. - [Paid Media](https://docs.withflex.com/merchant-success/marketing/paid-media.md): This is the strategy and copy for performance marketers. Layer HSA/FSA messaging into your existing paid channels to drive conversion without increasing spend. - [Social & Influencers](https://docs.withflex.com/merchant-success/marketing/social-and-influencers.md): Templates and guidance for social media managers and creator partnerships. Use these to announce HSA/FSA acceptance, build an evergreen social presence, and brief creators effectively. - [Results & Case Studies](https://docs.withflex.com/merchant-success/marketing/results-and-case-studies.md): Real results from Flex merchants across fitness, wellness, sleep, maternity, and more. Use these to build the case internally, set expectations, and see what's possible. - [Brand Guidelines](https://docs.withflex.com/merchant-success/marketing/brand-guidelines.md): Flex brand guidelines for merchants — logo usage, colors, typography, and co-branding rules. - [Social Media Templates](https://docs.withflex.com/merchant-success/marketing/social.md): Ready-to-use templates for announcing HSA/FSA payments on social media. - [Customer Support FAQs](https://docs.withflex.com/merchant-success/support/customer-support.md): Common questions about HSA/FSA payments, Letters of Medical Necessity, and reimbursements. - [Product Updates](https://docs.withflex.com/changelog.md): Keep track of all the latest updates and improvements to Flex. ## OpenAPI Specs - [openapi](https://docs.withflex.com/openapi.json) ## Optional - [Status](https://statuspage.incident.io/with-flex) - [Support](mailto:support@withflex.com) - [Website](https://www.withflex.com)