{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autoposting-ai/json-schema/autoposting-ai-billing-status-schema.json",
  "title": "BillingStatus",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autoposting-ai-billing-api-openapi.yml#/components/schemas/BillingStatus",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "active",
        "trialing",
        "suspended"
      ]
    },
    "planId": {
      "type": [
        "string",
        "null"
      ]
    },
    "planName": {
      "type": "string"
    },
    "isTrialing": {
      "type": "boolean"
    },
    "trialEnd": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "currentPeriodEnd": {
      "type": "string",
      "format": "date-time"
    },
    "cancelAtPeriodEnd": {
      "type": "boolean"
    },
    "pendingPlanChange": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    }
  },
  "required": [
    "status",
    "planId",
    "isTrialing"
  ]
}