Query
Parameters
Input parameters for retrieving the subscription
Return Type
Returns aCustomerSubscription object with:
| Field | Type | Description |
|---|---|---|
subscriptionId | String | Unique subscription identifier |
status | SubscriptionStatus | ACTIVE, IN_TRIAL, CANCELED, EXPIRED, NOT_STARTED |
startDate | DateTime | When subscription started |
endDate | DateTime | When subscription ends (if set) |
trialEndDate | DateTime | Trial end date (if in trial) |
cancellationDate | DateTime | When cancellation was requested |
currentBillingPeriodStart | DateTime | Current period start |
currentBillingPeriodEnd | DateTime | Current period end |
plan | Plan | The subscribed plan |
addons | [SubscriptionAddon] | Applied addons with quantities |
prices | [Price] | Subscription pricing |
customer | Customer | Associated customer |
paymentCollection | PaymentCollection | Payment status |
coupon | Coupon | Applied coupon (if any) |
scheduledUpdates | [ScheduledUpdate] | Pending scheduled changes |
Subscription Status Values
| Status | Description |
|---|---|
ACTIVE | Subscription is active and paid |
IN_TRIAL | Subscription is in trial period |
CANCELED | Subscription has been canceled |
EXPIRED | Trial or subscription has expired |
NOT_STARTED | Scheduled subscription not yet started |
PAYMENT_PENDING | Awaiting payment |
Common Use Cases
Display subscription details
Display subscription details
Show current plan, pricing, and renewal date on account pages.
Check trial status
Check trial status
Determine if user is in trial and when it expires.
Show pending changes
Show pending changes
Display any scheduled updates (plan changes, cancellations).
Related Operations
- List Subscriptions - Query multiple subscriptions
- Get Active Subscriptions - Get active subscriptions for a customer
- Update Subscription - Modify subscription
- Cancel Subscription - Cancel subscription
