{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmattered/json-schema/getmattered-cancel-subscription-request-schema.json",
  "title": "CancelSubscriptionRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getmattered-billing-api-openapi.yml#/components/schemas/CancelSubscriptionRequest",
  "type": "object",
  "properties": {
    "cancelImmediately": {
      "type": "boolean",
      "default": false,
      "description": "Whether to cancel immediately or at the end of the billing period"
    },
    "declinedRetentionOffer": {
      "type": "boolean",
      "default": false,
      "description": "The cancel screen showed the one-time 10% offer and the user chose to cancel. Recorded once, never shown again"
    },
    "reason": {
      "type": "string",
      "maxLength": 500,
      "description": "User-provided reason for cancelling the subscription"
    },
    "reasonCode": {
      "type": "string",
      "enum": [
        "got_hired",
        "too_expensive",
        "not_using",
        "missing_features",
        "found_alternative",
        "temporary_pause",
        "other"
      ],
      "description": "The reason chip the user tapped, if any"
    }
  },
  "additionalProperties": false
}