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

# List fiscal invoice issuance and delivery status

> Returns up to 200 recent fiscal records for the current organization. Filter by invoice CRN to inspect documents for an older billing invoice. Does not issue historical payments automatically.

<Info>
  Requires the IAM action **`billing:ListInvoices`**. See [BILLING permissions](/billing/permissions) for the full list, what each one covers, and an example policy.
</Info>


## OpenAPI

````yaml /api-reference/specs/billing.yaml get /v1/fiscal-invoices
openapi: 3.0.3
info:
  title: Basaltic Billing API
  version: 1.0.0
  description: |
    Prices, metered usage, invoices, payments and credits for the organization.
    The price catalog (`/v1/prices`) is public; other operations require
    organization policy grants for billing actions.

    Includes editable billing profiles and fiscal invoice status/downloads.
    Settling an invoice and managing payment methods happen in the console.
  contact:
    name: Basaltic Support
    email: ping@basaltic.sh
  license:
    name: Proprietary
    url: https://basaltic.sh/terms
servers:
  - url: https://billing.basaltic.sh
    description: Global API endpoint
security:
  - BearerAuth: []
paths:
  /v1/fiscal-invoices:
    get:
      tags:
        - Billing
      summary: List fiscal invoice issuance and delivery status
      description: >-
        Returns up to 200 recent fiscal records for the current organization.
        Filter by invoice CRN to inspect documents for an older billing invoice.
        Does not issue historical payments automatically.
      operationId: listFiscalInvoices
      parameters:
        - name: invoice
          in: query
          description: Canonical billing invoice CRN.
          schema:
            type: string
            example: crn:billing:::invoice/0195d322-8765-7000-8000-000000000001
      responses:
        '200':
          description: Fiscal records for this organization.
          content:
            application/json:
              schema:
                type: object
                required:
                  - fiscal_documents
                properties:
                  fiscal_documents:
                    type: array
                    items:
                      $ref: '#/components/schemas/FiscalInvoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    FiscalInvoice:
      type: object
      description: >-
        One NFS-e per confirmed provider payment, including partial payments or
        credit top-ups. Consuming prepaid credit never issues the same money
        twice. Recipient details and receipt amount are frozen before
        submission.
      required:
        - id
        - organization_id
        - payment_id
        - amount
        - status
        - email_status
        - attempts
        - requires_review
        - created_at
      properties:
        id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
        payment_id:
          type: string
          format: uuid
        invoice_id:
          type: string
          format: uuid
          nullable: true
        amount:
          type: string
          description: Actual amount received in BRL, not the billing invoice total.
          example: '12.34'
        status:
          type: string
          enum:
            - queued
            - waiting_details
            - retrying
            - rejected
            - issued
            - review_required
        email_status:
          type: string
          enum:
            - pending
            - queued
          description: >-
            Separate delivery state. Queued means durably accepted by the
            internal email service; it does not assert recipient delivery.
        last_error:
          type: string
          description: Sanitized operational error or municipal rejection codes.
        attempts:
          type: integer
        number:
          type: string
        verification_code:
          type: string
        url:
          type: string
          format: uri
          description: Municipal view/print link available after issuance.
        issued_at:
          type: string
          format: date-time
        requires_review:
          type: boolean
          description: >-
            Refunds preserve the fiscal document and require operator review;
            cancellation is never inferred automatically.
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Error code identifying the type of error
              example: INVALID_INPUT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameters
            request_id:
              type: string
              format: uuid
              description: Request ID for debugging
              example: 550e8400-e29b-41d4-a716-446655440000
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_INPUT
              message: Invalid request parameters
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Unauthorized:
      description: Authentication required or token invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Authentication required
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: ACCESS_DENIED
              message: You don't have permission to perform this action
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        An OAuth 2.0 bearer token, sent as `Authorization: Bearer <token>`.
        This is the recommended way to authenticate.

        Get one by exchanging a service account's access key pair at
        `POST /v1/oauth/token` with `grant_type=client_credentials`. It is the
        standard client-credentials grant, so any OAuth-aware library will
        obtain and refresh it for you.

        ```
        curl -s -u "$KEY_ID:$SECRET" -d grant_type=client_credentials \
          https://iam.basaltic.sh/v1/oauth/token
        ```

        Tokens last an hour by default. The same access key pair is separately
        your AWS SigV4 credential for the S3-compatible object endpoint, which
        speaks nothing else.

````