# Stop a recurring invoice.

> Ends the series: no copy is generated after this call, and the copies already generated stay as they are. It works whatever the invoice's status, paid included, which `PUT /invoices/{id}` cannot do since it only edits drafts. `is_recurring` becomes `false` and `next_invoice_date` `null`, and `invoice.updated` is sent. Stopping a series already stopped answers `200` and changes nothing. A copy generated from a recurring invoice has no series of its own: it answers `400` with the id of its template in `recurring_parent`, which is the invoice to stop. Requires the secret key.

`POST https://api.wajub.com/invoices/{id}/stop-recurring`

## Path parameters

- `id` (string, required): The recurring invoice's `id`.

## Responses

- `200`: Series stopped
- `400`: A generated copy
- `404`: Not found
- `406`: Publishable key

## Example response (200)

```json
{
  "code": 200,
  "status": "OK",
  "message": "Recurring invoice stopped",
  "invoice": {
    "id": "inv_Hq7Lm2Xp9Rt4Vb8Nc3Kd",
    "invoice_number": "INV-202609-0001",
    "status": "paid",
    "is_recurring": false,
    "recurring_interval": "monthly",
    "next_invoice_date": null,
    "recurring_parent": null
  }
}
```
