Type Definition
Fields
Core Fields
| Field | Type | Description |
|---|---|---|
id | UUID! | Unique identifier for the subscription |
subscriptionId | String! | Your application’s unique identifier for this subscription |
status | SubscriptionStatus! | Current status of the subscription |
pricingType | PricingType! | Type of pricing (FREE, PAID, CUSTOM) |
Dates
| Field | Type | Description |
|---|---|---|
startDate | DateTime! | When the subscription started |
endDate | DateTime | Scheduled end date (for fixed-term subscriptions) |
effectiveEndDate | DateTime | Actual end date after cancellation |
trialEndDate | DateTime | When the trial period ends |
cancellationDate | DateTime | When the subscription was cancelled |
createdAt | DateTime | When the subscription record was created |
Billing Period
| Field | Type | Description |
|---|---|---|
billingCycleAnchor | DateTime | Anchor date for billing cycles |
currentBillingPeriodStart | DateTime | Start of current billing period |
currentBillingPeriodEnd | DateTime | End of current billing period |
Related Entities
Pricing
| Field | Type | Description |
|---|---|---|
addons | [SubscriptionAddon!] | Addons attached to this subscription |
prices | [SubscriptionPrice!] | Price configurations for this subscription |
totalPrice | CustomerSubscriptionTotalPrice | Calculated total price |
minimumSpend | SubscriptionMinimumSpend | Minimum spend configuration |
freeItems | [FreeSubscriptionItem!] | Items included for free |
Trial & Cancellation
| Field | Type | Description |
|---|---|---|
wasInTrial | Boolean | Whether this subscription was ever in trial |
cancelReason | SubscriptionCancelReason | Reason for cancellation |
trialConfiguration | TrialConfiguration | Trial settings |
SubscriptionStatus Enum
| Value | Description |
|---|---|
ACTIVE | Subscription is active and billing |
IN_TRIAL | Subscription is in trial period |
CANCELED | Subscription has been cancelled |
EXPIRED | Subscription has expired |
NOT_STARTED | Subscription is scheduled but not started |
PAYMENT_PENDING | Awaiting payment confirmation |
Example Response
Related Types
- Customer - Customer type
- Plan - Plan type
- Price - Price configuration type
- SubscriptionAddon - Subscription addon type
Related Operations
- Get Subscription - Fetch a single subscription
- List Subscriptions - Query subscriptions
- Create Subscription - Create new subscription
- Update Subscription - Modify subscription
- Cancel Subscription - Cancel subscription
