Ghost · Schema
Subscription
A paid subscription associated with a member, typically managed through Stripe.
PublishingNewslettersMembershipsContentOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| id | string | Subscription identifier |
| customer | object | Stripe customer details |
| status | string | Subscription status |
| start_date | string | Subscription start date |
| default_payment_card_last4 | string | Last 4 digits of the payment card |
| cancel_at_period_end | boolean | Whether the subscription cancels at period end |
| cancellation_reason | string | Reason for cancellation |
| current_period_end | string | End of current billing period |
| price | object | Price details |
| tier | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/Subscription",
"title": "Subscription",
"type": "object",
"description": "A paid subscription associated with a member, typically managed through Stripe.",
"properties": {
"id": {
"type": "string",
"description": "Subscription identifier"
},
"customer": {
"type": "object",
"description": "Stripe customer details",
"properties": {
"id": {
"type": "string",
"description": "Stripe customer ID"
},
"name": {
"type": "string",
"description": "Customer name",
"nullable": true
},
"email": {
"type": "string",
"format": "email",
"description": "Customer email"
}
}
},
"status": {
"type": "string",
"description": "Subscription status",
"enum": [
"active",
"trialing",
"canceled",
"unpaid",
"past_due"
]
},
"start_date": {
"type": "string",
"format": "date-time",
"description": "Subscription start date"
},
"default_payment_card_last4": {
"type": "string",
"description": "Last 4 digits of the payment card",
"nullable": true,
"pattern": "^\\d{4}$"
},
"cancel_at_period_end": {
"type": "boolean",
"description": "Whether the subscription cancels at period end"
},
"cancellation_reason": {
"type": "string",
"description": "Reason for cancellation",
"nullable": true
},
"current_period_end": {
"type": "string",
"format": "date-time",
"description": "End of current billing period"
},
"price": {
"type": "object",
"description": "Price details",
"properties": {
"id": {
"type": "string",
"description": "Stripe price ID"
},
"price_id": {
"type": "string",
"description": "Ghost price identifier"
},
"nickname": {
"type": "string",
"description": "Price nickname"
},
"amount": {
"type": "integer",
"description": "Amount in smallest currency unit",
"minimum": 0
},
"interval": {
"type": "string",
"description": "Billing interval",
"enum": [
"month",
"year"
]
},
"type": {
"type": "string",
"description": "Price type"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code",
"pattern": "^[A-Z]{3}$"
}
}
},
"tier": {
"$ref": "#/components/schemas/Tier"
}
}
}