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
| Field | Before | After |
|---|---|---|
lineItem.price | Fell back to product price when 0 was sent | Stored as 0 |
lineItem.total | Calculated from product price | Calculated from 0 |
lineItem.manuallyChangedPrice | false when price: 0 was sent | true 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.