{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nudgelink-co/json-schema/nudgelink-co-billing-summary-schema.json",
  "title": "BillingSummary",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nudgelink-co-openapi.json#/components/schemas/BillingSummary",
  "properties": {
    "subscription_plan": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Subscription Plan"
    },
    "guarantee_status": {
      "type": "string",
      "title": "Guarantee Status"
    },
    "pilot_start_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pilot Start At"
    },
    "billing_cycle_start": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Billing Cycle Start"
    },
    "next_cycle_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cycle At"
    },
    "paused_days_client": {
      "type": "integer",
      "title": "Paused Days Client"
    },
    "paused_days_system": {
      "type": "integer",
      "title": "Paused Days System"
    },
    "credits_balance": {
      "type": "integer",
      "title": "Credits Balance",
      "default": 0
    },
    "credits_included": {
      "type": "integer",
      "title": "Credits Included",
      "default": 0
    },
    "credits_used_this_cycle": {
      "type": "integer",
      "title": "Credits Used This Cycle",
      "default": 0
    },
    "has_stripe_subscription": {
      "type": "boolean",
      "title": "Has Stripe Subscription",
      "default": false
    },
    "plan_comped": {
      "type": "boolean",
      "title": "Plan Comped",
      "default": false
    },
    "can_topup": {
      "type": "boolean",
      "title": "Can Topup",
      "default": false
    },
    "credits_topup_balance": {
      "type": "integer",
      "title": "Credits Topup Balance",
      "default": 0
    },
    "pilot_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pilot Expires At"
    },
    "plan_active": {
      "type": "boolean",
      "title": "Plan Active",
      "default": false
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Billing Interval"
    },
    "renews_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Renews At"
    }
  },
  "type": "object",
  "required": [
    "subscription_plan",
    "guarantee_status",
    "pilot_start_at",
    "billing_cycle_start",
    "next_cycle_at",
    "paused_days_client",
    "paused_days_system"
  ]
}