Packaging fee per gram of packaging

Last updated: September 23, 2026

To charge for packaging by weight, store each product's packaging weight in grams in a metafield such as custom.packaging_g and use a Per unit of metafield fee with a rate per gram. At 0.002 per gram, three products with 45 g of packaging each pay 0.27. Different materials can get different rates in one Formula fee.

Why per gram?

Packaging extended producer responsibility (EPR) schemes in many countries charge producers by the weight and material of the packaging they place on the market. Whether and how you pass such a cost on to customers is your decision; FlexiFees performs the calculation you configure.

The rule in FlexiFees

SettingValue
Fee titlePackaging fee
ScopePer product fee
Fee typePer unit of metafield
Rate0.002 per gram (example; rates accept four decimals)
Metafield that supplies the numberProduct metafield custom.packaging_g
SKUPACKAGING
ConditionA product condition such as a product tag packaged or a collection
FlexiFees fee form with fee type Per unit of metafield, 0.002 per unit, product metafield custom.packaging_g

Different rates for plastic and paper

Store each material in its own metafield and add them in one per-product formula:

0.004 * pmf("custom.plastic_g") * qty + 0.002 * pmf("custom.paper_g") * qty

Two units with 15 g of plastic and 30 g of paper each: 0.004 × 15 × 2 + 0.002 × 30 × 2 = 0.24. Products without a value contribute 0.

Good to know

  • The metafield needs a number (integer or decimal) and storefront access; see Metafields in FlexiFees.
  • Use grams as a plain number. Unit-type metafields are read as stored, without conversion.
  • For a charge on the whole cart, make it a cart fee: the rate × metafield × quantity is then summed over every product in the cart.
  • Price display rules differ by country. 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.

Sources

Related

Questions

How do I charge per gram of packaging?

Store the packaging weight in grams in a product metafield and use a Per unit of metafield fee with a rate per gram, for example 0.002.

Can plastic and paper have different rates?

Yes. Store each material in its own metafield and add them in one Formula fee, for example 0.004 * pmf("custom.plastic_g") * qty + 0.002 * pmf("custom.paper_g") * qty.

Start free trial on Shopify