---
title: "Recalculate invoice (voided invoice)"
method: POST
path: "/invoices/{id}/recalculate"
tags: ["Invoices"]
---

# Recalculate invoice (voided invoice)

`POST /invoices/{id}/recalculate`

Starts an async workflow that creates a fresh replacement invoice for a voided SUBSCRIPTION invoice (same billing period). Returns workflow_id and run_id; poll workflow status or GET the new invoice via recalculated_invoice_id after completion.

## Path parameters

- `id` string, required

## Response `202`

Accepted

- ModelsTemporalWorkflowResult
  - `message` string
  - `run_id` string
  - `workflow_id` string

## Other responses

- `400` — Invalid request or invoice already recalculated
- `404` — Invoice not found
- `500` — Server error

## Changes

- **2026-07-15** `f8ecf435d25d` — 3 warning
  - added the new `not_implemented` enum value to the `code` response property for the response status `400`
  - added the new `not_implemented` enum value to the `code` response property for the response status `404`
  - added the new `not_implemented` enum value to the `code` response property for the response status `500`
- **2026-07-09** `7d57386313c7` — 1 breaking, 3 info
  - the response's body type changed from no type to `object` for status `202`
  - added the optional property `message` to the response with the `202` status
  - added the optional property `run_id` to the response with the `202` status
  - added the optional property `workflow_id` to the response with the `202` status
- **2026-07-09** `4b1a811c4179` — 1 breaking, 3 warning
  - the response's body type changed from `object` to no type for status `202`
  - removed the optional property `message` from the response with the `202` status
  - removed the optional property `run_id` from the response with the `202` status
  - removed the optional property `workflow_id` from the response with the `202` status
- …earlier changes not shown

[Full history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/invoices/:id/recalculate/post.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/2bd70d9bd657/schema)
