{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/exodus-com/json-schema/exodus-com-subscription-checkout-schema.json",
  "title": "SubscriptionCheckout",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/exodus-com-openapi.json#/components/schemas/SubscriptionCheckout",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "subscription_checkout"
      ]
    },
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "completed",
        "expired",
        "cancelled"
      ]
    },
    "onchain_id": {
      "type": "string"
    },
    "subscription_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The on-chain id of the subscription created from this checkout, usable with GET /subscriptions/{id}, or null until one exists. Always equal to onchain_id once a subscription is bound: onchain_id is reserved when the checkout is created, so subscription_id is the field that tells you a subscription exists. Present even when the checkout is cancelled or expired, because a subscriber whose subscribe landed after a cancel keeps a live subscription."
    },
    "business_id": {
      "type": "string",
      "description": "Your Exodus business id. Stable for the life of the business and also returned by GET /settings."
    },
    "business_name": {
      "type": "string",
      "description": "The merchant name shown to subscribers on the hosted subscribe page: your display_name from GET /settings when set, otherwise your registered business name."
    },
    "background_color": {
      "type": [
        "string",
        "null"
      ]
    },
    "primary_color": {
      "type": [
        "string",
        "null"
      ]
    },
    "subscriber": {
      "type": [
        "string",
        "null"
      ]
    },
    "external_customer_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "subscription_options": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "chain": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "subscription_manager_address": {
            "type": "string"
          },
          "relayer_address": {
            "type": "string"
          }
        },
        "required": [
          "chain",
          "token",
          "subscription_manager_address",
          "relayer_address"
        ]
      },
      "description": "Every chain/token combination the subscriber may pick at subscribe time. For a fiat-settled business, only the pairs the settlement provider settles. Always an array -- do not assume a single entry."
    },
    "price": {
      "type": "string",
      "description": "The recurring per-cycle amount, in price_currency's minor units. price, cap, and budget share one unit system; fiat figures convert to exact-out token amounts at subscribe/charge time via a quote, never pre-converted here. At most 9007199254740991."
    },
    "price_currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO-4217 pricing currency. Always set on checkouts created after fiat-only creation shipped; null only on legacy rows."
    },
    "period_duration": {
      "type": "number"
    },
    "cap": {
      "type": [
        "string",
        "null"
      ],
      "description": "Per-charge ceiling, same unit system as price."
    },
    "budget": {
      "type": "string",
      "description": "Per-window spend ceiling, same unit system as price."
    },
    "initial_charge": {
      "type": "boolean"
    },
    "checkout_url": {
      "type": "string"
    },
    "success_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancel_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "return_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "nullable": true
      }
    },
    "expires_at": {
      "type": "string"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "expired_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancellation_reason": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "object",
    "id",
    "status",
    "onchain_id",
    "subscription_id",
    "business_id",
    "business_name",
    "background_color",
    "primary_color",
    "subscriber",
    "external_customer_id",
    "subscription_options",
    "price",
    "price_currency",
    "period_duration",
    "cap",
    "budget",
    "initial_charge",
    "checkout_url",
    "success_url",
    "cancel_url",
    "return_url",
    "metadata",
    "expires_at",
    "created_at",
    "updated_at",
    "completed_at",
    "cancelled_at",
    "expired_at",
    "cancellation_reason"
  ]
}