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

A customer used by a live recurring template cannot be deleted

Deleting a customer that an active or paused recurring template invoices is now rejected, on the single DELETE and row by row in the bulk delete.


ChangelogBreaking

Deleting a customer that a recurring template still invoiced used to succeed, and it left the template with no one to invoice. It could not produce another invoice. The delete is now refused while an ACTIVE or PAUSED template uses the customer.

Finish the template, or change its customer, and the delete goes through as before.

What breaks

  • The single DELETE answers 400 REFERENCED_BY_RECURRING_INVOICE where it used to answer 204. It is the same code that deleting a series in use by a template already returns. The customer is left untouched.
  • In the bulk delete, that row fails on its own with status: HAS_RECURRING_INVOICE and error.code: CLIENT_HAS_RECURRING_INVOICE. The rest of the batch is deleted normally, just as with HAS_INVOICES. If you switch over status or error.code, add the new value.
  • statistics gains has_recurring_invoice, and it is required. The five counters deleted, not_found, has_invoices, has_recurring_invoice and errors add up to total_processed. Any sum you do over four of them is now short.

Does this affect you?

  • Look for code that deletes customers and treats any non-204 as a failure to retry. This rejection is a business rule: retrying never works.
  • If you validate the bulk-delete response against a generated model, regenerate it: a strict enum fails on the new status value.

Endpoints

  • DELETE/v1/companies/{company_id}/customers/{customer_id}400 REFERENCED_BY_RECURRING_INVOICE while a live template uses the customer
  • DELETE/v1/companies/{company_id}/customers/bulkNew row status HAS_RECURRING_INVOICE and counter has_recurring_invoice

Where to go next