Milly Software
InsightsAppsEPR and Recycling-Fee Automation on Shopify Plus
Apps··7 min read

EPR and Recycling-Fee Automation on Shopify Plus

Extended producer responsibility laws require a per-unit recycling fee at checkout — different amounts, different labels, by state. Here's how Shopify Functions automate multi-state EPR compliance, using mattress recycling as the worked example.

V
Viet Le
co-founder · Milly Software

Extended producer responsibility — EPR, or product stewardship — is the idea that whoever puts a product on the market helps pay to recycle it at the end of its life. In practice, for a retailer, it shows up as a fee you collect at checkout and remit to a state program. It already covers mattresses, batteries, paint, tires, and electronics across a growing list of states, and the list is only getting longer.

Mattresses are a good lens on the whole problem because they hit every hard part at once. Four states run programs, each with a different per-unit fee, and one of them insists on a different name for the line. Multiply that by express checkouts that can skip your customizations, and "just add a fee" turns into a real compliance surface.

This post walks through how Shopify Functions automate that surface, using our Mattress Recycling Fee app as the concrete example — the same Function-based approach behind our California battery fee work, generalized to multiple states.

Why multi-state fees are harder than they look

A single-state fee is almost easy. Multi-state EPR compliance is where it gets genuinely fiddly, for four reasons:

  • Different amounts. The fee is per unit, and every program sets its own figure.
  • Different labels. The receipt line is prescribed — what one state calls a "Recycling Fee" another calls something else entirely.
  • Unit counting. A mattress and its foundation each count as a unit, so a single "bed" can owe two fees.
  • Remittance math. You report unit counts per state per month — so you need the numbers, not just the collection.

Any automation that treats the fee as one hardcoded number misses most of this. The right model is a small per-state table — amount, label, effective date — that the checkout logic reads from and that you update when a program changes its fee (they adjust roughly once a year).

How the Functions fit together

Multi-state EPR done properly uses more of the checkout toolkit than a single fee does. Four pieces:

  • A Cart Transform Function calculates the fee server-side and adds it as an itemized line, choosing the right per-unit amount and the state-prescribed label from the destination — and recomputing the amount so it can't be tampered with.
  • A checkout UI extension reads the shipping address, gates the fee to program states, and shows the required disclosure. This is the piece that needs Shopify Plus.
  • A Cart & Checkout Validation Function asks the shopper to acknowledge the state-required fee before checkout can complete. Because it runs server-side, it holds even on express and wallet checkouts, not just the standard flow.
  • An orders/create reconciliation recomputes the expected fee on every order after the fact and flags any under-collection — the safety net for anything that slipped past the checkout UI.

The reconciliation step is the one people forget. Apple Pay and Google Pay can bypass checkout customizations entirely, which means the checkout UI alone can't guarantee the fee was applied. Recomputing every order server-side — from nothing but the shipping state and the unit count — is what turns "usually collected" into "provably reconciled."

The mattress fee schedule, concretely

As of 2026, four states run mattress stewardship programs administered by the Mattress Recycling Council:

  • California — $18.00 per unit, labeled "Recycling Fee" (rose from $16.00 in April 2026).
  • Connecticut — $16.00 per unit, "Recycling Fee."
  • Rhode Island — $22.50 per unit, "Recycling Fee."
  • Oregon — $22.50 per unit, labeled "Stewardship Assessment" (Oregon's program uses that term by law).

A queen mattress plus a foundation shipping to California is two units — $36.00 in fees — itemized as a "Recycling Fee" line. The same order to Oregon is $45.00, itemized as a "Stewardship Assessment." Ship it to a non-program state and there's no fee at all. And at month's end, the qualifying-unit totals per state are exactly the numbers a Mattress Recycling Council report asks for.

Where the Mattress Recycling Fee app fits

Mattress Recycling Fee is the four-Function shape above, built as one app. The statutory fees for California, Connecticut, Rhode Island, and Oregon ship with it and get updated when the programs change them; you point it at the collection that holds your mattresses and foundations, and the destination state picks the amount and the label. The checkout disclosure, the acknowledgment gate, and the reconciliation ledger come as one piece.

A couple of honest specifics. It targets Shopify Plus, because the checkout disclosure relies on a checkout UI extension. The reconciliation ledger is deliberately privacy-minimal — it keeps the order number, the two-letter state code, unit counts, and fee amounts, and no customer names or addresses. And the per-state table is the thing that keeps it accurate over time: when a program adjusts its fee, the fix is a one-line change to the table, not a rebuild.

EPR isn't shrinking. More states, more product categories, more point-of-sale fees to get right. The value of modeling it as "server-side calculation + destination gating + disclosure + reconciliation" is that it's the same machine every time — whether the product is a mattress, a battery, or whatever the next program covers.

Frequently Asked Questions

What is EPR, and does it apply to my Shopify store?

EPR — extended producer responsibility, sometimes called product stewardship — makes producers and retailers responsible for a product's end-of-life recycling, funded by a point-of-sale fee. It already applies to mattresses in California, Connecticut, Rhode Island, and Oregon, and to categories like batteries, paint, and electronics elsewhere. If you ship a covered product into a program state, you're expected to collect and remit the fee.

What are the mattress recycling fees by state?

As of 2026: California $18.00 per unit, Connecticut $16.00, Rhode Island $22.50, and Oregon $22.50. A mattress and a foundation (box spring) each count as one unit. The amounts are set by the Mattress Recycling Council per program and change roughly annually, so any automation has to treat them as a table that gets updated, not a constant.

Do all four states call it a "recycling fee"?

No — and the label is prescribed. California, Connecticut, and Rhode Island use "Recycling Fee," while Oregon requires the line to read "Stewardship Assessment." Using the wrong name is its own compliance gap, so the fee line has to switch labels by destination, not just switch amounts.

How do express checkouts like Apple Pay and Google Pay get handled?

That's the hard case for any checkout-fee setup: accelerated wallets can skip checkout customizations. The robust answer is server-side reconciliation — an orders/create webhook recomputes the expected fee for every order from the shipping state and unit count, and flags any order that came up short, so express-checkout orders are caught after the fact even when the checkout UI was bypassed.

References

Try Milly Chat

Want to see how this fits your store?
We'll set up a working session.

Get it on ShopifyTalk to sales →