> ## 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.

# creditUsage

> Get the credit usage for a customer



**query** `creditUsage(input: CreditUsageInput!): CreditUsage!`

## Arguments

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

## Returns

`CreditUsage!`

**`currency`**: `SlimCustomCurrency`

Stigg custom currency object with minimal fields

---

**`pageInfo`**: `PageInfo!`

Cursor-based pagination state for the returned series. `startCursor`/`endCursor` anchor the current page; `hasNextPage`/`hasPreviousPage` indicate whether further pages exist. The series axis is `groupBy` when provided, otherwise `featureId`

---

**`series`**: `[CreditUsageSeries!]!`

Series of credit usage data points

## Examples

```graphql Query
query CreditUsage($input: CreditUsageInput!) {
  creditUsage(input: $input) {
    currency {
      currencyId
      displayName
      symbol
      units {
        plural
        singular
      }
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
    series {
      eventCount
      featureId
      featureName
      points {
        eventCount
        timestamp
        value
      }
      tags {
        key
        value
      }
      totalCredits
    }
  }
}
```

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

```json Response
{
  "data": {
    "creditUsage": {
      "currency": {
        "currencyId": "string",
        "displayName": "string",
        "symbol": "string",
        "units": {
          "plural": "string",
          "singular": "string"
        }
      },
      "pageInfo": {
        "endCursor": "value",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "value"
      },
      "series": [
        {
          "eventCount": 1,
          "featureId": "string",
          "featureName": "string",
          "points": [
            {
              "eventCount": 1,
              "timestamp": "value",
              "value": 1.5
            }
          ],
          "tags": [
            {
              "key": "string",
              "value": "string"
            }
          ],
          "totalCredits": 1.5
        }
      ]
    }
  }
}
```


## Related topics

- [CreditUsage](https://docs.stigg.io/graphql-reference/types/CreditUsage.md)
- [Get credit usage](https://docs.stigg.io/api-reference/credit-usage/get-credit-usage.md)
- [Go SDK](https://docs.stigg.io/api-and-sdks/changelog/backend-graphql/go.md)
- [Credit usage chart](https://docs.stigg.io/documentation/snap-in-widgets/credit-usage.md)
- [CreditUsageInput](https://docs.stigg.io/graphql-reference/types/CreditUsageInput.md)


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