> ## Documentation Index
> Fetch the complete documentation index at: https://sl-6d1f19fe-mintlify-ff95e355.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List invoices



## OpenAPI

````yaml https://api.streamloop.app/v1/openapi.json get /billing/invoices
openapi: 3.1.0
info:
  contact:
    name: Streamloop
    url: https://streamloop.app
  description: >-
    The Streamloop REST API. Authenticate with either an `X-API-Key` header (a
    Streamloop API key, prefix `sl_` — simplest for programmatic clients) or an
    OAuth 2.1 bearer access token (obtain one via https://auth.streamloop.app).
    Collections are cursor-paginated (`limit` + `cursor`, returning `{ data,
    page }`). Errors are RFC 7807 problem documents.
  summary: >-
    Programmatic access to Streamloop — create and control 24/7 loop streams,
    manage media, destinations, playlists, and billing.
  title: Streamloop API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.streamloop.app/v1
security:
  - oauth2: []
  - bearerAuth: []
  - apiKey: []
tags:
  - description: The authenticated user's account.
    name: account
  - description: Credits, usage analytics, invoices, and top-ups.
    name: billing
  - description: Crypto deposit options for topping up credits.
    name: crypto
  - description: Manage streaming destinations (custom RTMP).
    name: destinations
  - description: 'Service metadata: status and the OpenAPI document (unauthenticated).'
    name: meta
  - description: Manage and publish stream playlists.
    name: playlists
  - description: Create, control, schedule, and monitor 24/7 loop streams.
    name: streams
  - description: Upload and manage source media (video/audio).
    name: uploads
paths:
  /billing/invoices:
    get:
      tags:
        - billing
      summary: List invoices
      operationId: listInvoices
      parameters:
        - description: Maximum items to return (1-100, default 20).
          in: query
          name: limit
          required: false
          schema:
            default: 20
            maximum: 100
            minimum: 1
            type: integer
        - description: Pagination cursor from a previous response's `page.nextCursor`.
          in: query
          name: cursor
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceList'
          description: Successful response.
          headers:
            RateLimit-Limit:
              description: Requests allowed per window.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Missing or invalid access token.
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The token lacks the required scope or access to the resource.
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The resource does not exist or is not visible to the caller.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body or parameters are invalid.
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Rate limit exceeded. Retry after the indicated delay.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
        '502':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The upstream data service returned an error.
      security:
        - oauth2:
            - streamloop:read
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    InvoiceList:
      description: A page of invoice items.
      properties:
        data:
          items:
            $ref: '#/components/schemas/InvoiceSummary'
          type: array
        page:
          $ref: '#/components/schemas/Page'
      required:
        - data
        - page
      type: object
    Problem:
      description: RFC 7807 problem-details error body.
      properties:
        code:
          description: A stable, machine-readable error code.
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence.
          type: string
        status:
          description: The HTTP status code.
          type: integer
        title:
          description: A short, human-readable summary of the problem.
          type: string
        type:
          description: A URI reference identifying the problem type.
          format: uri-reference
          type: string
      required:
        - type
        - title
        - status
        - detail
        - code
      type: object
    InvoiceSummary:
      properties:
        cost:
          type: integer
        createdAt:
          format: date-time
          type: string
        credits:
          type: integer
        currency:
          type: string
        id:
          type: string
        method:
          type: string
        receiptURL:
          description: >-
            Receipt/invoice download URL from the payment provider. Persisted at
            webhook time when available, otherwise fetched lazily on first
            access.
          type:
            - string
            - 'null'
        remainingCredits:
          type: integer
        state:
          enum:
            - cancelled
            - pending
            - paid
          type: string
        type:
          enum:
            - credit_purchase
            - usage_summary
            - credit_grant
          type: string
      required:
        - cost
        - createdAt
        - credits
        - currency
        - id
        - method
        - remainingCredits
        - state
        - type
      type: object
    Page:
      description: Cursor-pagination metadata.
      properties:
        hasMore:
          description: Whether another page is available.
          type: boolean
        nextCursor:
          description: Cursor for the next page, or null on the last page.
          type:
            - string
            - 'null'
      required:
        - nextCursor
        - hasMore
      type: object
  securitySchemes:
    oauth2:
      description: OAuth 2.1 authorization-code flow with PKCE.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.streamloop.app/api/auth/oauth2/authorize
          scopes:
            streamloop:billing: Read billing/usage and create top-up links
            streamloop:destructive: Delete streams and destinations
            streamloop:read: Read streams, destinations, playlists, and billing status
            streamloop:write: Create and control streams, destinations, and playlists
          tokenUrl: https://auth.streamloop.app/api/auth/oauth2/token
      type: oauth2
    bearerAuth:
      bearerFormat: JWT
      description: An OAuth 2.1 bearer access token.
      scheme: bearer
      type: http
    apiKey:
      description: >-
        A Streamloop API key (prefix `sl_`), sent in the `X-API-Key` header.
        Create and manage keys in the dashboard. The simplest auth for
        programmatic / agent clients — no OAuth flow required; the key acts as
        its owning user.
      in: header
      name: X-API-Key
      type: apiKey

````