---
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-05-18** `8ec2edea6b20` — 6 warning
  - removed the optional property `details` from the response with the `400` status
  - removed the optional property `details` from the response with the `404` status
  - removed the optional property `details` from the response with the `500` status
  - added the new `too_many_requests` enum value to the `code` response property for the response status `400`
  - …2 more
- **2026-04-06** `95af41a12111` — 6 warning, 12 info
  - removed the optional property `error` from the response with the `400` status
  - removed the optional property `error` from the response with the `404` status
  - removed the optional property `error` from the response with the `500` status
  - removed the optional property `success` from the response with the `400` status
  - …14 more
- **2026-03-20** `d563556cdaf1` — 1 breaking, 1 warning, 1 info
  - removed the success response with the status `200`
  - deleted the `query` request parameter `finalize`
  - added the success response with the status `202`

[Change 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/2a40f94de722/schema)
