{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coldrig-dev/json-schema/coldrig-dev-mailbox-billing-schema.json",
  "title": "MailboxBilling",
  "description": "Billing projection returned on every mailbox add/remove (no silent capacity addition). `provisionedAfter` is the live mailbox count AFTER the call — reality, not the ask (a capacity-limited partial or a quoteOnly preview both report the true resulting count).\n",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coldrig-dev-openapi.yml#/components/schemas/MailboxBilling",
  "type": "object",
  "required": [
    "provisionedAfter",
    "projectedMonthlyCents",
    "formula"
  ],
  "properties": {
    "provisionedAfter": {
      "type": "integer",
      "description": "Live set-up mailbox count after this operation."
    },
    "projectedMonthlyCents": {
      "type": "integer",
      "description": "Projected monthly: $49 a month covers the first 3 mailboxes, then $5 a month for each extra mailbox (3-mailbox minimum) — folding any checkout discount."
    },
    "formula": {
      "type": "string"
    },
    "domainEnding": {
      "type": "object",
      "description": "Only on a quoteOnly preview of an order over 10 mailboxes in the account's first billing month that buys new domains, when the platform's .co switch is on: they will end in .co unless the real call sends `dotComDomains: true`.\n",
      "required": [
        "ending",
        "newDomains",
        "feeCentsEach",
        "text"
      ],
      "properties": {
        "ending": {
          "type": "string",
          "enum": [
            "co"
          ]
        },
        "newDomains": {
          "type": "integer",
          "description": "New domains this order buys."
        },
        "feeCentsEach": {
          "type": "integer",
          "description": "The one-time fee per .com domain bought, in cents, added to the next bill."
        },
        "text": {
          "type": "string",
          "description": "The same, in one sentence to show the account owner."
        }
      }
    },
    "prepay": {
      "type": "object",
      "description": "Only on a quoteOnly preview of an order making more than 4 new domains in your first billing month, when the platform's prepaid-month switch is on: the real call must send `prepaySecondMonth: true` (else 400 `prepay_required`, nothing bought); month 2 is then charged right after the mailboxes are set up, at most `cents`.\n",
      "required": [
        "months",
        "cents",
        "text"
      ],
      "properties": {
        "months": {
          "type": "integer",
          "enum": [
            2
          ],
          "description": "The month paid up front is the second one."
        },
        "cents": {
          "type": "integer",
          "description": "Month 2 at this order's mailbox count."
        },
        "text": {
          "type": "string",
          "description": "The same, in one sentence to show the account owner."
        }
      }
    }
  }
}