NewProvince is only required for addresses in Spain
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog

A recurring template cannot produce an invoice with a negative total

Negative line totals on a template, a generated invoice adding up below zero, and editing a draft to a negative total are now rejected.


ChangelogBreaking

A negative standard or simplified invoice is a corrective in disguise: BeeL. handles negative amounts only as a corrective that points at the invoice it corrects. Creating one was already refused, but a recurring template could still generate one, and a draft could be edited into one. Both are closed now.

Correctives are unaffected: a negative total is normal there.

What breaks

  • total_excluding_tax and total_including_tax on a template line must be 0 or more. A negative one answers 422 VALIDATION_ERROR with the field in details, on create and update, where it used to be accepted.
  • Editing a draft so that its total goes below zero answers 422 NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE, the same answer creating it would get. Negative lines are still allowed as long as the total is not negative.
  • A template whose lines add up below zero no longer generates. The run fails permanently and the template is paused, with recurring_invoice.paused, instead of issuing a negative invoice.

Does this affect you?

  • Look for templates with a line whose declared total is negative, such as a discount written as its own line. Keep the total at 0 or above, or apply the discount as discount_percentage.

What else changed

  • A template whose series is inactive, deleted or of the wrong type is paused as well, and so is one with no default series to fall back on. It used to be retried every night without ever succeeding.

Endpoints

  • POST|PUT|PATCH/v1/companies/{company_id}/recurring-invoicesNegative line totals answer 422 VALIDATION_ERROR
  • PATCH/v1/companies/{company_id}/invoices/{invoice_id}A draft edited to a negative total answers 422 NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE

Where to go next