{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/signvoy-com/json-schema/signvoy-com-billing-summary-dto-schema.json",
  "title": "BillingSummaryDto",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/signvoy-com-openapi.json#/components/schemas/BillingSummaryDto",
  "type": "object",
  "properties": {
    "plan": {
      "type": "string",
      "description": "Plan on the subscription, i.e. what the account pays for",
      "enum": [
        "free",
        "pro",
        "team",
        "enterprise"
      ]
    },
    "effectivePlan": {
      "type": "string",
      "description": "Plan actually in force. Differs from `plan` only when the subscription has lapsed, in which case entitlements fall back to Free.",
      "enum": [
        "free",
        "pro",
        "team",
        "enterprise"
      ]
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "description": "Stripe subscription status; null on an account that never paid"
    },
    "interval": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "month",
        "year"
      ],
      "description": "Billing interval; null on Free"
    },
    "cancelAtPeriodEnd": {
      "type": "boolean",
      "description": "Whether the subscription stops at the end of the period"
    },
    "currentPeriodEnd": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "End of the current billing period; null on Free"
    },
    "hasBillingHistory": {
      "type": "boolean",
      "description": "Whether this account has ever reached checkout, and therefore whether the Customer Portal has invoices and a payment method to show"
    },
    "seats": {
      "$ref": "#/$defs/BillingSeatsDto"
    },
    "documents": {
      "$ref": "#/$defs/BillingDocumentsDto"
    },
    "workspaces": {
      "$ref": "#/$defs/BillingWorkspacesDto"
    },
    "features": {
      "$ref": "#/$defs/BillingFeaturesDto"
    },
    "extraSeatMonthlyUsd": {
      "type": "number",
      "description": "Price per extra seat per month, in USD"
    },
    "extraSeatAnnualUsd": {
      "type": "number",
      "description": "Price per extra seat per month when billed annually, in USD"
    },
    "availablePlans": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BillingPlanOptionDto"
      }
    }
  },
  "required": [
    "plan",
    "effectivePlan",
    "cancelAtPeriodEnd",
    "hasBillingHistory",
    "seats",
    "documents",
    "workspaces",
    "features",
    "extraSeatMonthlyUsd",
    "extraSeatAnnualUsd",
    "availablePlans"
  ],
  "$defs": {
    "BillingDocumentsDto": {
      "type": "object",
      "properties": {
        "sent": {
          "type": "number",
          "description": "Documents sent in the current billing period"
        },
        "limit": {
          "type": [
            "number",
            "null"
          ],
          "description": "Documents included per period; null means unlimited"
        }
      },
      "required": [
        "sent"
      ]
    },
    "BillingFeaturesDto": {
      "type": "object",
      "properties": {
        "customBranding": {
          "type": "boolean",
          "description": "Custom logo and colours; Signvoy branding removed"
        },
        "customEmailSender": {
          "type": "boolean",
          "description": "Custom from / reply-to address on signing emails"
        },
        "sharedTemplates": {
          "type": "boolean",
          "description": "Templates shared with the whole workspace"
        },
        "workspaceWideVisibility": {
          "type": "boolean",
          "description": "Members can see every document in the workspace"
        }
      },
      "required": [
        "customBranding",
        "customEmailSender",
        "sharedTemplates",
        "workspaceWideVisibility"
      ]
    },
    "BillingPlanOptionDto": {
      "type": "object",
      "properties": {
        "plan": {
          "type": "string",
          "enum": [
            "pro",
            "team"
          ]
        },
        "monthlyUsd": {
          "type": "number",
          "description": "Monthly price in USD"
        },
        "annualMonthlyUsd": {
          "type": "number",
          "description": "Effective monthly price when billed annually, in USD"
        },
        "includedSeats": {
          "type": "number",
          "description": "Seats bundled with this plan"
        }
      },
      "required": [
        "plan",
        "monthlyUsd",
        "annualMonthlyUsd",
        "includedSeats"
      ]
    },
    "BillingSeatsDto": {
      "type": "object",
      "properties": {
        "included": {
          "type": "number",
          "description": "Seats bundled with the current plan"
        },
        "purchased": {
          "type": "number",
          "description": "Extra seats bought on top"
        },
        "allowed": {
          "type": "number",
          "description": "Seats the account may fill (included + purchased)"
        },
        "used": {
          "type": "number",
          "description": "Seats in use: distinct members across every workspace on the account, plus pending invitations to addresses that are not already members"
        }
      },
      "required": [
        "included",
        "purchased",
        "allowed",
        "used"
      ]
    },
    "BillingWorkspacesDto": {
      "type": "object",
      "properties": {
        "count": {
          "type": "number",
          "description": "Workspaces on this account"
        },
        "limit": {
          "type": [
            "number",
            "null"
          ],
          "description": "Workspaces allowed; null means unlimited"
        }
      },
      "required": [
        "count"
      ]
    }
  }
}