{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asoskill-com/json-schema/asoskill-com-billing-packs-response-schema.json",
  "title": "BillingPacksResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asoskill-com-billing-api-openapi.yml#/components/schemas/BillingPacksResponse",
  "type": "object",
  "required": [
    "billingEnabled",
    "unit",
    "creditsPerDataCall",
    "pricesIncludeTax",
    "packs",
    "checkout"
  ],
  "properties": {
    "billingEnabled": {
      "type": "boolean"
    },
    "unit": {
      "type": "string",
      "const": "credit"
    },
    "creditsPerDataCall": {
      "type": "integer",
      "const": 1
    },
    "pricesIncludeTax": {
      "type": "boolean",
      "const": false
    },
    "packs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BillingPack"
      }
    },
    "checkout": {
      "oneOf": [
        {
          "$ref": "#/$defs/CheckoutDiscovery"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "BillingPack": {
      "type": "object",
      "required": [
        "packId",
        "credits",
        "amountCents",
        "currency",
        "taxBehavior"
      ],
      "properties": {
        "packId": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_]{2,63}$"
        },
        "credits": {
          "type": "integer",
          "minimum": 1
        },
        "amountCents": {
          "type": "integer",
          "minimum": 1
        },
        "currency": {
          "type": "string",
          "pattern": "^[a-z]{3}$"
        },
        "taxBehavior": {
          "type": "string",
          "const": "exclusive"
        }
      }
    },
    "CheckoutDiscovery": {
      "type": "object",
      "required": [
        "method",
        "path",
        "body"
      ],
      "properties": {
        "method": {
          "type": "string",
          "const": "POST"
        },
        "path": {
          "type": "string",
          "const": "/v1/billing/checkout"
        },
        "body": {
          "type": "object",
          "required": [
            "packId"
          ],
          "properties": {
            "packId": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}