{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/highlevel/main/json-schema/highlevel-get-subscription-response-schema-schema.json",
  "title": "GetSubscriptionResponseSchema",
  "x-generated": "2026-09-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/highlevel-payments-openapi.json#/components/schemas/GetSubscriptionResponseSchema",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "description": "The unique identifier for the subscription."
    },
    "altType": {
      "type": "object",
      "description": "AltType is the type of identifier."
    },
    "altId": {
      "type": "string",
      "description": "AltId is the unique identifier eg: location id."
    },
    "contactId": {
      "type": "string",
      "description": "Contact id corresponding to the subscription."
    },
    "contactSnapshot": {
      "type": "object",
      "description": "Contact details of the subscriber."
    },
    "coupon": {
      "type": "object",
      "description": "Coupon details of the subscription."
    },
    "currency": {
      "type": "string",
      "description": "Currency in which subscription was made."
    },
    "amount": {
      "type": "number",
      "description": "Subscription value."
    },
    "status": {
      "type": "object",
      "description": "Subscription status."
    },
    "liveMode": {
      "type": "boolean",
      "description": "Subscription is in live / test mode."
    },
    "entityType": {
      "type": "string",
      "description": "Entity type of subscription (eg: order)."
    },
    "entityId": {
      "type": "string",
      "description": "Entity id for the subscription. e.g: order id"
    },
    "entitySource": {
      "description": "Entity source details for the subscription.",
      "allOf": [
        {
          "$ref": "#/$defs/OrderSource"
        }
      ]
    },
    "subscriptionId": {
      "type": "string",
      "description": "Subscription id for subscription."
    },
    "subscriptionSnapshot": {
      "type": "object",
      "description": "Snapshot of subscription."
    },
    "paymentProvider": {
      "type": "object",
      "description": "Payment provider details for the subscription."
    },
    "ipAddress": {
      "type": "string",
      "description": "Ip address from where subscription was initiated."
    },
    "createdAt": {
      "format": "date-time",
      "type": "string",
      "description": "The creation timestamp of the subscription."
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string",
      "description": "The last update timestamp of the subscription."
    },
    "meta": {
      "type": "object",
      "description": "Meta details of the subscription."
    },
    "markAsTest": {
      "type": "boolean",
      "description": "Is test subscription."
    },
    "schedule": {
      "description": "Scedule details for the subscription.",
      "allOf": [
        {
          "$ref": "#/$defs/ScheduleOptionsDto"
        }
      ]
    },
    "autoPayment": {
      "type": "object",
      "description": "Auto payment details of the subscription."
    },
    "recurringProduct": {
      "type": "object",
      "description": "Recurring product details of the subscription."
    },
    "canceledAt": {
      "format": "date-time",
      "type": "string",
      "description": "Cancellation timestamp of the subscription."
    },
    "canceledBy": {
      "type": "string",
      "description": "User id who cancelled the subscription."
    },
    "traceId": {
      "type": "string",
      "description": "Trace id of the subscription."
    },
    "createdBy": {
      "type": "string",
      "description": "User ID who created the subscription."
    }
  },
  "required": [
    "_id",
    "altType",
    "altId",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "CustomRRuleOptionsDto": {
      "type": "object",
      "properties": {
        "intervalType": {
          "type": "string",
          "enum": [
            "yearly",
            "monthly",
            "weekly",
            "daily",
            "hourly",
            "minutely",
            "secondly"
          ]
        },
        "interval": {
          "type": "number"
        },
        "startDate": {
          "type": "string",
          "description": "Start date in YYYY-MM-DD format"
        },
        "startTime": {
          "type": "string",
          "description": "Start time in HH:mm:ss format"
        },
        "endDate": {
          "type": "string",
          "description": "End date in YYYY-MM-DD format"
        },
        "endTime": {
          "type": "string",
          "description": "End time in HH:mm:ss format"
        },
        "dayOfMonth": {
          "type": "number",
          "description": "-1, 1, 2, 3, ..., 27, 28"
        },
        "dayOfWeek": {
          "type": "string",
          "enum": [
            "mo",
            "tu",
            "we",
            "th",
            "fr",
            "sa",
            "su"
          ]
        },
        "numOfWeek": {
          "type": "number",
          "description": "-1, 1, 2, 3, 4"
        },
        "monthOfYear": {
          "type": "string",
          "enum": [
            "jan",
            "feb",
            "mar",
            "apr",
            "may",
            "jun",
            "jul",
            "aug",
            "sep",
            "oct",
            "nov",
            "dec"
          ]
        },
        "count": {
          "type": "number",
          "description": "Max number of task executions"
        },
        "daysBefore": {
          "type": "number",
          "description": "Execute task number of days before"
        }
      },
      "required": [
        "intervalType",
        "interval",
        "startDate"
      ]
    },
    "OrderSource": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "funnel",
            "website",
            "invoice",
            "calendar",
            "text2Pay",
            "document_contracts",
            "membership",
            "mobile_app",
            "communities",
            "point_of_sale",
            "manual",
            "form",
            "survey",
            "payment_link",
            "external"
          ]
        },
        "subType": {
          "type": "string",
          "enum": [
            "one_step_order_form",
            "two_step_order_form",
            "upsell",
            "tap_to_pay",
            "card_payment",
            "store",
            "contact_view",
            "email_campaign",
            "payments_dashboard",
            "shopify",
            "subscription_view",
            "store_upsell",
            "woocommerce",
            "service",
            "meeting",
            "imported_csv",
            "qr_code",
            "saas_one_time",
            "saas_subscription"
          ]
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "meta": {
          "type": "object"
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "ScheduleOptionsDto": {
      "type": "object",
      "properties": {
        "executeAt": {
          "type": "string"
        },
        "rrule": {
          "$ref": "#/$defs/CustomRRuleOptionsDto"
        }
      }
    }
  }
}