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

# Get fee invoice

> One fee invoice with its line items (plan commitment, overage with IU quantity and rate, payments applied). Scoped to the caller’s org — another org’s invoice number is a 404.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml get /billing/fee-invoices/{invoiceNumber}
openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: >-
    REST API for partners to manage Seller Accounts, inventory sources, and
    billing.


    ## Authentication


    All endpoints require a Bearer token in the Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```


    ## Base URL


    `https://api.interchange.io/api/v2/storefront`


    ## For AI Agents


    AI agents can use the MCP endpoint at `/mcp/v2/storefront` with three tools:

    - `initialize`: Start an MCP session

    - `api_call`: Make REST API calls

    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.interchange.io/api/v2/storefront
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Asks
    description: >-
      What you are waiting on Scope3 for — support, product, and supply asks in
      one list
  - name: Storefront
    description: Manage storefront and inventory sources
  - name: Storefront Agents
    description: List and manage registered sales, signals, and outcomes agents
  - name: Storefront Activity
    description: Audit log of configuration and inventory changes on the storefront
  - name: Storefront Billing
    description: Payout bank details and billing configuration for Seller Accounts
  - name: AI Usage
    description: Seller Account AI token usage visibility by model
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /billing/fee-invoices/{invoiceNumber}:
    servers:
      - url: https://api.interchange.io/api/v2
        description: Production server
    get:
      tags:
        - Buyer Billing
      summary: Get fee invoice
      description: >-
        One fee invoice with its line items (plan commitment, overage with IU
        quantity and rate, payments applied). Scoped to the caller’s org —
        another org’s invoice number is a 404.
      operationId: getFeeInvoice
      parameters:
        - in: query
          name: targetCustomerId
          schema:
            description: >-
              Direct child customer to read or update from an authorized parent
              billing organization
            type: string
            pattern: ^[1-9][0-9]*$
          description: >-
            Direct child customer to read or update from an authorized parent
            billing organization
        - in: path
          name: invoiceNumber
          schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 9007199254740991
            description: The invoice number to fetch
          required: true
          description: The invoice number to fetch
      responses:
        '200':
          description: Get fee invoice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeeInvoice'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    FeeInvoice:
      type: object
      properties:
        invoiceNumber:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Gapless sequential invoice number (platform-wide series)
        invoiceRef:
          type: string
          description: Display reference for the invoice (e.g. "FEE-000042")
          example: FEE-000042
        cycleKey:
          type: string
          description: The billing cycle the invoice covers (e.g. "2026-07")
          example: 2026-07
        cycleStart:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Cycle start (ISO 8601, UTC calendar month)
        cycleEnd:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Cycle end, exclusive (ISO 8601)
        currency:
          description: ISO 4217 currency code
          example: USD
          type: string
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]{3}$
        totalMinor:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: >-
            Outstanding balance in minor units: amounts owed minus payments
            applied. 0 once fully settled.
        paymentTerms:
          type: string
          enum:
            - net_15
            - net_30
            - net_45
            - net_60
            - net_90
          description: Effective account payment terms frozen at issuance
        issuedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: When the invoice was issued (ISO 8601)
        dueAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: When payment is due under the frozen account terms
        paidAt:
          nullable: true
          description: >-
            When the balance reached zero (ISO 8601), or null while any amount
            is outstanding
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        lines:
          type: array
          items:
            $ref: '#/components/schemas/FeeInvoiceLine'
          description: >-
            Invoice line items in write order. `commitment`/`overage` lines are
            frozen at issuance; `payment_applied` lines may be appended as
            charges settle.
      required:
        - invoiceNumber
        - invoiceRef
        - cycleKey
        - cycleStart
        - cycleEnd
        - currency
        - totalMinor
        - paymentTerms
        - issuedAt
        - dueAt
        - paidAt
        - lines
      additionalProperties: false
      description: One fee invoice with its line items.
    ErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
      description: Standard error response
    FeeInvoiceLine:
      type: object
      properties:
        lineKind:
          type: string
          enum:
            - commitment
            - overage
            - payment_applied
          description: >-
            What the invoice line is: the plan commitment for the cycle, usage
            overage (IUs × rate), or a payment applied against the balance
            (negative amount).
        description:
          type: string
          description: Human-readable description of the line
        quantity:
          nullable: true
          description: >-
            Intelligence Units the line covers — set on overage lines, null
            otherwise
          type: number
        unitRateMinor:
          nullable: true
          description: >-
            Per-IU overage rate in minor units — set on overage lines, null
            otherwise
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        amountMinor:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: >-
            Line amount in minor units. Positive for amounts owed (commitment,
            overage); negative for payments applied.
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: When the line was written (ISO 8601)
      required:
        - lineKind
        - description
        - quantity
        - unitRateMinor
        - amountMinor
        - createdAt
      additionalProperties: false
      description: One line item on a fee invoice.
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable error message
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Structured error object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````