{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatra-ai/json-schema/beatra-ai-billing-catalog-response-schema.json",
  "title": "BillingCatalogResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatra-ai-account-api-openapi.yml#/components/schemas/BillingCatalogResponse",
  "properties": {
    "country_code": {
      "type": "string",
      "title": "Country Code"
    },
    "country_policy_key": {
      "type": "string",
      "title": "Country Policy Key"
    },
    "country_policy_version": {
      "type": "integer",
      "title": "Country Policy Version"
    },
    "currency": {
      "type": "string",
      "title": "Currency"
    },
    "checkout_mode": {
      "type": "string",
      "enum": [
        "mock_provider",
        "provider_checkout",
        "provider_unavailable"
      ],
      "title": "Checkout Mode"
    },
    "checkout_channels": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Checkout Channels",
      "default": []
    },
    "miniapp_pay": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "jsapi",
            "virtual"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Miniapp Pay"
    },
    "payment_methods": {
      "items": {
        "$ref": "#/$defs/BillingCatalogPaymentMethod"
      },
      "type": "array",
      "title": "Payment Methods"
    },
    "plans": {
      "items": {
        "$ref": "#/$defs/BillingCatalogPlan"
      },
      "type": "array",
      "title": "Plans"
    },
    "extra_credit_packs": {
      "items": {
        "$ref": "#/$defs/BillingCatalogOffer"
      },
      "type": "array",
      "title": "Extra Credit Packs"
    }
  },
  "type": "object",
  "required": [
    "country_code",
    "country_policy_key",
    "country_policy_version",
    "currency",
    "checkout_mode",
    "payment_methods",
    "plans",
    "extra_credit_packs"
  ],
  "$defs": {
    "BillingCatalogOffer": {
      "properties": {
        "offer_id": {
          "type": "string",
          "title": "Offer Id"
        },
        "product_id": {
          "type": "string",
          "title": "Product Id"
        },
        "term_id": {
          "type": "string",
          "title": "Term Id"
        },
        "purchase_mode": {
          "type": "string",
          "enum": [
            "one_time",
            "subscription"
          ],
          "title": "Purchase Mode"
        },
        "billing_interval": {
          "type": "string",
          "enum": [
            "monthly",
            "quarterly",
            "yearly",
            "none"
          ],
          "title": "Billing Interval"
        },
        "currency": {
          "type": "string",
          "title": "Currency"
        },
        "fiat_amount": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Fiat Amount"
        },
        "list_fiat_amount": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "List Fiat Amount"
        },
        "credits_granted": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Credits Granted"
        },
        "validity_days": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Validity Days"
        },
        "payment_method_id": {
          "type": "string",
          "title": "Payment Method Id"
        },
        "provider": {
          "type": "string",
          "title": "Provider"
        },
        "is_recommended": {
          "type": "boolean",
          "title": "Is Recommended",
          "default": false
        },
        "sort_order": {
          "type": "integer",
          "title": "Sort Order"
        }
      },
      "type": "object",
      "required": [
        "offer_id",
        "product_id",
        "term_id",
        "purchase_mode",
        "billing_interval",
        "currency",
        "fiat_amount",
        "list_fiat_amount",
        "credits_granted",
        "payment_method_id",
        "provider",
        "sort_order"
      ],
      "title": "BillingCatalogOffer"
    },
    "BillingCatalogPaymentMethod": {
      "properties": {
        "payment_method_id": {
          "type": "string",
          "title": "Payment Method Id"
        },
        "provider": {
          "type": "string",
          "title": "Provider"
        }
      },
      "type": "object",
      "required": [
        "payment_method_id",
        "provider"
      ],
      "title": "BillingCatalogPaymentMethod"
    },
    "BillingCatalogPlan": {
      "properties": {
        "product_id": {
          "type": "string",
          "title": "Product Id"
        },
        "product_code": {
          "type": "string",
          "title": "Product Code"
        },
        "plan_level": {
          "type": "string",
          "title": "Plan Level"
        },
        "title_key": {
          "type": "string",
          "title": "Title Key"
        },
        "description_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description Key"
        },
        "sort_order": {
          "type": "integer",
          "title": "Sort Order"
        },
        "concurrent_task_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Concurrent Task Limit"
        },
        "offers": {
          "items": {
            "$ref": "#/$defs/BillingCatalogOffer"
          },
          "type": "array",
          "title": "Offers"
        }
      },
      "type": "object",
      "required": [
        "product_id",
        "product_code",
        "plan_level",
        "title_key",
        "sort_order",
        "offers"
      ],
      "title": "BillingCatalogPlan"
    }
  }
}