{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scribiz/json-schema/scribiz-billing-offer-schema.json",
  "title": "BillingOffer",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scribiz-openapi.json#/components/schemas/BillingOffer",
  "properties": {
    "configured": {
      "description": "False while payments are not set up at all.",
      "type": "boolean"
    },
    "plans": {
      "description": "Only what the caller can buy now. Empty when nothing is on sale.",
      "properties": {
        "mac-lifetime": {
          "properties": {
            "amount": {
              "description": "What the next buyer pays, in cents.",
              "type": "integer"
            },
            "buyers": {
              "description": "Paid purchases, net of refunds and disputes.",
              "type": "integer"
            },
            "currency": {
              "const": "usd"
            },
            "earlyBird": {
              "properties": {
                "left": {
                  "type": "integer"
                },
                "places": {
                  "type": "integer"
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "listAmount": {
              "type": "integer"
            },
            "preview": {
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "pro": {
          "properties": {
            "intervals": {
              "items": {
                "properties": {
                  "amount": {
                    "type": "integer"
                  },
                  "currency": {
                    "const": "usd"
                  },
                  "interval": {
                    "enum": [
                      "month",
                      "year"
                    ]
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "preview": {
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "topup": {
          "properties": {
            "captionPacks": {
              "items": {
                "properties": {
                  "amount": {
                    "type": "integer"
                  },
                  "captions": {
                    "type": "integer"
                  },
                  "currency": {
                    "const": "usd"
                  },
                  "id": {
                    "enum": [
                      "captions-200",
                      "captions-1200",
                      "captions-5000"
                    ]
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "packs": {
              "items": {
                "properties": {
                  "amount": {
                    "type": "integer"
                  },
                  "currency": {
                    "const": "usd"
                  },
                  "id": {
                    "enum": [
                      "small",
                      "medium",
                      "large"
                    ]
                  },
                  "minutes": {
                    "type": "integer"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "preview": {
              "type": "boolean"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "signInRequired": {
      "type": "boolean"
    },
    "taxAtCheckout": {
      "type": "boolean"
    }
  },
  "required": [
    "configured",
    "signInRequired",
    "taxAtCheckout",
    "plans"
  ],
  "type": "object"
}