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

# List credit transactions

> Return recent credit transactions for the authenticated user.



## OpenAPI

````yaml /openapi.json get /v1/billing/transactions
openapi: 3.1.0
info:
  title: Erna API
  version: 1.0.0
  description: >-
    AI business operations platform API.


    Erna uses a reusable pipeline lifecycle: Playbook -> Pipeline -> Revision ->
    Run.


    - A playbook defines the repeatable task type, generation behavior, and run
    input/output contract.

    - A pipeline stores reusable instructions and configuration for one
    playbook. Do not create a new pipeline for every execution.

    - A revision is the built executable version of a pipeline definition.

    - A run executes the latest ready revision with playbook-specific input.


    For scheduling, create one pipeline with the reusable business rules, staff
    context, and constraints. Then run that pipeline repeatedly with
    date-specific input such as { "input": { "dateRange": { "start":
    "2026-05-11", "end": "2026-05-17" } } }.
servers:
  - url: https://api.erna.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/billing/transactions:
    get:
      tags:
        - Billing
      summary: List credit transactions
      description: Return recent credit transactions for the authenticated user.
      operationId: listBillingTransactions
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            example: 20
          required: false
          name: limit
          in: query
      responses:
        '200':
          description: Recent credit transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  connector:
                    type: string
                  flow:
                    type: string
                  providerError:
                    type: string
                  details:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                  message:
                    type: string
                  reason:
                    type: string
                  runId:
                    type: string
                  requiredActions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                          enum:
                            - connect_service
                        connector:
                          type: string
                        href:
                          type: string
                        request:
                          type: object
                          properties: {}
                          default: {}
                          additionalProperties: {}
                      required:
                        - id
                        - type
                        - connector
                        - href
                      additionalProperties: false
                  billing:
                    type: object
                    properties:
                      checkoutPath:
                        type: string
                    required:
                      - checkoutPath
                required:
                  - error
                additionalProperties: false
      security:
        - bearerAuth: []
components:
  schemas:
    TransactionsResponse:
      type: object
      properties:
        transactions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: txn_123
              userId:
                type: string
                example: user_123
              amount:
                type: integer
                example: -125
              type:
                type: string
                enum:
                  - topup
                  - usage
                  - hold
                  - release
                  - grant
                example: usage
              reference:
                type:
                  - string
                  - 'null'
                example: run_123
              description:
                type:
                  - string
                  - 'null'
                example: Schedule generation
              createdAt:
                type: string
                example: '2026-04-20T12:00:00.000Z'
            required:
              - id
              - userId
              - amount
              - type
              - reference
              - description
              - createdAt
      required:
        - transactions
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth2 access token or API key

````