{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pmwallets-com/json-schema/pmwallets-com-subscription-schema.json",
  "title": "Subscription",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pmwallets-com-openapi.json#/components/schemas/Subscription",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "chain": {
      "type": "integer"
    },
    "entityId": {
      "type": "string",
      "description": "The 0x address once paid for and still held; a handle otherwise (never-charged or plan-locked rows)."
    },
    "label": {
      "type": "string"
    },
    "channels": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "ws",
          "webhook"
        ]
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused",
        "canceled"
      ]
    },
    "pausedReason": {
      "type": [
        "string",
        "null"
      ],
      "description": "e.g. insufficient_balance, webhook_disabled, no_webhook, plan_ended, plan_limit, address_locked."
    },
    "fromBlock": {
      "type": "integer",
      "description": "Fills strictly after this block are delivered."
    },
    "syncedBlock": {
      "type": "integer"
    },
    "tier": {
      "type": "string"
    },
    "priceCents": {
      "type": "integer",
      "description": "Hourly price frozen on the subscription."
    },
    "billedThrough": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Prepaid up to here."
    },
    "planCovered": {
      "type": "boolean",
      "description": "The last billed hour was covered by a plan push slot (free)."
    },
    "activations": {
      "type": "integer"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "canceledAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "followedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "categories": {
      "type": "array",
      "description": "List endpoint only.",
      "items": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "share": {
            "type": "number"
          }
        }
      }
    },
    "lastFillTs": {
      "type": [
        "string",
        "null"
      ],
      "description": "List endpoint only."
    },
    "fills24h": {
      "type": [
        "integer",
        "null"
      ],
      "description": "List endpoint only."
    }
  }
}