{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beel-es/json-schema/beel-es-activate-company-request-schema.json",
  "title": "ActivateCompanyRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beel-es-companyactivations-api-openapi.yml#/components/schemas/ActivateCompanyRequest",
  "type": "object",
  "required": [
    "environment"
  ],
  "properties": {
    "environment": {
      "$ref": "#/$defs/Environment"
    },
    "success_url": {
      "type": "string",
      "description": "Where Stripe returns after the card is captured. Only used when switching on in Live with no card on file. May embed Stripe's `{CHECKOUT_SESSION_ID}` template, which is why it is a plain string and not a `uri`: the braces are not legal URI characters."
    },
    "cancel_url": {
      "type": "string",
      "format": "uri",
      "description": "Where Stripe returns if the checkout is abandoned."
    },
    "billing_period": {
      "allOf": [
        {
          "$ref": "#/$defs/BillingPeriod"
        }
      ],
      "description": "Billing period of the plan bought when switching on in Live opens a checkout. `ANNUAL` charges the yearly per-NIF price up front, with no overage item in the checkout; `MONTHLY` is the monthly per-NIF price plus overage. Only read when a checkout is opened. Defaults to `MONTHLY` when omitted."
    }
  },
  "$defs": {
    "BillingPeriod": {
      "type": "string",
      "description": "Nominal billing period of a subscription.",
      "enum": [
        "MONTHLY",
        "ANNUAL"
      ]
    },
    "Environment": {
      "type": "string",
      "description": "Mode a record lives in — its Test/Live twin. It decides where invoices, customers and\nquota are accounted.\n\nFor a company it also decides which AEAT its NIF is registered against: switching a\ncompany on in `PROD` is what registers it with the real AEAT, so `aeat_environment`\nis that same mode and uses this same enum.\n",
      "enum": [
        "TEST",
        "PROD"
      ]
    }
  }
}