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

# Get Invoices

> List your business billing invoices — subscription charges, outstanding amounts, and payment status. GET /account/invoices.

## Overview

Retrieve a paginated list of billing invoices issued to your business account. Invoices are generated monthly for subscription-based pricing plans and may also be issued for outstanding fees.

## Pagination

| Parameter | Default | Max |
| --------- | ------- | --- |
| `page`    | 1       | -   |
| `perPage` | 20      | 100 |

## Response Fields

| Field         | Type         | Description                                               |
| ------------- | ------------ | --------------------------------------------------------- |
| `invoiceId`   | string       | Unique invoice identifier                                 |
| `period`      | string       | Billing period in `YYYY-MM` format                        |
| `subtotal`    | number       | Amount before any adjustments                             |
| `totalAmount` | number       | Total amount due                                          |
| `paidAmount`  | number       | Amount already paid                                       |
| `currency`    | string       | Always `USD`                                              |
| `status`      | string       | `PENDING`, `PAID`, `PARTIALLY_PAID`, `OVERDUE`, or `VOID` |
| `issuedAt`    | string       | ISO 8601 timestamp when invoice was issued                |
| `dueDate`     | string\|null | Due date in `YYYY-MM-DD` format                           |
| `paidAt`      | string\|null | ISO 8601 timestamp when invoice was fully paid            |

## Invoice Statuses

| Status           | Description                                             |
| ---------------- | ------------------------------------------------------- |
| `PENDING`        | Invoice issued, payment not yet received                |
| `PAID`           | Invoice fully paid                                      |
| `PARTIALLY_PAID` | Partial payment received; remaining balance outstanding |
| `OVERDUE`        | Past due date without full payment                      |
| `VOID`           | Invoice cancelled                                       |

## Example Usage

```javascript theme={null}
const response = await fetch('https://api.fyatu.com/api/v3/account/invoices?page=1&perPage=10', {
  headers: {
    'Authorization': `Bearer ${accessToken}`
  }
});

const { data } = await response.json();

console.log(`Total invoices: ${data.pagination.totalItems}`);
data.invoices.forEach(inv => {
  const outstanding = inv.totalAmount - inv.paidAmount;
  console.log(`Invoice ${inv.invoiceId} (${inv.period}): $${inv.totalAmount} — ${inv.status}`);
  if (outstanding > 0) {
    console.log(`  Outstanding: $${outstanding.toFixed(2)}`);
  }
});
```

## Use Cases

1. **Billing overview**: See all invoices and their payment status
2. **Outstanding balance**: Find unpaid or partially paid invoices
3. **Payment history**: Confirm when invoices were settled


## OpenAPI

````yaml v3/openapi.json GET /account/invoices
openapi: 3.1.0
info:
  title: FYATU API v3
  description: >-
    FYATU API v3 with JWT authentication for Collections, Payouts, and Card
    Issuing.
  version: 3.0.0
  contact:
    name: FYATU Support
    url: https://fyatu.com
    email: support@fyatu.com
servers:
  - url: https://api.fyatu.com/api/v3
    description: Production
security: []
tags:
  - name: Authentication
    description: JWT token management endpoints
  - name: Account
    description: Business account, wallet, and address management
  - name: Collections
    description: Accept payments from customers via checkout sessions
  - name: Refunds
    description: Issue refunds for completed collections
  - name: Payouts
    description: Send money to Fyatu account holders
  - name: Cardholders
    description: Cardholder management for card issuing programs
  - name: Cards
    description: Issue, fund, freeze, and manage virtual cards
  - name: Webhooks
    description: Webhook configuration and management
paths:
  /account/invoices:
    get:
      tags:
        - Account
      summary: Get Invoices
      description: >-
        Retrieve a paginated list of billing invoices issued to your business
        account. Invoices are generated monthly for subscription-based pricing
        plans and may also be issued for outstanding fees.
      operationId: getInvoices
      parameters:
        - name: page
          in: query
          description: 'Page number (default: 1)'
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: perPage
          in: query
          description: 'Items per page (default: 20, max: 100)'
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
      responses:
        '200':
          description: Invoices retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoicesResponse'
              example:
                success: true
                status: 200
                message: Invoices retrieved successfully
                data:
                  invoices:
                    - invoiceId: INV-2026-01
                      period: 2026-01
                      subtotal: 49
                      totalAmount: 49
                      paidAmount: 49
                      currency: USD
                      status: PAID
                      issuedAt: '2026-01-01T00:00:00+00:00'
                      dueDate: '2026-01-15'
                      paidAt: '2026-01-10T08:22:00+00:00'
                    - invoiceId: INV-2025-12
                      period: 2025-12
                      subtotal: 49
                      totalAmount: 49
                      paidAmount: 20
                      currency: USD
                      status: PARTIALLY_PAID
                      issuedAt: '2025-12-01T00:00:00+00:00'
                      dueDate: '2025-12-15'
                      paidAt: null
                  pagination:
                    page: 1
                    perPage: 20
                    totalItems: 2
                    totalPages: 1
                meta:
                  requestId: req_abc123def456
                  timestamp: '2026-01-15T14:35:00+00:00'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - BearerAuth: []
components:
  schemas:
    InvoicesResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        status:
          type: integer
          example: 200
        message:
          type: string
        data:
          type: object
          properties:
            invoices:
              type: array
              items:
                type: object
                properties:
                  invoiceId:
                    type: string
                  period:
                    type: string
                    example: 2026-01
                  subtotal:
                    type: number
                    format: float
                  totalAmount:
                    type: number
                    format: float
                  paidAmount:
                    type: number
                    format: float
                  currency:
                    type: string
                    example: USD
                  status:
                    type: string
                    enum:
                      - PENDING
                      - PAID
                      - PARTIALLY_PAID
                      - OVERDUE
                      - VOID
                  issuedAt:
                    type: string
                    format: date-time
                  dueDate:
                    type: string
                    format: date
                    nullable: true
                  paidAt:
                    type: string
                    format: date-time
                    nullable: true
            pagination:
              type: object
              properties:
                page:
                  type: integer
                perPage:
                  type: integer
                totalItems:
                  type: integer
                totalPages:
                  type: integer
        meta:
          $ref: '#/components/schemas/Meta'
    Meta:
      type: object
      properties:
        requestId:
          type: string
          description: Unique request ID for tracking
          example: req_abc123def456
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the response
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        status:
          type: integer
          example: 401
        message:
          type: string
          example: Invalid credentials
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    Error:
      type: object
      properties:
        code:
          type: string
          description: Error code for programmatic handling
          example: AUTH_INVALID_CREDENTIALS
        details:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
          description: Validation error details (for VALIDATION_ERROR)
    ValidationError:
      type: object
      properties:
        field:
          type: string
          description: Field that failed validation
          example: appId
        message:
          type: string
          description: Validation error message
          example: AppId is required
  responses:
    Unauthorized:
      description: Authentication required or token invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            status: 401
            message: Unable to identify business
            error:
              code: AUTH_TOKEN_INVALID
            meta:
              requestId: req_abc123
              timestamp: '2026-01-05T10:30:00+00:00'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from /auth/token

````