The original question asks whether custom line items (charges not tied to actual products) can be added to a cart from the storefront, similar to how they can be added via the Order Editing API or Draft Orders on the backend.
Official Response:
Shopify Support confirms this isn’t natively possible on the storefront. Suggested workarounds include:
Repurposing existing features (e.g., gift-wrap options with modified wording)
Using third-party apps like Infinite Options or Infinite Product Options to add charged options without creating variants
Community Workarounds:
Creating variants dynamically via Admin API, adding them to cart, then deleting post-checkout (confirmed as working by one user)
For stores using carrier-calculated shipping: adding handling fees that appear as non-variant charges at checkout
Using Shopify Functions with cart transform API to expand products into bundles with additional variants and custom pricing
Open Questions:
One user seeks clarification on modifying checkouts via webhooks (checkouts/create) and which API endpoints to use for adding variants to in-progress checkouts.
The discussion remains active with multiple technical approaches but no single definitive solution for true custom line items on the storefront.
Summarized with AI on October 25.
AI used: claude-sonnet-4-5-20250929.
Elias here with Shopify Support. Thank you for reaching out.
I understand you’re looking to add custom line items, which aren’t associated with your products, but can be charged for on the storefront. While you can add custom fields to capture information from your customers, it’s not possible to add a fee to this without creating them as a form of product or variant.
Some merchants have been able to add a gift-wrap option to their cart and change the wording for gift-wrap to their add-on. That said, I don’t have enough information about your add-on to determine if this is a workable solution for your store.
Alternatively, you can use a third-party app that has the function to create options for your products and add costs, this doesn’t require creating a variant and the options can be different for each product. I’ve handpicked a couple of apps that can create options and associate a cost for those options for you to try:
If you need any assistance with these apps, you can always reach out to the developers directly through the contact information found in the Support section of the app’s page.
Let me know if this is what you’re looking for? If you have any other questions on options, don’t hesitate to let me know in this thread!
As a workaround, could you make a call to create a variant in realtime (using Admin API), then add it to the cart? Then after checkout, could you delete that variant?
Hey @Chris_Marshall1 I have been investigating this for the last few days looking for a custom work around but it seems a non-product fee cannot be done still.
If you are using carrier calculated shipping rates, you can add a handling fee to them that shows up as a non-variant add on to the checkout UI by the tax field. I am not using carrier calc rates unfortunately so this is out of the question for me…
I’m trying to modify a checkout before it’s completed (ie. in the checkouts/create webhook, I want to add a Variant to the lineItems). When a checkout is created, I want to add a specific Product Variant to the line Items of the checkout. Is there a way to do this? I’ve tried the checkout PUT endpoint but getting a 404
It is actually possible relatively elegant with a Shopify function and a line item property. You can use the cart transform ( Cart Transform Function API ) to expend the product into a bundle of the original product and an additional variant. The advantage is you can change the price for the variant.