Constructors

Methods

  • Parameters

    • __namedParameters: {
          auth: string;
          immediately?: boolean;
          subscriptionId: string;
      }
      • auth: string
      • Optionalimmediately?: boolean
      • subscriptionId: string

    Returns Promise<WebResponse<string>>

  • A Stripe customer portal link. Default: straight to updating the card. view: 'home' opens the portal's home page instead - invoice history, cards, billing details, the subscription - for a "Billing history" button.

    Parameters

    • __namedParameters: {
          auth: string;
          view?: "home";
      }
      • auth: string
      • Optionalview?: "home"

    Returns Promise<WebResponse<string>>

  • "Pay" on a payment request: a URL to send the customer to. The emailed invoice for a normal subscription; a fresh one-time checkout for Managed Payments (so it never expires on them). Open the URL in the same or a new tab.

    Parameters

    • __namedParameters: {
          auth: string;
          requestId: string;
      }
      • auth: string
      • requestId: string

    Returns Promise<WebResponse<{
        url: string;
    }>>

  • "Keep subscription": undo a cancel that was scheduled for the period end. A subscription set to cancel refuses plan and add-on changes until this is called. 400 when it is not set to cancel, or has already ended.

    Parameters

    • __namedParameters: {
          auth: string;
          subscriptionId: string;
      }
      • auth: string
      • subscriptionId: string

    Returns Promise<WebResponse<string>>

  • Cancel a plan / add-on change that is waiting for payment (see PremiumSubscription.pendingChange). Voids its invoice and drops the change; nothing is charged. 400 when no change is waiting.

    Parameters

    • __namedParameters: {
          auth: string;
          subscriptionId: string;
      }
      • auth: string
      • subscriptionId: string

    Returns Promise<WebResponse<string>>

  • Parameters

    • __namedParameters: {
          includeUnreleased?: boolean;
          refreshCache?: boolean;
      }
      • OptionalincludeUnreleased?: boolean

        Include everything, not just what a customer should see: disabled tiers, inactive addons, features still launch-gated to 'off'/'beta', and rows flagged showOnPricing: false. For admin views; leave unset for the public pricing page.

      • OptionalrefreshCache?: boolean

        Misnomer kept for compatibility - it maps to the API's all flag and refreshes no cache. Use includeUnreleased.

    Returns Promise<WebResponse<PremiumPlans>>

  • Backend/support-bot variant: sync an arbitrary user's premium roles in the support server. Authenticated with the shared backend secret — pass auth as 'Bearer ' + NOTI_BACKEND_SECRET.

    Parameters

    • __namedParameters: {
          auth: string;
          discordId: string;
      }
      • auth: string
      • discordId: string

    Returns Promise<WebResponse<SyncSupportRolesResult>>