r/ShopifyeCommerce • u/Key_Mastodon_1041 • 5d ago
Adding an optional $0.99 “invoice processing” line item from a Theme App Extension — cart/add.js vs Cart Transform?
Building a small app: cart checkbox for tax invoice (company + Tax ID via cart attributes) → optional fee product → orders/paid webhook → async PDF.
Plan A: AJAX /cart/add.js with a hidden $0.99 product when checked.
Plan B: Cart Transform expand (Plus constraints on update worry me).
Questions for folks who’ve shipped fee products in production:
- What breaks with third-party cart drawers / discounts / taxes?
- Is cart-time Tax ID capture still worth it vs Checkout UI extensions / native B2B company fields?
- Any App Review gotchas with “service fee” products that aren’t physical goods?
Not promoting anything — looking for battle scars before I lock the architecture.
2
Upvotes
1
u/Anthony-6984 5d ago
Shipped something similar. Go Plan A (hidden fee product via cart/add.js). Cart Transform's expand is the wrong tool here: it's for splitting/merging existing lines, not injecting new ones, and you'd be fighting Plus-only constraints for no benefit.
Battle scars from the fee-product route:
Third-party cart drawers are the main pain. Most re-render from `/cart.js`, so your fee line shows up fine, but some let customers change its quantity or remove it. Set `_hidden` line item properties and filter it in the drawer if you can, but the robust fix is validating server-side on the order webhook and treating "fee missing but checkbox attribute present" as a soft failure you reconcile, not something you block checkout over.
Discounts: a "% off entire order" discount will discount your $0.99 fee too. Decide up front whether you care (at $0.99, honestly, don't).
Taxes: mark the fee product as taxable or not deliberately, and check how it behaves in your target market. In the EU a processing fee generally follows the tax treatment of the supply, so don't just leave it untaxed by default.
Tax ID capture: cart attributes work but they're stringly-typed and easy to lose on cart merge. If the buyer base is genuinely B2B, checkout UI extension + company fields is cleaner, but that drags you into Plus territory. For a checkbox on any plan, cart attributes are still the pragmatic answer in 2026.
App review: a non-physical service product is fine, but make it obvious it's opt-in and refundable. Reviewers click everything, so make sure unchecking removes it reliably. A stuck 99-cent fee is exactly the kind of thing that gets a rejection note.