Basic information
About flowglad-subscriptions
Manage subscription lifecycle including cancellation, plan changes, reactivation, and status display. Use this skill when users need to upgrade, downgrade, cancel, or reactivate subscriptions.
flowglad-subscriptions is an agent skill listed in the AddMCP.net directory, published by flowglad. Source code is hosted on github.com.
Overview
What is flowglad-subscriptions?
name: flowglad-subscriptions description: Manage subscription lifecycle including cancellation, plan changes, reactivation, and status display. Use this skill when users need to upgrade, downgrade, cancel, or reactivate subscriptions. license: MIT metadata: author: flowglad version: "1.0.0"
<!-- @flowglad/skill sources_reviewed: 2026-01-21T12:00:00Z source_files:
- platform/docs/features/subscriptions.mdx
- platform/docs/sdks/subscription-management.mdx
-->
Subscriptions Management
Abstract
This skill covers subscription lifecycle management including cancellation, plan changes, reactivation, trial handling, and status display. Proper subscription management ensures users can upgrade, downgrade, cancel, and reactivate subscriptions with correct billing behavior.
Table of Contents
- [Reload After Mutations](#1-reload-after-mutations) — CRITICAL
- 1.1 [Client-Side State Sync](#11-client-side-state-sync)
- 1.2 [Server-Side Reload Pattern](#12-server-side-reload-pattern)
- [Cancel Timing Options](#2-cancel-timing-options) — HIGH
- 2.1 [End of Period vs Immediate](#21-end-of-period-vs-immediate)
- 2.2 [User Communication](#22-user-communication)
- [Upgrade vs Downgrade Behavior](#3-upgrade-vs-downgrade-behavior) — HIGH
- 3.1 [Immediate Upgrades](#31-immediate-upgrades)
- 3.2 [Deferred Downgrades](#32-deferred-downgrades)
- [Reactivation with uncancelSubscription](#4-reactivation-with-uncancelsubscription) — MEDIUM
- 4.1 [Reactivating Canceled Subscriptions](#41-reactivating-canceled-subscriptions)
- [Trial Status Detection](#5-trial-status-detection) — MEDIUM
- 5.1 [Checking Trial Status](#51-checking-trial-status)
- 5.2 [Trial Expiration Handling](#52-trial-expiration-handling)
- [Subscription Status Display](#6-subscription-status-display) — MEDIUM
- 6.1 [Status Mapping](#61-status-mapping)
- 6.2 [Pending Cancellation Display](#62-pending-cancellation-display)
1. Reload After Mutations
Status: {currentSubscription?.status}
Status: {currentSubscription?.status}
2. Cancel Timing Options
Cancel Subscription
handleCancel('immediately')}> Cancel Now handleCancel('at_end_of_current_billing_period')}> Cancel LaterCancel Subscription
You'll keep access until {formatDate(endDate)}. No further charges will occur.
Access ends now. You may be eligible for a prorated refund.
3. Upgrade vs Downgrade Behavior
Your new plan starts immediately. You'll be charged a prorated amount for the remainder of this billing period.
You'll keep your current plan until {formatDate(endDate)}. Your new plan starts on your next billing date.
4. Reactivation with uncancelSubscription
Your subscription is set to cancel on {formatDate(currentSubscription.currentPeriodEnd)}
{isLoading ? 'Reactivating...' : 'Keep My Subscription'}5. Trial Status Detection
No active subscription
} // Doesn't distinguish between trial and paid returnYou're on the {currentSubscription.product.name} plan
} ``` **Correct: check trial status** ```tsx function SubscriptionBanner() { const { currentSubscription, loaded } = useBilling() if (!loaded) return if (!currentSubscription) { returnNo active subscription
} const isOnTrial = currentSubscription.status === 'trialing' const trialEnd = currentSubscription.trialEnd if (isOnTrial && trialEnd) { const daysLeft = Math.ceil( (new Date(trialEnd).getTime() - Date.now()) / (1000 * 60 * 60 * 24) ) return (You're on a free trial of {currentSubscription.product.name}
{daysLeft} days remaining
Add Payment MethodYou're on the {currentSubscription.product.name} plan
} ``` ### 5.2 Trial Expiration Handling **Impact: MEDIUM (conversion flow)** **Incorrect: no trial expiration warning** ```tsx function Dashboard() { // User's trial expires silently, they lose access unexpectedly return } ``` **Correct: warn before trial expires** ```tsx function Dashboard() { const { currentSubscription } = useBilling() const isOnTrial = currentSubscription?.status === 'trialing' const trialEnd = currentSubscription?.trialEnd const showTrialWarning = isOnTrial && trialEnd && (() => { const daysLeft = Math.ceil( (new Date(trialEnd).getTime() - Date.now()) / (1000 * 60 * 60 * 24) ) return daysLeft {showTrialWarning && ( {/* navigate to upgrade */}} /> )}6. Subscription Status Display
{currentSubscription?.product.name}
{/* Status shows "Active" even though cancellation is pending */}Status: {currentSubscription?.status}
{currentSubscription.product.name}
{isPendingCancel ? (Cancels on {formatDate(currentSubscription.currentPeriodEnd)}
{ await uncancelSubscription({ id: currentSubscription.id }) await reload() }}> Keep SubscriptionActive - Renews on {formatDate(currentSubscription.currentPeriodEnd)}
)}Quick Reference
Common Subscription Methods
// Cancel subscription
await billing.cancelSubscription({
id: billing.currentSubscription.id,
cancellation: { timing: 'at_end_of_current_billing_period' }, // or 'immediately'
})
// Change plan
await billing.adjustSubscription({
priceSlug: 'enterprise-monthly',
})
// Reactivate canceled subscription
await billing.uncancelSubscription({
id: subscription.id,
})
// Always reload after mutations
await billing.reload()
Key Subscription Properties
const {
currentSubscription, // Active subscription object
loaded, // Whether billing data has loaded
reload, // Function to refresh billing state
} = useBilling()
// Subscription object properties
currentSubscription.status // 'active', 'trialing', 'past_due', etc.
currentSubscription.cancelAtPeriodEnd // true if cancellation is pending
currentSubscription.currentPeriodEnd // When current period ends
currentSubscription.trialEnd // When trial ends (if trialing)
currentSubscription.product // Associated product
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In