> ## Documentation Index
> Fetch the complete documentation index at: https://docs.affonso.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List invoices

> Read Affonso invoices for the authenticated team

Use an Affonso API key with the `billing:read` scope. Invoices are ordered newest first. Teams without Stripe invoices receive an empty `data` array. The response is not paginated.

The broad `read`, `write`, and `delete` permissions and OAuth tokens do not include `billing:read`. Only team members with billing access can create a key with this scope.

**limit** `integer` (default: 24)

Number of invoices to return, from 1 to 24. Defaults to and is capped at 24.

## Response

**success** `boolean`

`true` when the request succeeds.

**data** `array`

The team's Stripe invoices, newest first. There is no `pagination` object.

**Invoice fields**

**created** `integer`

Creation time as Unix seconds.

**number** `string | null`

Stripe invoice number.

**total** `integer`

Stripe invoice total in the currency's smallest unit.

**currency** `string`

Lowercase ISO currency code from Stripe.

**status** `string | null`

Stripe invoice status.

**hosted\_invoice\_url** `string | null`

Link to the hosted invoice.

**invoice\_pdf** `string | null`

Link to download the invoice PDF.

## Errors

* **400**: `limit` is not an integer between 1 and 24. The message is `Limit must be an integer between 1 and 24`.
* **403** `INSUFFICIENT_PERMISSIONS`: the API key does not have the `billing:read` scope.
* **503** `SERVICE_UNAVAILABLE`: billing is not available.

```json Billing unavailable theme={null}
{
  "success": false,
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Billing not available"
  }
}
```

```bash cURL theme={null}
curl "https://api.affonso.io/v1/billing/invoices?limit=24" \
  -H "Authorization: Bearer ${AFFONSO_API_KEY}"
```

```json Response theme={null}
{
  "success": true,
  "data": [
    {
      "created": 1796083200,
      "number": "DEMO-0001",
      "total": 4900,
      "currency": "usd",
      "status": "paid",
      "hosted_invoice_url": "https://example.com/invoices/demo",
      "invoice_pdf": "https://example.com/invoices/demo.pdf"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.