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

# List Credit Balances for a customer

> List all Credit Balances including their grants and transactions



## OpenAPI

````yaml billing.latest.product.live GET /credits/{customerId}/balances
openapi: 3.0.0
info:
  title: Billing
  description: Manage Billing
  version: '0.1'
servers:
  - url: https://dev.seqhq.io/api
    description: DEV
  - url: https://sandbox.sequencehq.com/api
    description: SANDBOX
  - url: https://eu.sequencehq.com/api
    description: PRODUCTION
security: []
tags: []
paths:
  /credits/{customerId}/balances:
    servers: []
    parameters: []
    get:
      tags:
        - Credits
      summary: List Credit Balances for a customer
      description: List all Credit Balances including their grants and transactions
      operationId: getCreditsByCustomerIdBalances
      parameters:
        - name: customerId
          in: path
          description: Customer ID
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: Sequence-Version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditBalancesReply'
                example:
                  items:
                    - id: 6587e308-ab0d-4a58-8cc1-1d168490de7b
                      type: CASH
                      name: Credits
                      balance: '50'
                      grants:
                        - id: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
                          sequenceAccountId: a507e782-d26b-4d34-92b9-aacd1667e1f0
                          customerId: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
                          type: CASH
                          currency: GBP
                          metricId: b84f5290-fe95-4c6f-bedc-477700125265
                          name: GBP
                          originalAmount: '10'
                          currentBalance: '1'
                          expiryDate: '2024-01-02'
                          costOfCredit: '10'
                          taxRateId: b3c37ea3-96bb-44fb-baed-01eb38d3328e
                          effectiveDate: '2024-01-01'
                          createdAt: '2024-01-01T12:00:00Z'
                      transactions:
                        - id: c770d296-ef09-459b-b8dd-42c334e00dab
                          grantId: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
                          reason: because
                          invoiceId: c6864c69-42a3-4966-8c22-1c56d7375a05
                          billingRunId: e95256be-08e7-4585-b3c7-fa9928aacd90
                          type: CREDIT
                          amount: '10'
                          date: '2024-01-01'
              examples:
                CreditBalancesReply:
                  summary: ''
                  value:
                    items:
                      - id: 6587e308-ab0d-4a58-8cc1-1d168490de7b
                        type: CASH
                        name: Credits
                        balance: '50'
                        grants:
                          - id: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
                            sequenceAccountId: a507e782-d26b-4d34-92b9-aacd1667e1f0
                            customerId: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
                            type: CASH
                            currency: GBP
                            metricId: b84f5290-fe95-4c6f-bedc-477700125265
                            name: GBP
                            originalAmount: '10'
                            currentBalance: '1'
                            expiryDate: '2024-01-02'
                            costOfCredit: '10'
                            taxRateId: b3c37ea3-96bb-44fb-baed-01eb38d3328e
                            effectiveDate: '2024-01-01'
                            createdAt: '2024-01-01T12:00:00Z'
                        transactions:
                          - id: c770d296-ef09-459b-b8dd-42c334e00dab
                            grantId: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
                            reason: because
                            invoiceId: c6864c69-42a3-4966-8c22-1c56d7375a05
                            billingRunId: e95256be-08e7-4585-b3c7-fa9928aacd90
                            type: CREDIT
                            amount: '10'
                            date: '2024-01-01'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    CreditBalancesReply:
      required:
        - items
      type: object
      example:
        items:
          - id: 6587e308-ab0d-4a58-8cc1-1d168490de7b
            type: CASH
            name: Credits
            balance: '50'
            grants:
              - id: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
                sequenceAccountId: a507e782-d26b-4d34-92b9-aacd1667e1f0
                customerId: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
                type: CASH
                currency: GBP
                metricId: b84f5290-fe95-4c6f-bedc-477700125265
                name: GBP
                originalAmount: '10'
                currentBalance: '1'
                expiryDate: '2024-01-02'
                costOfCredit: '10'
                taxRateId: b3c37ea3-96bb-44fb-baed-01eb38d3328e
                effectiveDate: '2024-01-01'
                createdAt: '2024-01-01T12:00:00Z'
            transactions:
              - id: c770d296-ef09-459b-b8dd-42c334e00dab
                grantId: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
                reason: because
                invoiceId: c6864c69-42a3-4966-8c22-1c56d7375a05
                billingRunId: e95256be-08e7-4585-b3c7-fa9928aacd90
                type: CREDIT
                amount: '10'
                date: '2024-01-01'
      properties:
        items:
          type: array
          example:
            - id: 6587e308-ab0d-4a58-8cc1-1d168490de7b
              type: CASH
              name: Credits
              balance: '50'
              grants:
                - id: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
                  sequenceAccountId: a507e782-d26b-4d34-92b9-aacd1667e1f0
                  customerId: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
                  type: CASH
                  currency: GBP
                  metricId: b84f5290-fe95-4c6f-bedc-477700125265
                  name: GBP
                  originalAmount: '10'
                  currentBalance: '1'
                  expiryDate: '2024-01-02'
                  costOfCredit: '10'
                  taxRateId: b3c37ea3-96bb-44fb-baed-01eb38d3328e
                  effectiveDate: '2024-01-01'
                  createdAt: '2024-01-01T12:00:00Z'
              transactions:
                - id: c770d296-ef09-459b-b8dd-42c334e00dab
                  grantId: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
                  reason: because
                  invoiceId: c6864c69-42a3-4966-8c22-1c56d7375a05
                  billingRunId: e95256be-08e7-4585-b3c7-fa9928aacd90
                  type: CREDIT
                  amount: '10'
                  date: '2024-01-01'
          items:
            $ref: '#/components/schemas/CreditBalance'
    CreditBalance:
      required:
        - balance
        - grants
        - id
        - name
        - transactions
        - type
      type: object
      example:
        id: 6587e308-ab0d-4a58-8cc1-1d168490de7b
        type: CASH
        name: Credits
        balance: '50'
        grants:
          - id: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
            sequenceAccountId: a507e782-d26b-4d34-92b9-aacd1667e1f0
            customerId: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
            type: CASH
            currency: GBP
            metricId: b84f5290-fe95-4c6f-bedc-477700125265
            name: GBP
            originalAmount: '10'
            currentBalance: '1'
            expiryDate: '2024-01-02'
            costOfCredit: '10'
            taxRateId: b3c37ea3-96bb-44fb-baed-01eb38d3328e
            effectiveDate: '2024-01-01'
            createdAt: '2024-01-01T12:00:00Z'
        transactions:
          - id: c770d296-ef09-459b-b8dd-42c334e00dab
            grantId: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
            reason: because
            invoiceId: c6864c69-42a3-4966-8c22-1c56d7375a05
            billingRunId: e95256be-08e7-4585-b3c7-fa9928aacd90
            type: CREDIT
            amount: '10'
            date: '2024-01-01'
      properties:
        id:
          type: string
          description: >-
            Indicates the ID of Credit target, either a currency code or a
            metric id
          example: 6587e308-ab0d-4a58-8cc1-1d168490de7b
        type:
          $ref: '#/components/schemas/CreditType'
          description: Type of the Credit - will either be CASH or USAGE
        name:
          type: string
          description: >-
            Name of the Credit - will either be the currency or name of the
            metric
          example: Credits
        balance:
          type: string
          description: Amount remaining of Credits Granted
          example: '50'
        grants:
          type: array
          description: Related credit grants
          example:
            - id: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
              sequenceAccountId: a507e782-d26b-4d34-92b9-aacd1667e1f0
              customerId: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
              type: CASH
              currency: GBP
              metricId: b84f5290-fe95-4c6f-bedc-477700125265
              name: GBP
              originalAmount: '10'
              currentBalance: '1'
              expiryDate: '2024-01-02'
              costOfCredit: '10'
              taxRateId: b3c37ea3-96bb-44fb-baed-01eb38d3328e
              effectiveDate: '2024-01-01'
              createdAt: '2024-01-01T12:00:00Z'
          items:
            $ref: '#/components/schemas/CreditGrant'
        transactions:
          type: array
          description: Related credit transactions
          example:
            - id: c770d296-ef09-459b-b8dd-42c334e00dab
              grantId: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
              reason: because
              invoiceId: c6864c69-42a3-4966-8c22-1c56d7375a05
              billingRunId: e95256be-08e7-4585-b3c7-fa9928aacd90
              type: CREDIT
              amount: '10'
              date: '2024-01-01'
          items:
            $ref: '#/components/schemas/CreditTransaction'
    CreditType:
      type: string
      example: CASH
      enum:
        - CASH
        - USAGE
    CreditGrant:
      required:
        - costOfCredit
        - createdAt
        - currency
        - currentBalance
        - customerId
        - id
        - name
        - originalAmount
        - sequenceAccountId
        - type
      type: object
      example:
        id: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
        sequenceAccountId: a507e782-d26b-4d34-92b9-aacd1667e1f0
        customerId: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
        type: CASH
        currency: GBP
        metricId: b84f5290-fe95-4c6f-bedc-477700125265
        name: GBP
        originalAmount: '10'
        currentBalance: '1'
        expiryDate: '2024-01-02'
        costOfCredit: '10'
        taxRateId: b3c37ea3-96bb-44fb-baed-01eb38d3328e
        effectiveDate: '2024-01-01'
        createdAt: '2024-01-01T12:00:00Z'
      properties:
        id:
          type: string
          description: Credit Grant ID
          example: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
        sequenceAccountId:
          type: string
          description: Sequence account ID
          example: a507e782-d26b-4d34-92b9-aacd1667e1f0
        customerId:
          type: string
          description: Customer ID
          example: eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb
        type:
          $ref: '#/components/schemas/CreditType'
          description: Type of the Credit - will either be CASH or USAGE
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency
        metricId:
          type: string
          description: Usage metric ID (if type is USAGE)
          example: b84f5290-fe95-4c6f-bedc-477700125265
        name:
          type: string
          description: >-
            Name of the Credit - will either be the currency or name of the
            metric
          example: GBP
        originalAmount:
          type: string
          description: Amount of credits originally granted
          example: '10'
        currentBalance:
          type: string
          description: Amount remaining of Credits Granted
          example: '1'
        expiryDate:
          type: string
          description: Last Day Credit Grant can be consumed
          format: date
          example: '2024-01-02'
        costOfCredit:
          type: string
          description: Cost of credit grant
          example: '10'
        taxRateId:
          type: string
          description: Tax Rate ID for Credit Purchase
          example: b3c37ea3-96bb-44fb-baed-01eb38d3328e
        effectiveDate:
          type: string
          description: First Day Credit Grant can be consumed
          format: date
          example: '2024-01-01'
        createdAt:
          type: string
          description: The created at
          example: '2024-01-01T12:00:00Z'
    CreditTransaction:
      required:
        - amount
        - date
        - grantId
        - type
      type: object
      example:
        id: c770d296-ef09-459b-b8dd-42c334e00dab
        grantId: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
        reason: because
        invoiceId: c6864c69-42a3-4966-8c22-1c56d7375a05
        billingRunId: e95256be-08e7-4585-b3c7-fa9928aacd90
        type: CREDIT
        amount: '10'
        date: '2024-01-01'
      properties:
        id:
          type: string
          description: Credit Transaction ID
          example: c770d296-ef09-459b-b8dd-42c334e00dab
        grantId:
          type: string
          description: Credit Grant ID
          example: 5a0faea3-7ad5-4a83-a420-09bb6576f7e6
        reason:
          type: string
          description: Transaction Reason
          example: because
        invoiceId:
          type: string
          description: Invoice ID where Credit was consumed
          example: c6864c69-42a3-4966-8c22-1c56d7375a05
        billingRunId:
          type: string
          description: Billing Run ID where Credit was consumed
          example: e95256be-08e7-4585-b3c7-fa9928aacd90
        type:
          type: string
          description: Credit Transaction Type
          example: CREDIT
        amount:
          type: string
          description: Number of units added or consumed
          example: '10'
        date:
          type: string
          description: Date of transaction
          format: date
          example: '2024-01-01'
    Currency:
      type: string
      example: GBP
      enum:
        - AED
        - ARS
        - AUD
        - BRL
        - BGN
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CZK
        - DKK
        - EGP
        - EUR
        - GBP
        - HKD
        - ILS
        - INR
        - ISK
        - JPY
        - KRW
        - MXN
        - NOK
        - NZD
        - PLN
        - SAR
        - SEK
        - SGD
        - THB
        - USD
        - UYU
        - ZAR

````