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

# getCustomerInvoices

> Get a customer's invoices, fetched live from the connected billing provider (Received), with offset pagination and optional narrowing by contract, issue-date range, and/or invoice states. Ordered by issue date ascending by default; override with orderBy/orderDir. Returns an empty page when no billing provider is connected or the customer is not synced.



**query** `getCustomerInvoices(input: GetCustomerInvoicesInput!): InvoicesPageDTO!`

## Arguments

**`input`**: `GetCustomerInvoicesInput!` (required)

## Returns

`InvoicesPageDTO!`

**`invoices`**: `[InvoiceDTO!]!`

The invoices in this page

---

**`totalCount`**: `Int!`

Total number of matching invoices across all pages

## Examples

```graphql Query
query GetCustomerInvoices($input: GetCustomerInvoicesInput!) {
  getCustomerInvoices(input: $input) {
    invoices {
      contractExternalId
      currency
      customerExternalId
      discount
      dueDate
      invoiceExternalId
    }
    totalCount
  }
}
```

```json Variables
{
  "input": {
    "customerId": "string"
  }
}
```

```json Response
{
  "data": {
    "getCustomerInvoices": {
      "invoices": [
        {
          "contractExternalId": "string",
          "currency": "string",
          "customerExternalId": "string",
          "discount": 1.5,
          "dueDate": "value",
          "invoiceExternalId": "string"
        }
      ],
      "totalCount": 1
    }
  }
}
```


## Related topics

- [GetCustomerInvoicesInput](https://docs.stigg.io/graphql-reference/types/GetCustomerInvoicesInput.md)
- [Get a list of invoices](https://docs.stigg.io/api-reference/invoices/get-a-list-of-invoices.md)
- [getCustomerContracts](https://docs.stigg.io/graphql-reference/queries/getCustomerContracts.md)
- [Get a single invoice by ID](https://docs.stigg.io/api-reference/invoices/get-a-single-invoice-by-id.md)
- [Get invoice PDF status](https://docs.stigg.io/api-reference/invoices/get-invoice-pdf-status.md)


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