Skip to main content

User

Properties

PropertyTypeDescription
emailstringEmail address of the user.
paidbooleanTrue if the user has comped access, an active lifetime purchase, or a recurring subscription in active, trialing, or past_due status whose current period has not ended.
trial_availablebooleanTrue if the user can still start a free trial for this extension.
plansUserPlan[]Array of plans the user has purchased.

Example

{
    email: "user@example.com",
	paid: true,
	trial_available: false,
	plans: [
		{
			id: "tp_12345",
			name: "Pro",
			billing_cycle: "monthly",
			price: 19.99,

			status: "active",
			paid_at: "2023-10-01T12:00:00Z",
			trial_end: null,
			period_start: "2023-10-01T12:00:00Z",
			period_end: "2023-11-01T12:00:00Z",
			canceled_at: null,
		},
        ...
	]
}

UserPlan

Properties

PropertyTypeDescription
idstringUnique identifier for the tier price.
namestringName of the price, or the tier name when the price does not have its own name.
billing_cycle"once" | "monthly" | "yearly"Billing cycle for this plan.
pricenumberPrice in dollars (for example, 19.99).
status"active" | "trialing" | "past_due" | "canceled" | "unpaid" | "incomplete" | "incomplete_expired" | "paused"Current plan status.
paid_atstring | nullISO timestamp for when the plan was paid for, or null if not applicable.
trial_endstring | nullISO timestamp for when the trial ends, or null if the plan is not trialing.
period_startstring | nullISO timestamp for when the current billing period started, or null if not applicable.
period_endstring | nullISO timestamp for when the current billing period ends, or null if not applicable.
canceled_atstring | nullISO timestamp for when the plan was canceled, or null if not applicable.
For recurring plans, paid can remain true while a subscription is past_due, but only until period_end. If Stripe leaves the subscription past_due after that point, paid becomes false.

Examples

{
    id: "tp_003",
    name: "Lifetime",
    billing_cycle: "once",
    price: 99.99,

    status: "active",
    paid_at: "2023-10-01T12:00:00Z",
    trial_end: null,
    period_start: null,
    period_end: null,
    canceled_at: null,
}
{
    id: "tp_001",
    name: "Pro",
    billing_cycle: "monthly",
    price: 19.99,

    status: "canceled",
    paid_at: "2023-10-01T12:00:00Z",
    trial_end: null,
    period_start: "2023-10-01T12:00:00Z",
    period_end: "2023-10-15T12:00:00Z",
    canceled_at: "2023-10-15T12:00:00Z",
}
{
    id: "tp_001",
    name: "Pro",
    billing_cycle: "monthly",
    price: 19.99,

    status: "trialing",
    paid_at: null,
    trial_end: "2023-10-14T12:00:00Z",
    period_start: "2023-10-01T12:00:00Z",
    period_end: "2023-10-14T12:00:00Z",
    canceled_at: null,
}

Tier

Properties

PropertyTypeDescription
idstringUnique identifier for the tier.
namestringName of the tier.
descriptionstring | nullDescription of the tier, null if not applicable.
ranknumberPosition of the tier in your pricing structure.
trial_daysnumber | nullNumber of free trial days for recurring prices, or null if no trial is configured.
pricesTierPrice[]Pricing variants for this tier.

Examples

{
    id: "tier_12345",
    name: "Pro",
    description: "Access to all premium features.",
    rank: 2,
    trial_days: 14,
    prices: [
        {
            id: "tp_001",
            billing_cycle: "monthly",
            price: 19.99,
        },
        {
            id: "tp_002",
            billing_cycle: "yearly",
            price: 199.99,
        },
    ]
}
{
    id: "tier_67890",
    name: "Lifetime",
    description: "One-time purchase for lifetime access.",
    rank: 1,
    trial_days: null,
    prices: [
        {
            id: "tp_003",
            billing_cycle: "once",
            price: 99.99,
        },
    ]
}

TierPrice

Properties

PropertyTypeDescription
idstringUnique identifier for the tier price.
billing_cycle"once" | "monthly" | "yearly"Billing cycle for this price.
pricenumberPrice in dollars (for example, 19.99).