{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/specproof-ai/json-schema/specproof-ai-billing-summary-schema.json",
  "title": "BillingSummary",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/specproof-ai-openapi.json#/components/schemas/BillingSummary",
  "properties": {
    "plan": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Plan"
    },
    "status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status"
    },
    "organization_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Organization Name"
    },
    "payment_provider": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Payment Provider"
    },
    "invoices": {
      "items": {
        "$ref": "#/$defs/InvoiceOut"
      },
      "type": "array",
      "title": "Invoices",
      "default": []
    }
  },
  "type": "object",
  "$defs": {
    "InvoiceOut": {
      "properties": {
        "invoice_id": {
          "type": "string",
          "title": "Invoice Id"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status"
        },
        "amount_due": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Amount Due"
        },
        "amount_paid": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Amount Paid"
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Currency"
        },
        "hosted_invoice_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hosted Invoice Url"
        },
        "pdf_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pdf Url"
        },
        "period_start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period Start"
        },
        "period_end": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period End"
        }
      },
      "type": "object",
      "required": [
        "invoice_id"
      ],
      "title": "InvoiceOut"
    }
  }
}