Swell · Schema

Swell Subscription

CommerceHeadless CommerceAPI-FirstB2CB2BSubscriptionsMarketplacesWholesaleStorefrontCheckoutPaymentsCartsOrdersCatalogInternationalization

Properties

Name Type Description
id string
number string
account_id string
product_id string
plan_id string
status string
interval string
interval_count integer
trial_days integer
limit integer Maximum billing cycles before stopping.
price number
recurring_total number
date_period_start string
date_period_end string
date_canceled string
date_created string
View JSON Schema on GitHub

JSON Schema

swell-subscription-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/swell-io/main/json-schema/swell-subscription-schema.json",
  "title": "Swell Subscription",
  "type": "object",
  "properties": {
    "id": { "type": "string", "pattern": "^[a-f0-9]{24}$" },
    "number": { "type": "string" },
    "account_id": { "type": "string" },
    "product_id": { "type": "string" },
    "plan_id": { "type": "string" },
    "status": {
      "type": "string",
      "enum": ["active", "paid", "unpaid", "canceled", "trial", "pastdue", "complete", "paused"]
    },
    "interval": { "type": "string", "enum": ["daily", "weekly", "monthly", "yearly"] },
    "interval_count": { "type": "integer", "minimum": 1 },
    "trial_days": { "type": "integer", "minimum": 0 },
    "limit": { "type": "integer", "minimum": 0, "description": "Maximum billing cycles before stopping." },
    "price": { "type": "number" },
    "recurring_total": { "type": "number" },
    "date_period_start": { "type": "string", "format": "date-time" },
    "date_period_end": { "type": "string", "format": "date-time" },
    "date_canceled": { "type": "string", "format": "date-time" },
    "date_created": { "type": "string", "format": "date-time" }
  }
}