{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendly-now/json-schema/sendly-now-subscription-change-schema.json",
  "title": "SubscriptionChange",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendly-now-billing-api-openapi.yml#/components/schemas/SubscriptionChange",
  "properties": {
    "expires_in": {
      "type": "integer"
    },
    "instruction": {
      "type": "string"
    },
    "refund": {
      "description": "Present for `refund`.",
      "properties": {
        "amount": {
          "type": "integer"
        },
        "currency": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "status": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "status",
        "amount",
        "currency"
      ],
      "type": "object"
    },
    "status": {
      "description": "Present instead of `subscription` when a store sold the subscription: `url` opens that store's page.",
      "enum": [
        "action_required"
      ],
      "type": "string"
    },
    "subscription": {
      "properties": {
        "cancelAtPeriodEnd": {
          "type": "boolean"
        },
        "currentPeriodEnd": {
          "description": "Unix seconds.",
          "type": [
            "number",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "status": {
          "description": "Stripe's subscription status, e.g. `active` or `past_due`.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "status",
        "cancelAtPeriodEnd"
      ],
      "type": "object"
    },
    "url": {
      "format": "uri",
      "type": "string"
    },
    "what": {
      "type": "string"
    }
  },
  "type": "object"
}