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

# List credit transactions

> Retrieve all credit transactions associated with a credit product.



## OpenAPI

````yaml get /v1/customers/{id}/credits/{productId}/transactions
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/customers/{id}/credits/{productId}/transactions:
    get:
      tags:
        - Customers > Credits
      summary: List credit transactions
      description: Retrieve all credit transactions associated with a credit product.
      operationId: listCustomerCreditTransactions
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
        - schema:
            type: string
          required: true
          name: productId
          in: path
        - schema:
            type:
              - number
              - 'null'
            minimum: 0
            maximum: 100
            default: 50
          required: false
          name: take
          in: query
        - schema:
            type:
              - number
              - 'null'
            minimum: 0
            default: 0
          required: false
          name: skip
          in: query
        - schema:
            type:
              - string
              - 'null'
          required: false
          name: id
          in: query
        - schema:
            type:
              - string
              - 'null'
          required: false
          name: type
          in: query
        - schema:
            type:
              - string
              - 'null'
          required: false
          name: invoice_id
          in: query
        - schema:
            type:
              - string
              - 'null'
          required: false
          name: created_at
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCreditTransaction'
      security:
        - bearer: []
components:
  schemas:
    PaginatedCreditTransaction:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: number
              description: Total of existing items.
              example: 1
            taken:
              type: number
              description: Number of items returned.
              example: 1
            skipped:
              type: number
              description: Number of items skipped.
              example: 0
          required:
            - total
            - taken
            - skipped
        data:
          type: array
          items:
            $ref: '#/components/schemas/CreditTransaction'
          description: List of CreditTransaction.
      required:
        - meta
        - data
    CreditTransaction:
      type: object
      properties:
        id:
          type: string
          description: Credit transaction ID.
          example: cdt_BPZ19obsBS2qyo
        product_id:
          type:
            - string
            - 'null'
          description: ID of the product related to the transaction.
          example: itm_3kXODDF42QXtnL
        price:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            amount:
              type: number
              description: Monetary amount. Expressed in currency's smallest unit.
            pack_size:
              type: number
          required:
            - id
            - amount
            - pack_size
          description: Price details related to the transaction.
          example:
            id: pri_0Jv8EbMDOGsHcn
            amount: 20000
            pack_size: 120
        customer_id:
          type: string
          description: ID of the customer related to the transaction.
          example: cus_Typ0px2W0aiEtl
        payment_method_id:
          type:
            - string
            - 'null'
          description: ID of the payment method related to the transaction.
          example: pm_1xMpj5bwRqN7LM
        invoice_id:
          type:
            - string
            - 'null'
          description: ID of the invoice related to the transaction.
          example: inv_1eTaiytfA0i2Va
        event_id:
          type:
            - string
            - 'null'
          description: ID of the event related to the credit consumption.
          example: null
        aggregator_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the aggregator that triggered this usage (for multi-aggregator
            credits).
          example: null
        expires_at:
          type:
            - string
            - 'null'
          format: date
          description: Expiration date for credits linked to this transaction
          example: null
        type:
          type: string
          enum:
            - topup
            - usage
            - expiration
          description: Type of credit transaction.
          example: topup
        source:
          type: string
          enum:
            - app
            - portal
            - api
            - system
          description: Deprecated field, we recommend no longer using it.
          example: system
          deprecated: true
        amount_excluding_tax:
          type:
            - number
            - 'null'
          description: Monetary amount. Expressed in currency's smallest unit.
        credit_count:
          type: number
          description: Value of credits related to the transaction.
          example: 32
        balance_after:
          type: number
          description: Credit balance after the transaction.
          example: 2000
        created_at:
          type: string
          format: date-time
          description: >-
            Credit transaction creation date. UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2024-10-13T07:00:01.860Z'
        updated_at:
          type: string
          format: date-time
          description: >-
            Credit transaction last edition date. UTC date time string in the
            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2024-10-13T07:00:01.860Z'
      required:
        - id
        - product_id
        - price
        - customer_id
        - payment_method_id
        - invoice_id
        - event_id
        - aggregator_id
        - expires_at
        - type
        - source
        - amount_excluding_tax
        - credit_count
        - balance_after
        - created_at
        - updated_at
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````