Subscription Mutations
The subscription mutations allow you to create and manage user subscriptions to membership plans within your Teachify school. These operations enable you to programmatically handle subscription lifecycle events.
Available Mutations
Section titled “Available Mutations”| Operation | Description |
|---|---|
| Create Subscription | Create a new subscription for a user |
| Update Subscription | Update an existing subscription’s end period |
| Cancel Subscription | Cancel an existing subscription for a user |
Common Use Cases
Section titled “Common Use Cases”User Enrollment Automation
Section titled “User Enrollment Automation”Use the subscription mutations to automatically enroll users in membership plans when they complete certain actions in your application or meet specific criteria.
Subscription Extension
Section titled “Subscription Extension”Extend subscription periods for loyal customers or as part of a promotion campaign.
Trial Management
Section titled “Trial Management”Manage trial periods by creating time-limited subscriptions and extending or shortening them based on user engagement.
Lifetime Access
Section titled “Lifetime Access”Create lifetime subscriptions for users who purchase permanent access plans. Lifetime subscriptions:
- Grant permanent access with no expiration (
endAtisnull) - Have no billing periods (
currentPeriodEndisnull) - Cannot be cancelled or updated (
isCancellableisfalse) - Are one-time purchases with no recurring charges
Plan Types
Section titled “Plan Types”Different plan types have different behaviors when creating subscriptions:
| Plan Type | Description | endAt | currentPeriodEnd | Cancellable |
|---|---|---|---|---|
recurring | Regular subscription with recurring billing | Calculated | Billing period end | Yes |
fixed_date | Expires on a specific date | Set date | Set date | Yes |
specific_length | Expires after a specific duration | Calculated | Calculated | Yes |
lifetime | Permanent access, one-time purchase | null | null | No |
Related Resources
Section titled “Related Resources”- Membership Plans - Available membership plans
For more information about the Teachify Admin API, please refer to the API Overview.