{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dropto-run/json-schema/dropto-run-subscription-row-schema.json",
  "title": "SubscriptionRow",
  "description": "One subscription, as the billing page renders it.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dropto-run-billing-api-openapi.yml#/components/schemas/SubscriptionRow",
  "properties": {
    "cancelAtPeriodEnd": {
      "description": "Whether it stops at the end of the current period.",
      "type": "boolean"
    },
    "currentPeriodEnd": {
      "description": "When the paid period ends; null while paused.",
      "format": "date-time",
      "type": [
        "null",
        "string"
      ]
    },
    "graceUntil": {
      "description": "When the grace window on a failed payment runs out, or null.",
      "format": "date-time",
      "type": [
        "null",
        "string"
      ]
    },
    "interval": {
      "description": "The billing interval.",
      "type": "string"
    },
    "pausedAt": {
      "description": "When it was paused, or null.",
      "format": "date-time",
      "type": [
        "null",
        "string"
      ]
    },
    "pendingInterval": {
      "description": "The interval it switches to at the next renewal, or null.",
      "type": [
        "null",
        "string"
      ]
    },
    "pendingPlanId": {
      "description": "The plan it switches to at the next renewal, or null.",
      "type": [
        "null",
        "string"
      ]
    },
    "planId": {
      "description": "The plan currently paid for.",
      "type": "string"
    },
    "seats": {
      "description": "How many seats are being paid for; one on every tier not sold by the seat.",
      "format": "int32",
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ]
    },
    "status": {
      "description": "One of the SubscriptionStatus names.",
      "type": "string"
    }
  },
  "required": [
    "planId",
    "pendingPlanId",
    "status",
    "interval",
    "pendingInterval",
    "currentPeriodEnd",
    "cancelAtPeriodEnd",
    "graceUntil",
    "pausedAt",
    "seats"
  ],
  "type": "object"
}