---
title: "Get invoices for the previous months"
method: GET
path: "/_api/billing/invoices"
tags: ["Billing"]
---

# Get invoices for the previous months

`GET /_api/billing/invoices`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/billing/invoices/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch all invoice details of the tenant for specified number of previous months.

**Note**: this API is not applicable for system tenants.

## Query parameters

- `limit` integer

## Headers

- `tenant` string, string

## Response `200`

Successfully fetched invoice details.

Example - https://stripe.com/docs/api/invoices/list

**Note**: the example here is an excerpt please follow the link above for a complete example.

- Stripe200InvoiceList
  - `object` string
  - `url` string
  - `has_more` boolean
  - `data` object[]
    - `id` string
    - `object` string
    - `account_country` string
    - `account_name` string
    - `account_tax_ids` object
    - `amount_due` integer
    - `amount_paid` integer
    - `amount_remaining` integer

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed because you do not have administrator permissions.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
