{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/polaralabs-com/json-schema/polaralabs-com-payment-status-schema.json",
  "title": "PaymentStatus",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/polaralabs-com-openapi.yml#/components/schemas/PaymentStatus",
  "type": "object",
  "properties": {
    "paid": {
      "type": "boolean"
    },
    "payment_status": {
      "type": "string",
      "enum": [
        "unpaid",
        "paid",
        "waived"
      ]
    },
    "paid_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "assessment_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The assessment this status describes. Null only when the account has no assessment yet."
    },
    "assessment_type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "type1",
        "type2"
      ]
    },
    "framework": {
      "type": "string",
      "description": "The assessment's framework id, for example soc2 or iso27001."
    },
    "payment_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Back compat alias for payment_url_type2_monthly."
    },
    "payment_url_onboarding": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link for Star, $2,000 one time, with client_reference_id pre set. Platform onboarding only: no SOC 2 Type 1 report is included at this price. A caller presents this OR payment_url_type1 and never both as steps. Do not present either link before the readiness results exist: the intake assessment and the gap analysis it produces are free, and the entry payment buys AI help, policy generation and the report rather than the score."
    },
    "payment_url_type1": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link for Star with a SOC 2 Type 1 report, $4,000 one time in total, with client_reference_id pre set. Same platform as payment_url_onboarding, bought together with the SOC 2 Type 1 examination and report by an independent licensed U.S. CPA firm, with no separate auditor invoice."
    },
    "payment_url_type1_upgrade": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link that adds the SOC 2 Type 1 examination and report to a paid SOC 2 account that bought the platform without it, with client_reference_id appended by the server. Null for every other account."
    },
    "payment_url_type2": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link for the SOC 2 Type 2 term sold before the current plans. Returned only to an account whose entry payment predates the current plans, at the price that account accepted at its own checkout. Term mechanics, stated in full at /terms and accepted on record at checkout: the term runs all 12 months, the whole term is owed, and an in-term cancellation keeps billing and access running to the end of the committed 12 months."
    },
    "payment_url_type2_monthly": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Explicit alias for payment_url_type2, the monthly schedule of the term sold before the current plans. Returned only to an account whose entry payment predates the current plans, at the price that account accepted at its own checkout."
    },
    "payment_url_type2_annual": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link for the term sold before the current plans, paid up front. Returned only to an account whose entry payment predates the current plans, at the price that account accepted at its own checkout."
    },
    "preferred_entry_plan": {
      "type": [
        "string",
        "null"
      ],
      "description": "The entry the company chose earlier (onboarding or type1), if any, so a caller can preselect it."
    },
    "default_entry_plan": {
      "type": [
        "string",
        "null"
      ],
      "description": "The same value as preferred_entry_plan, kept for older callers."
    },
    "company_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "entry_plan": {
      "type": [
        "string",
        "null"
      ],
      "description": "The entry bought, as recorded at checkout, for example onboarding or type1. Null when none is recorded."
    },
    "included_audit_consumed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the SOC 2 Type 2 audit included in the term was started. Null while it is unspent."
    },
    "payment_url_iso": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "A framework's own checkout link, with client_reference_id appended by the server. Null on a SOC 2 assessment, on a paid one, and for ISO 27001 under the current plans, where it is bought inside Constellation (payment_url_constellation)."
    },
    "assessments": {
      "type": "array",
      "description": "Every active assessment on the account, SOC 2 first, for switching between frameworks.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "framework": {
            "type": "string"
          },
          "payment_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "payment_url_orbit": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link for Orbit, $7,800 a year, with client_reference_id appended by the server. One SOC 2 Type 2 audit by an independent licensed U.S. CPA firm is included in every contract year. Null when checkout for this plan is not open or the caller is not eligible."
    },
    "payment_url_constellation": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link for Constellation, $10,800 a year, with client_reference_id appended by the server. Everything in Orbit plus ISO/IEC 27001 and ISO/IEC 42001 readiness. Null when checkout for this plan is not open or the caller is not eligible."
    },
    "payment_url_orbit_after_star": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link for the first year of Orbit at $5,800, offered within 12 months of paying for Star, with client_reference_id appended by the server. It renews at $7,800 a year. Null when checkout for this plan is not open or the caller is not eligible."
    },
    "payment_url_orbit_monthly": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Stripe Payment Link for Orbit at $700 a month on a 12-month term, offered only to Star customers, with client_reference_id appended by the server. Null when checkout for this plan is not open or the caller is not eligible."
    },
    "orbit_offer_expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the first-year Orbit offer for a Star customer closes: 12 months after the Star payment. Null when the caller has no open offer."
    },
    "plan": {
      "type": [
        "object",
        "null"
      ],
      "description": "The account's plan record under the current plans. Null when the account has none. plan is star, orbit, constellation, mission or legacy; contract_year is the current contract year of the term, or null before the term starts.",
      "properties": {
        "plan": {
          "type": "string",
          "enum": [
            "star",
            "orbit",
            "constellation",
            "mission",
            "legacy"
          ]
        },
        "status": {
          "type": "string"
        },
        "frameworks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "contract_year": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "start": {
              "type": "string",
              "format": "date-time"
            },
            "end": {
              "type": "string",
              "format": "date-time"
            }
          }
        },
        "type2_offer": {
          "type": "string",
          "enum": [
            "grid",
            "legacy"
          ],
          "description": "The SOC 2 Type 2 offer this account sees: grid (Orbit), or legacy for an account already on a Type 2 subscription or held on the terms of its own checkout."
        }
      }
    },
    "grid_year": {
      "type": [
        "object",
        "null"
      ],
      "description": "This contract year's included SOC 2 Type 2 audit on an active Orbit or Constellation plan: year_start, window_end (the end of that year's observation window) and consumed_at (when that year's included audit started, or null while it is unspent). Null for every other account.",
      "properties": {
        "year_start": {
          "type": "string",
          "format": "date-time"
        },
        "window_end": {
          "type": "string",
          "format": "date-time"
        },
        "consumed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    }
  }
}