Skip to main content

How to charge mattress recycling fees with Magical Fees

Magical Fees

Kyle Godon avatar
Written by Kyle Godon
Updated over a week ago

Mattress recycling fees are common for regulated products like mattresses, where you need to charge a fixed fee per item. If the fee only applies in certain places, you can also make it location-based. For example, an $11.50 fee per mattress for customers in California.

To set up a mattress recycling fee on your store, there are two required setup steps in Magical Fees:

  1. Create a fee rule (this defines what to charge and when), and

  2. Activate the sales channel (this is what actually turns the fee on in your storefront).



Step 1 (Required) — Create the fee rule

1. Start a new rule

  1. In the Shopify Admin, open the Magical Fees app.

  2. To start a new rule, choose one of the following:

    1. Click Add fee rules to enter the Create Function Method fee page

    2. Alternatively, if you create a fee rule from the Fee Rules page, you’ll see “Select a Method” pop up. Choose Function Method.


2. Fill in the basics

  1. Title: Enter a clear name like Mattress Recycling Fee

  2. Details (optional): Add a short customer-facing explanation like “California mattress recycling fee (required by law) — $11.50 per mattress.”


  3. Type: Select Product (because this fee will be added to products or collections).

  4. Customer consent: Leave Require consent OFF for government-mandated recycling/disposal fees.

What is considered a government-mandated fee?

Government-mandated fees are legally required charges imposed by a government authority, such as recycling fees, eco fees, or bottle deposits. Customer consent is not required for these types of fees.

Fees added at the merchant’s discretion, such as credit card surcharges, tariff surcharges, or service fees, are not government-mandated and require customer consent under Shopify’s policies.

3. Set the amount

  1. Calculation: under Price select the Fixed option and enter the fee amount (example: $11.50).

  2. Turn Charge tax on this fee OFF unless you know this fee should be taxed.

4. Decide how the fee shows up (bundling)

  1. Matching product: The fee stays with the product line it applies to, so it’s clearer what the fee is tied to. Note: product-based discounts may also discount the fee.


  2. Other product fees: The fee shows under a separate “fee/placeholder” line created by the app. Note: helps keep fees out of product-based discounts.


5. Decide how many times it applies

  1. Under Number of times fee applies, choose Every product to charge the fee per mattress unit (for example, 2 mattresses = fee charged twice).

6. Choose which products the fee is applied to

  1. Under Product Conditions, pick one:

    1. All products: Apply the fee to everything in your store

    2. Specific collections: Apply the fee to selected collections.

    3. Specific products: Apply the fee to selected products

    4. Custom conditions: Apply the fee when specific conditions are met. For example, product type, vendor, tags, option name, or option value.

  2. Leave Quantities as All quantities (so it applies no matter how many are in the cart).

7. (Optional) Make it location-based

  1. If the fee only applies in specific locations:

    1. Click Add locations

    2. Select applicable countries/provinces/states

8. Save the rule, and confirm the rule shows as Active at the top-right of the page.


Step 2 (Required) — Activate the sales channel

  1. In the Magical Fees app, Click Add sales channels.


  2. Under Online Store, turn on Activate App Embed Block. This step is required for fees to show in your online store.

    1. Click the Activate app embed button

    2. Enter the theme editor, toggle on Magical Fees

    3. Click Save

  3. Turn on Hide Dynamic Checkout Buttons when Fees Apply so customers don’t bypass the flow where fees get added.

    1. Under Online Store, Click Enable in app embed button

    2. Enter the theme editor, toggle on Hide dynamic checkout buttons when fees apply

    3. Click Save



Step 3 (Optional) — Help customers understand the fee

  1. In the Magical Fees app, Click Add sales channels.


  2. Under Online Store, turn on Associated Fees block if you want customers to see fee info on the product page.

    1. Click the Activate button

    2. Enter the theme editor, Click Add block under Template

    3. Under the Apps section, choose Associated fees to add the block

    4. Click Save


  3. Under Online Store, turn on Fees Total block if you want to display a fee summary in the cart.

    1. Click the Activate button

    2. Enter the theme editor, Click Add block under Template

    3. Under the Apps section, choose Fees total to add the block.

    4. Click Save






Did this answer your question?