@suluk/billing - v0.2.0
    Preparing search index...

    Interface ChangePlanResult

    Change the subscriber's plan IN PLACE against the cycle's PAID CEILING (see ceilingFor). ABOVE the ceiling = an upgrade: immediate + prorated for the difference ABOVE THE CEILING, charged off-session; the matching prorated credits land on that invoice.paid (3DS-safe). AT OR BELOW the ceiling = a deferred change: no charge + no new credits now — it re-prices for the NEXT renewal (so up→down→up within a cycle never re-charges). Returns the kind, the period end, and a clientSecret ONLY when the upgrade's prorated charge needs in-page 3DS. plans is the app catalog.

    interface ChangePlanResult {
        kind: "upgrade" | "downgrade";
        clientSecret: string | null;
        currentPeriodEnd: number;
    }
    Index

    Properties

    kind: "upgrade" | "downgrade"
    clientSecret: string | null
    currentPeriodEnd: number