PremiumSubscription: {
    canceledAt: Date | null;
    endedAt: Date | null;
    id: string;
    isAnnual: boolean;
    pendingChange: {
        amountDueCents: number | null;
        expiresAt: Date;
        hostedInvoiceUrl: string | null;
        invoiceId: string | null;
    } | null;
    periodEnd: Date;
    priceCents: number;
    status:
        | "active"
        | "canceled"
        | "incomplete"
        | "incomplete_expired"
        | "past_due"
        | "paused"
        | "trialing"
        | "unpaid";
    tierId: string | undefined;
    title: string | null;
    trialEndsAt: Date | null;
}

Type declaration

  • canceledAt: Date | null
  • endedAt: Date | null
  • id: string
  • isAnnual: boolean
  • pendingChange: {
        amountDueCents: number | null;
        expiresAt: Date;
        hostedInvoiceUrl: string | null;
        invoiceId: string | null;
    } | null

    A plan / add-on change waiting for payment (declined card or 3D Secure). Nothing has changed yet; it applies when hostedInvoiceUrl is paid, or is dropped at expiresAt. Cancel it with deleteSubscriptionPendingChange.

  • periodEnd: Date
  • priceCents: number
  • status:
        | "active"
        | "canceled"
        | "incomplete"
        | "incomplete_expired"
        | "past_due"
        | "paused"
        | "trialing"
        | "unpaid"
  • tierId: string | undefined
  • title: string | null
  • trialEndsAt: Date | null