Container deposit by bottle size, without tags

Last updated: September 23, 2026

When the deposit depends on the container size, store each variant's volume in a number metafield such as custom.volume_ml and let one per-product Formula fee pick the rate: if(mf("custom.volume_ml") >= 750, 0.10, 0.05) * qty. Six 1-liter bottles pay 0.60, six 330 ml cans 0.30, and no size tags are needed.

The rule in FlexiFees

SettingValue
Fee titleContainer deposit
ScopePer product fee
Fee typeFormula
Formulaif(mf("custom.volume_ml") >= 750, 0.10, 0.05) * qty (example rates and threshold)
SKUDEPOSIT
ConditionProduct category is one of Beverages (Shopify taxonomy)
FlexiFees formula editor with if(mf(= 750, 0.10, 0.05) * qty and a Try it result of 0.60 for six 1 liter bottles" width="760" height="759" loading="lazy"> FlexiFees condition: product category is one of Beverages

Set it up

  1. In your Shopify admin, go to Settings > Metafields and metaobjects, choose Variants, add a metafield definition custom.volume_ml with the Integer or Decimal type, and select Storefronts.
  2. Enter the volume in milliliters on each variant: 330, 500, 1000.
  3. Create a per-product Formula fee with the formula above and a product condition for your beverages.
  4. Use Try it on a real product to check a can and a bottle before you publish.

Watch out: products without a volume

A missing metafield counts as 0, and 0 is below 750, so a product without a volume still pays the lower rate. Either fill the volume on every product the conditions select, or make missing values pay nothing: if(mf("custom.volume_ml") >= 750, 0.10, if(mf("custom.volume_ml") > 0, 0.05, 0)) * qty.

Use a plain number, not a volume type

FlexiFees reads a unit-type metafield as the number it is stored with, without converting units: 0.75 liters reads as 0.75, 750 milliliters as 750. A number metafield with the unit in its name (volume_ml or volume_oz) avoids mixing units.

Real deposit rates

The rates above are examples. Deposit amounts and size thresholds come from each scheme: California's CRV, for instance, uses 24 ounces as its size threshold (see the CRV guide for the current rates and official source); German Pfand depends on the container type (see the Pfand guide). Check the scheme that applies to you. Not tax or legal advice.

The first cart with a new amount. Calculated fees produce amounts Shopify has not seen before. The first time a new amount appears, Shopify can take a few seconds, occasionally up to about a minute, to accept the fee line; FlexiFees retries automatically and the same amount is instant afterwards.

Related

Questions

Can one fee charge different deposits by container size?

Yes. Store the volume per variant in a number metafield and use a Formula fee with if() to pick the rate.

What happens to products without a volume?

A missing metafield counts as 0. With the basic formula they pay the lower rate; add if(mf("custom.volume_ml") > 0, 0.05, 0) to charge them nothing.

Start free trial on Shopify