How do I prevent a $0 dollar sales order with products on the order that will ship out without a payment?
Topic summary
A Shopify Plus merchant wants to block $0 orders that include products so they don’t ship without payment.
Latest guidance:
- Build a custom validation using Shopify Functions (Cart/Checkout Validation API). Logic: if input.cart.totalAmount.amount == 0, return an error message (e.g., enforce a minimum order value) to prevent checkout. A docs link was shared.
- Alternative: use an order-limits app (e.g., Minmaxify) to enforce minimums.
- Another suggestion is to set up a Shopify Flow, though details weren’t provided in-thread.
Open question:
- Clarification requested on how carts reach $0 (e.g., discounts fully offsetting price).
Status:
- No confirmed resolution yet. Recommended next steps are to implement the Shopify Functions checkout validation or use an order-limits app, and clarify the conditions that lead to $0 totals.
You could set up a flow to do that.
@junehudson , can you clarify how every product in the cart can end up as $0? Is it due to discounts being applied?
Hi Junehudson,
Assuming you’re on Shopify Plus, you could build a custom app using the Shopify Functions Cart/Checkout Validation API.
https://shopify.dev/docs/api/functions/reference/cart-checkout-validation
The logic would be pretty straightforward:
- If
input.cart.totalAmount.amount == 0, then… - Return a FunctionRunResult containing an error message about the minimum order value
This is a foolproof way to prevent checkouts under specific conditions.
Alternatively, you can use an order limits app like Minmaxify (I’m not affiliated, but I’ve met the owner and he’s an awesome guy).
Best,
Tobe