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

# Get Billing History

> Return a unified, date-desc list of invoices and credit notes for the workspace.

Returns up to 50 of each kind per page. Each source (invoices, credit notes)
paginates independently via Stripe's native ``starting_after`` cursor; callers
thread the returned ``next_invoice_cursor`` / ``next_credit_note_cursor`` back
as query params to fetch the next page. ``has_more`` is true when either
cursor is non-null. Proration line items are embedded in their parent invoice
description — they are NOT emitted as standalone events.



## OpenAPI

````yaml /openapi.json get /api/v1/workspaces/{workspace_id}/billing/history
openapi: 3.1.0
info:
  description: Change Impact Engine for multi-repo systems
  title: Riftmap
  version: 1.12.3
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace_id}/billing/history:
    get:
      tags:
        - billing
      summary: Get Billing History
      description: >-
        Return a unified, date-desc list of invoices and credit notes for the
        workspace.


        Returns up to 50 of each kind per page. Each source (invoices, credit
        notes)

        paginates independently via Stripe's native ``starting_after`` cursor;
        callers

        thread the returned ``next_invoice_cursor`` /
        ``next_credit_note_cursor`` back

        as query params to fetch the next page. ``has_more`` is true when either

        cursor is non-null. Proration line items are embedded in their parent
        invoice

        description — they are NOT emitted as standalone events.
      operationId: get_billing_history_api_v1_workspaces__workspace_id__billing_history_get
      parameters:
        - in: path
          name: workspace_id
          required: true
          schema:
            format: uuid
            title: Workspace Id
            type: string
        - in: query
          name: invoice_cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Invoice Cursor
        - in: query
          name: credit_note_cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Credit Note Cursor
        - in: header
          name: X-Workspace-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
        - in: cookie
          name: riftmap_access
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Riftmap Access
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingHistoryResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    BillingHistoryResponse:
      properties:
        events:
          items:
            $ref: '#/components/schemas/BillingHistoryEvent'
          title: Events
          type: array
        has_more:
          title: Has More
          type: boolean
        next_credit_note_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Credit Note Cursor
        next_invoice_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Invoice Cursor
      required:
        - events
        - has_more
      title: BillingHistoryResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    BillingHistoryEvent:
      properties:
        amount:
          title: Amount
          type: integer
        created:
          format: date-time
          title: Created
          type: string
        currency:
          title: Currency
          type: string
        description:
          title: Description
          type: string
        hosted_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Hosted Url
        id:
          title: Id
          type: string
        pdf_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Pdf Url
        status:
          title: Status
          type: string
        type:
          enum:
            - invoice
            - credit_note
          title: Type
          type: string
      required:
        - id
        - type
        - created
        - amount
        - currency
        - status
        - description
        - hosted_url
        - pdf_url
      title: BillingHistoryEvent
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
    HTTPBearer:
      description: API key as Bearer token (rfm_live_... prefix)
      scheme: bearer
      type: http

````