---
title: "Generate Order Invoice"
method: POST
path: "/v1/customer-portal/orders/{id}/invoice"
tags: ["customer_portal", "orders", "public"]
---

# Generate Order Invoice

`POST /v1/customer-portal/orders/{id}/invoice`

## Request

- Base URL: `https://api.polar.sh`
- URL: `https://api.polar.sh/v1/customer-portal/orders/{id}/invoice`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Trigger generation of an order's invoice.

## Path parameters

- `id` string, uuid4, required: The order ID.

## Response `202`

Successful Response

- unknown

## Other responses

- `404`: Order not found.
- `409`: Order is not eligible for invoice generation (invalid status).
- `422`: Order is missing billing name or address.

---

[API](https://skmtc.dev/polar/apis/polar-api.md) - [All operations](https://skmtc.dev/polar/apis/polar-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polar/apis/polar-api/revisions/77e4ef94fcc3?raw)
