For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI Reference
HomeGuidesAPI Reference
  • Payment Sessions
    • Payments Overview
    • Manual/Delayed Capture
    • Itemized Fees and Discounts
  • Implementation
    • Stripe Custom Payment Method
    • iFrame Payment Session
  • Product Catalog
    • Overview
      • Build HSA/FSA-Eligible Collections
      • Conditionally Show the PDP Widget
      • Checkout Page Messaging
    • Managing Your Catalog
  • Qualification Sessions
    • Update a Qualification Session
  • Direct Substantiation
    • Overview
    • TPA Guide
    • Employers Guide
    • Platforms Guide
  • Subscriptions
    • Overview
    • Create a Subscription (New Subscriber)
    • Create a Subscription (Existing Subscriber)
    • Subsequent Billing Periods
    • Partner Administrative Operations
  • Resources
    • Webhooks
    • Developer Tools
LogoLogo
On this page
  • Why this matters
  • What to show
  • How to implement
  • 1. Check cart eligibility
  • 2. Conditionally render the message
  • 3. Tie it to cart changes
  • Placement recommendations
Product CatalogUse Cases

Checkout Page Messaging

Was this page helpful?
Previous

Managing Your Catalog

Next
Built with

Surfacing Truemed messaging at the right moment in the checkout flow—when the cart actually contains HSA/FSA-eligible items—can meaningfully improve conversion. Customers who might not have thought to use their benefits are reminded at exactly the right time.

Why this matters

Many customers have HSA/FSA funds available but don’t actively think to use them during checkout. A well-placed message (“Your cart may be covered by your HSA/FSA”) acts as a prompt that converts browsers into HSA/FSA payers—especially near year-end when customers are motivated to spend remaining balances.

What to show

Effective checkout messaging is:

  • Specific — “X item(s) in your cart are HSA/FSA eligible” outperforms generic copy
  • Timely — shown after cart assembly, before or during payment method selection
  • Actionable — paired with a clear call to action: “Pay with Truemed →”

Example messages:

“Some items in your cart may be covered by your HSA or FSA. Pay with Truemed to use your benefits.”

“2 items in your cart are HSA/FSA eligible. Use your pre-tax dollars at checkout.”

How to implement

1. Check cart eligibility

Use the check_truemed_checkout_method endpoint to evaluate the items in the customer’s cart. Pass all cart line items and receive a decision on whether Truemed should be shown as a checkout option.

1// Called when the cart is updated or the checkout page loads
2const response = await fetch('https://api.truemed.com/api/v1/product_catalog/truemed_checkout_method', {
3 method: 'POST',
4 body: JSON.stringify({
5 items: cart.lineItems.map(item => ({
6 sku: item.sku,
7 name: item.name,
8 })),
9 }),
10});
11const { enabled } = await response.json();

2. Conditionally render the message

If the cart contains eligible items, display your HSA/FSA messaging banner and the Truemed payment option. If not, hide it—don’t show the option for carts that won’t qualify.

1if (enabled) {
2 document.getElementById('truemed-checkout-banner').style.display = 'block';
3}

3. Tie it to cart changes

Re-check eligibility whenever the cart changes (items added, removed, or quantity updated) so the messaging stays accurate throughout the checkout flow.

The check_truemed_checkout_method endpoint evaluates eligibility based on item type— it does not factor in prices, discounts, or additional charges. Use it to make display decisions; the customer’s actual checkout eligibility is confirmed during the Truemed payment session flow.

Placement recommendations

LocationMessage type
Cart pageBanner above checkout button
Checkout page (payment step)Listed alongside other payment methods with HSA/FSA badge
Order confirmation email”You used your HSA/FSA — great choice!” reinforcement