{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peoplescourt-ai/json-schema/peoplescourt-ai-canonical-fee-checkout-schema.json",
  "title": "CanonicalFeeCheckout",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peoplescourt-ai-fees-api-openapi.yml#/components/schemas/CanonicalFeeCheckout",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "feeId",
    "caseId",
    "provider",
    "checkout"
  ],
  "properties": {
    "schemaVersion": {
      "type": "string",
      "const": "fee-checkout-v1"
    },
    "feeId": {
      "type": "string"
    },
    "caseId": {
      "type": "string"
    },
    "provider": {
      "type": "string",
      "enum": [
        "stripe",
        "x402",
        "court_filing_credit"
      ]
    },
    "checkout": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "kind"
      ],
      "description": "Provider descriptor: a validated price preview, an expired-filing recovery check, a Stripe Checkout session, an applied court filing credit, or the committed x402 payment requirements.",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "filing_restart_allowed",
            "price_preview",
            "stripe_checkout",
            "credit_applied",
            "x402_payment_required"
          ]
        }
      }
    }
  }
}