Skip to content

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.

OperationDescription
Create SubscriptionCreate a new subscription for a user
Update SubscriptionUpdate an existing subscription’s end period
Cancel SubscriptionCancel an existing subscription for a user

Use the subscription mutations to automatically enroll users in membership plans when they complete certain actions in your application or meet specific criteria.

Extend subscription periods for loyal customers or as part of a promotion campaign.

Manage trial periods by creating time-limited subscriptions and extending or shortening them based on user engagement.

Create lifetime subscriptions for users who purchase permanent access plans. Lifetime subscriptions:

  • Grant permanent access with no expiration (endAt is null)
  • Have no billing periods (currentPeriodEnd is null)
  • Cannot be cancelled or updated (isCancellable is false)
  • Are one-time purchases with no recurring charges

Different plan types have different behaviors when creating subscriptions:

Plan TypeDescriptionendAtcurrentPeriodEndCancellable
recurringRegular subscription with recurring billingCalculatedBilling period endYes
fixed_dateExpires on a specific dateSet dateSet dateYes
specific_lengthExpires after a specific durationCalculatedCalculatedYes
lifetimePermanent access, one-time purchasenullnullNo

For more information about the Teachify Admin API, please refer to the API Overview.