{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asap-cool/json-schema/asap-cool-preview-response-schema.json",
  "title": "PreviewResponse",
  "description": "Response of `GET /v1/billing/subscription/preview`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asap-cool-billing-api-openapi.yml#/components/schemas/PreviewResponse",
  "type": "object",
  "required": [
    "amount_due_cents",
    "currency",
    "next_invoice_at",
    "proration_lines"
  ],
  "properties": {
    "amount_due_cents": {
      "type": "integer",
      "format": "int64",
      "description": "Total to charge immediately, in cents."
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 lowercase currency."
    },
    "next_invoice_at": {
      "type": "integer",
      "format": "int64",
      "description": "Next invoice timestamp (seconds)."
    },
    "proration_lines": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProrationLineView"
      },
      "description": "Per-line breakdown of the proration."
    }
  },
  "$defs": {
    "ProrationLineView": {
      "type": "object",
      "description": "One line of a proration preview.",
      "required": [
        "description",
        "amount_cents"
      ],
      "properties": {
        "amount_cents": {
          "type": "integer",
          "format": "int64",
          "description": "Signed amount in cents (positive = charge, negative = credit)."
        },
        "description": {
          "type": "string",
          "description": "Human-readable description from Stripe."
        }
      }
    }
  }
}