---
title: "POST /v1/invoices.insert"
method: POST
path: "/v1/invoices.insert"
tags: ["invoices"]
---

# POST /v1/invoices.insert

`POST /v1/invoices.insert`

Inserts or updates up to 500 historical invoices without reading or mutating the billing processor.

## Headers

- `x-api-version` string, required

## Request body

- object
  - `invoices` object[], required — Invoices to insert or update, in response order.
    - `customer_id` string, required — The customer this invoice belongs to.
    - `plan_ids` string[] — Plan IDs represented by this invoice.
    - `stripe_id` string, required — The processor's stable invoice ID.
    - `processor_type` 'stripe' | 'revenuecat' — The billing processor that owns this invoice.
    - `status` 'draft' | 'open' | 'void' | 'paid' | 'uncollectible', required — The invoice status.
    - `total` number, required — The invoice total in major currency units.
    - `amount_paid` number, nullable — The amount paid in major currency units.
    - `refunded_amount` number — The refunded amount in major currency units.
    - `currency` string — The currency code. Defaults to the organization's default currency.
    - `created_at` number, required — The invoice creation timestamp in milliseconds.
    - `hosted_invoice_url` string, nullable — The hosted invoice URL, when available.

## Response `200`

OK

- object
  - `invoices` object[], required — Inserted or updated invoices in request order.
    - `plan_ids` string[], required — Array of plan IDs included in this invoice
    - `stripe_id` string, required — The Stripe invoice ID
    - `processor_type` 'stripe' | 'revenuecat' — The billing processor that owns this invoice.
    - `status` string, required — The status of the invoice
    - `total` number, required — The total amount of the invoice
    - `currency` string, required — The currency code for the invoice
    - `created_at` number, required — Timestamp when the invoice was created
    - `hosted_invoice_url` string, nullable — URL to the Stripe-hosted invoice page
    - `id` string, required — The Autumn invoice ID.
    - `customer_id` string, required — The customer this invoice belongs to.
    - `amount_paid` number, nullable, required — The amount paid in major currency units.
    - `refunded_amount` number, required — The refunded amount in major currency units.

---

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