Yes, it can work if you’re using Shopify Plus and have access to checkout extensions.
The store needs to be on the Plus plan to unlock the checkout ui extension. Once the extension is added to the checkout, fees will be added just like they are in a regular store. There is no support for displaying fee information on the product or cart page of a headless store.
Always label deposits separately for compliance
Display bottle deposit fees as a clearly labeled, separate line item at checkout and on receipts. This meets regulatory transparency requirements, builds customer trust by showing exactly what they're paying, and makes it significantly easier to track deposits for reporting and audits. Use a clear label like "Bottle deposit" or "Container deposit (CRV)" so customers immediately understand the charge.
Originally from our Help Center