Skip to main content

SubscriptionInfo

type SubscriptionInfo = {
activationMethod: "manual" | "stripe" | "appstore" | "playstore" | "teams";
billingPortalSwitchToAnnualUrl: string | null;
billingPortalUrl: string | null;
expirationDate: string | null;
hasBillingPortal: boolean;
hasBillingPortalSwitchToAnnual: boolean;
hasSwitchLegacyToCurrent: boolean;
invoiceCreditBalance: Record<string, number> | null;
plan: "free" | "pro" | "pro_gifted" | "pro_legacy";
planPrice: | {
amount: string;
billingCycle: "monthly" | "yearly" | null;
currency: string;
rawAmount: number;
taxBehavior: "inclusive" | "exclusive" | "unspecified";
}
| null;
status: | "none"
| "autorenew"
| "canceled"
| "expired"
| "trial"
| "trial_canceled";
};

Current subscription state of a user.

Type Declaration

NameType
activationMethod"manual" | "stripe" | "appstore" | "playstore" | "teams"
billingPortalSwitchToAnnualUrlstring | null
billingPortalUrlstring | null
expirationDatestring | null
hasBillingPortalboolean
hasBillingPortalSwitchToAnnualboolean
hasSwitchLegacyToCurrentboolean
invoiceCreditBalanceRecord<string, number> | null
plan"free" | "pro" | "pro_gifted" | "pro_legacy"
planPrice| { amount: string; billingCycle: "monthly" | "yearly" | null; currency: string; rawAmount: number; taxBehavior: "inclusive" | "exclusive" | "unspecified"; } | null
status| "none" | "autorenew" | "canceled" | "expired" | "trial" | "trial_canceled"