How Does an HSA Card Know What You Buy? MCC and Item Scans

Your HSA card decides what you buy through two checks that run in the seconds between the swipe and the approval. The first reads the merchant’s category code to see what kind of business is charging the card. The second, used at pharmacies and large mixed retailers, scans each item’s barcode against a list of eligible medical products and splits the total so your HSA is only charged for the qualifying items. Everything else on the receipt has to be paid another way.

The Merchant Category Code Check

Every business that accepts card payments is assigned a four-digit merchant category code, or MCC, by its payment network. The code identifies the type of business: physician, dentist, chiropractor, hospital, pharmacy, grocery store, gas station, and so on. When you swipe, the payment network reads that code before the transaction ever reaches your HSA administrator. Codes that fall inside recognized healthcare categories pass through. Codes tied to categories with no healthcare connection — a gas pump, an electronics store, a restaurant — trigger an automatic decline.

This first filter is broad on purpose. It tells the system where you’re shopping, not what you’re buying. A pharmacy’s MCC signals that medical products are sold there, but the code alone can’t tell a bottle of allergy medicine apart from a bag of candy at the front counter. That distinction is the job of the second system.

The Item-Level Scan at Mixed Retailers

Stores that sell a mix of medical and non-medical goods — pharmacies, supermarkets, and big-box chains like Walmart and Target — run a technology called the Inventory Information Approval System, or IIAS. It works at the item level. As each barcode is scanned at checkout, the store’s point-of-sale software checks whether that specific product appears on a list of eligible healthcare items. Eligible products are totaled separately, and when you present your HSA card, only the eligible subtotal is charged to your health savings account. The rest has to be paid with cash or another card.

The practical result: if you’re buying adhesive bandages and a carton of milk, the register flags the bandages as eligible and ignores the milk. Your HSA card is charged only for the bandages, in the same transaction, without you having to sort the cart yourself.

Who Maintains the List of Eligible Products

The eligible product list isn’t built by each store. A nonprofit industry body called the Special Interest Group for IIAS Standards (SIGIS) maintains a centralized list. Merchants and manufacturers submit products to a review committee of plan administrators, retailers, and other industry members, which reviews additions and removals monthly against guidance from the IRS, the Department of the Treasury, the FDA, and the CDC. Updates publish by the 15th of each month, and certified merchants pull the refreshed list into their checkout systems.1Special Interest Group for IIAS Standards. Eligible Product List Overview

The 90 Percent Pharmacy Exception

Not every pharmacy runs a full IIAS setup. A smaller or independent pharmacy can qualify under a different standard: if at least 90 percent of the store’s gross receipts come from items that qualify as medical expenses, HSA cards work there without item-level verification. You may still be asked for documentation afterward, especially for over-the-counter products.

What Counts as Eligible in the First Place

Both filters ultimately trace back to the IRS definition of a qualified medical expense: costs for the diagnosis, cure, treatment, or prevention of disease, or costs that affect any structure or function of the body. That covers payments to doctors, dentists, surgeons, and other practitioners, plus medical equipment, supplies, and prescription drugs.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses

Expenses that are only beneficial to general health — gym memberships, vitamins with no medical reason, vacations — do not qualify. Cosmetic procedures are excluded unless they correct a deformity from a congenital condition, accident, or disfiguring disease.2Internal Revenue Service. Publication 502 – Medical and Dental Expenses

Over-the-counter medicines — pain relievers, cold medicine, allergy medication, antacids — are eligible without a prescription for any amount paid after December 31, 2019. Menstrual care products such as tampons, pads, liners, and cups qualify under the same change.3Internal Revenue Service. IRS Outlines Changes to Health Care Spending Available Under CARES Act IIAS-certified retailers have updated their product databases to match, so these items should scan through at checkout.

Some products sit in a gray zone. Weight-loss programs, dietary supplements, home accessibility modifications, and prescription retinoids can qualify, but only when a doctor issues a letter of medical necessity tying the expense to a specific diagnosis. Without that letter, an administrator is likely to deny the charge or ask you to return the funds.

What Your HSA Administrator Actually Sees

When a transaction clears, your HSA administrator receives a small set of data: the merchant’s name, the total dollar amount, the date, and the MCC. At IIAS-certified retailers, the administrator also gets confirmation that the store’s system verified the items at the point of sale. Some transactions include enhanced payment data (Level II or Level III), which can add sales tax and additional merchant identifiers, but even that falls short of a line-by-line list of what you bought.

In practice, the administrator sees enough to confirm that an approved transaction occurred for a certain amount at a recognized merchant, and not much more. That’s enough to spot an unusual charge — a large amount at a store with no healthcare connection — without turning every purchase into an itemized report.

When a Real Medical Expense Gets Declined

MCCs are assigned based on a business’s primary trade, and they’re not always accurate for HSA purposes. A massage therapist providing prescribed treatment may be coded under a general personal-services category rather than a healthcare one, and the card will decline at the terminal. A provider that doesn’t accept card payments at all raises the same problem from a different direction.

The fix is to pay out of pocket with a personal card or cash and reimburse yourself from the HSA afterward. There’s no deadline on that reimbursement, as long as the expense was incurred after your HSA was established and you keep the receipt. You can wait days, months, or years. Some account holders deliberately do so, paying medical bills from personal funds and letting the HSA balance grow before drawing on it.

When You’ll Still Be Asked for a Receipt

Transactions at IIAS-certified merchants are generally auto-substantiated: the item-level check at checkout satisfies the administrator’s documentation requirements, and no receipt is needed. Charges at healthcare providers with recognized MCCs — doctor’s offices, hospitals, dental clinics — usually clear the same way.

Documentation comes back into play when a charge posts from a merchant that lacks both a healthcare MCC and an IIAS system, or when a charge looks off. Your administrator can ask you to upload a receipt or an Explanation of Benefits from your insurer. A valid receipt should show the provider or store name, the date, the amount paid, and a description of what was purchased. If you can’t produce it, the administrator may freeze the card or reclassify the distribution as taxable income.4Internal Revenue Service. What Kind of Records Should I Keep

Even when nobody asks, the IRS expects you to keep receipts for every HSA distribution for at least three years after filing the return that covers it.5Internal Revenue Service. How Long Should I Keep Records In an audit, the burden is on you to prove each distribution went toward a qualified medical expense.6Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans

Fixing a Purchase That Shouldn’t Have Gone Through

Sometimes an ineligible charge slips through anyway — the card was used by accident, or you thought an expense qualified and later learned it didn’t. You can return the money to your HSA without owing tax or penalty, provided the repayment is made by the due date of your tax return (without extensions) for the year you discovered the mistake, and the original error was due to reasonable cause. Meet that deadline and the distribution is not included in your gross income, and the additional 20 percent tax does not apply.7Internal Revenue Service. Instructions for Forms 1099-SA and 5498-SA

One caveat: your HSA custodian is not required to accept returned funds. Most do, but confirm before assuming the option is open. When a custodian accepts the return, it will rely on your statement that the distribution was a mistake; there’s no formal appeal to file.