---
title: "Generate Invoice Now"
method: POST
path: "/v1/organizations/billing/generate-invoice"
tags: ["Organization Billing"]
---

# Generate Invoice Now

`POST /v1/organizations/billing/generate-invoice`

Manually trigger invoice generation for this organization.

Useful for testing the billing flow or generating retroactive invoices.
Requires ADMIN permission.

Line items follow the v2 (modality+features, D8) composition: flat monthly
fee + per-modality feature usage in natural units and dollars + the plan's
included-usage pool as a deduction; only usage beyond the pool is due. The
total always reconciles to the month's ledger charges (see `pricing_v2`).

**Example:**
```python
# Dry run
response = await client.post(
    "/v1/organizations/billing/generate-invoice",
    json={"dry_run": true}
)

# Actually generate
response = await client.post(
    "/v1/organizations/billing/generate-invoice",
    json={"billing_month": "2026-01"}
)
```

## Request body

- BodyGenerateInvoiceNowV1OrganizationsBillingGenerateInvoicePost
  - `billing_month` string, nullable — Billing month (YYYY-MM). Defaults to previous month.
  - `dry_run` boolean — If true, show what would be invoiced without creating Stripe invoice.

## Response `200`

Successful Response

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/versions/220a3b263fda/schema)
