{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sitegpt-ai/json-schema/sitegpt-ai-billing-subscription-schema.json",
  "title": "BillingSubscription",
  "description": "A Paddle subscription as serialized for the agent API.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sitegpt-ai-openapi.json#/components/schemas/BillingSubscription",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "customerId": {
      "type": "string"
    },
    "currencyCode": {
      "type": "string"
    },
    "collectionMode": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "startedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "firstBilledAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "nextBilledAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "pausedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "canceledAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "currentBillingPeriod": {
      "anyOf": [
        {
          "$ref": "#/$defs/GenericObject",
          "description": "Current billing period start and end; null between periods."
        },
        {
          "type": "null"
        }
      ]
    },
    "billingCycle": {
      "$ref": "#/$defs/GenericObject",
      "description": "Billing interval and frequency."
    },
    "scheduledChange": {
      "anyOf": [
        {
          "$ref": "#/$defs/GenericObject",
          "description": "Scheduled pause, cancel, or resume; null when nothing is scheduled."
        },
        {
          "type": "null"
        }
      ]
    },
    "managementUrls": {
      "$ref": "#/$defs/GenericObject",
      "description": "Paddle-hosted management URLs for this subscription."
    }
  },
  "$defs": {
    "GenericObject": {
      "type": "object",
      "additionalProperties": true
    }
  }
}