Skip to main content

Invoice line item — explicit price: 0 now stored correctly

Summary

The addLineItem and updateLineItem mutations now correctly store a line item price of 0 when it is explicitly provided. Previously, price: 0 was treated as "no price given" and fell back to the product's default price. The field manuallyChangedPrice was also not set in this case.

This is a bug fix — the intended behaviour has always been that an explicit price: 0 should be stored as-is, consistent with any other explicit price override.

What changed

FieldBeforeAfter
lineItem.priceFell back to product price when 0 was sentStored as 0
lineItem.totalCalculated from product priceCalculated from 0
lineItem.manuallyChangedPricefalse when price: 0 was senttrue when any explicit price (including 0) is sent

Integration guidance

If you pass price: 0 to create a complimentary or free line item, it will now behave as intended — the stored price and total will be 0 and manuallyChangedPrice will be true.

If you want the product's default price to apply, omit the price field entirely rather than sending 0. Only null or an absent field triggers the product-price fallback.