# List invoices

> Source: https://truto.one/docs/api-reference/admin/billing/list/

`GET /billing/invoice`

Resource: **Billing**

## Query parameters

- **`team_id`** _(string, required)_
- **`status`** _(string)_
  Filter by Stripe invoice status.
  Allowed: `draft`, `open`, `paid`, `void`, `uncollectible`
- **`limit`** _(integer)_
- **`next_cursor`** _(string)_
  Opaque cursor from the previous page.

## Response body

- **`result`** _(array<object>)_
  - **`id`** _(string)_
    Truto's id for the mirrored invoice row.
  - **`team_id`** _(string)_
  - **`stripe_invoice_id`** _(string)_
  - **`stripe_customer_id`** _(string)_
  - **`source`** _(string)_
    `automated` when Truto generated it from a plan; `stripe_manual` when it was raised by hand in Stripe.
    Allowed: `automated`, `stripe_manual`
  - **`status`** _(string)_
    Raw Stripe invoice status.
    Allowed: `draft`, `open`, `paid`, `void`, `uncollectible`
  - **`number`** _(string)_
  - **`currency`** _(string)_
  - **`amount_due_cents`** _(integer)_
  - **`amount_paid_cents`** _(integer)_
  - **`amount_remaining_cents`** _(integer)_
  - **`period_start`** _(string)_
  - **`period_end`** _(string)_
  - **`hosted_invoice_url`** _(string)_
    Stripe-hosted page to view and pay the invoice.
  - **`invoice_pdf`** _(string)_
  - **`stripe_created_at`** _(string)_
  - **`finalized_at`** _(string)_
  - **`paid_at`** _(string)_
  - **`voided_at`** _(string)_
  - **`attempt_count`** _(integer)_
  - **`last_payment_error`** _(string)_
- **`next_cursor`** _(string)_
- **`limit`** _(number)_

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/billing/invoice' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/billing/invoice', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/billing/invoice"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```
