{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trajectory/json-schema/trajectory-balance-response-schema.json",
  "title": "BalanceResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trajectory-billing-api-openapi.yml#/components/schemas/BalanceResponse",
  "properties": {
    "billing_policy": {
      "$ref": "#/$defs/BillingPolicy",
      "default": "standard"
    },
    "balance_cents": {
      "type": "number",
      "title": "Balance Cents"
    },
    "refreshed_at": {
      "type": "string",
      "format": "date-time",
      "title": "Refreshed At"
    },
    "has_card": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Has Card"
    },
    "can_manage": {
      "type": "boolean",
      "title": "Can Manage"
    },
    "spend_alerts": {
      "anyOf": [
        {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Spend Alerts"
    },
    "auto_reload_active": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Auto Reload Active"
    },
    "payment_hold": {
      "type": "boolean",
      "title": "Payment Hold"
    },
    "usage_refreshed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Usage Refreshed At",
      "description": "When the usage and spend shown were last refreshed."
    }
  },
  "type": "object",
  "required": [
    "balance_cents",
    "refreshed_at",
    "has_card",
    "can_manage",
    "spend_alerts",
    "auto_reload_active",
    "payment_hold"
  ],
  "$defs": {
    "BillingPolicy": {
      "type": "string",
      "enum": [
        "standard",
        "free"
      ],
      "title": "BillingPolicy"
    }
  }
}