---
title: "Billing components"
description: "The pricing table, the checkout and portal links, billing and usage history, the upgrade prompt, the cancel flow, the withdrawal button, the gift form and list, and the referral card: one section per component, and where the credit and gift banners went."
canonical_url: "https://nuxt-backend.dev/docs/reference/components/billing"
---
# Billing components

> The pricing table, the checkout and portal links, billing and usage history, the upgrade prompt, the cancel flow, the withdrawal button, the gift form and list, and the referral card: one section per component, and where the credit and gift banners went.

Version: nuxt-backend 0.6.x · Tab: Reference · Kind: reference · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

- [Source](https://github.com/qruto/nuxt-backend/tree/main/src/runtime/vue/components)

The components that sell and show billing. They read the billing entity of the session: the active workspace, or the user with `billTo: 'user'`. Each one keeps the [component contract](https://nuxt-backend.dev/docs/reference/components#the-component-contract): its props, slots, events, states and accessibility are listed in its section.

Some billing screens are not components of this list. The low-credits and gift-claim notices are the `low-credits` and `gift` notices of [`<BackendNotices>`](https://nuxt-backend.dev/docs/reference/components/shell#backendnotices), and a quota or feature boundary is the `quota` or `feature` prop of [`<Gate>`](https://nuxt-backend.dev/docs/reference/components/shell#gate). The page a referral link opens, `/r/:code` (`pages.referral`), is built on `useReferralInvite()` and `claimReferral`, and `/gifts` (`pages.gifts`) is `<GiftForm>` over `<GiftList>`, so a page of your own gets the same ([Send, receive and manage gifts](https://nuxt-backend.dev/docs/build/growth/offers/gifts#manage-gifts)).

The sections below are generated from the components' source.

## `<PricingTable>`

A complete pricing table, rendered on the server: plan cards from the live pricing (`usePricing`, the scaffolded `getPricing`), a monthly / yearly switch with what a year saves, subscribe / switch / cancel actions, credit packs compared credit for credit, a contact card, and a customer-portal link. The app's copy — which plans, their blurbs and features, the highlight — comes from `appConfig.backend.billing` or the `plans` / `packs` props; names, prices, trials and credits always come live from billing, so the page cannot drift from what checkout charges.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/PricingTable.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      the <code>
        /pricing
      </code>
      
       page (<code>
        pages.pricing
      </code>
      
      ); the <code>
        /welcome
      </code>
      
       page (<code>
        pages.welcome
      </code>
      
      ), inside its component
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-pricing
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#pricing">
        <code>
          pricing
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      <code>
        header
      </code>
      
      , <code>
        interval
      </code>
      
      , <code>
        currency
      </code>
      
      , <code>
        loading
      </code>
      
      , <code>
        empty
      </code>
      
      , <code>
        soon
      </code>
      
      , <code>
        plan
      </code>
      
      , <code>
        plan-action
      </code>
      
      , <code>
        contact
      </code>
      
      , <code>
        packs
      </code>
      
      , <code>
        pack
      </code>
      
      , <code>
        portal
      </code>
      
      , <code>
        error
      </code>
      
      , <code>
        footer
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        update:interval
      </code>
      
      , <code>
        checkout
      </code>
      
      , <code>
        plan-changed
      </code>
      
      , <code>
        canceled
      </code>
      
      , <code>
        uncanceled
      </code>
      
      , <code>
        topped-up
      </code>
      
      , <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      loading, empty, soon, ready, yearly, currencies, promotion, pending, confirm-cancel, error, refused
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      <code>
        PricingPeriodSwitch
      </code>
      
      , <code>
        PricingCurrencySelect
      </code>
      
      , <code>
        PricingPlanCard
      </code>
      
      , <code>
        PricingPackCard
      </code>
      
      , <code>
        PricingCancelConfirm
      </code>
      
      , <code>
        PricingChangeConfirm
      </code>
      
      , <code>
        PricingEmailOptOut
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        plans
      </code>
    </td>
    
    <td>
      <code>
        PricingPlan[]
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      The plan cards, in order, with their copy. Default: <code>
        appConfig.backend.billing.plans
      </code>
      
      , else every plan on sale.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        packs
      </code>
    </td>
    
    <td>
      <code>
        CreditPack[]
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      The credit packs, in order. Default: <code>
        appConfig.backend.billing.packs
      </code>
      
      , else every pack on sale.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        contact
      </code>
    </td>
    
    <td>
      <code>
        PricingContact | null
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      A contact card after the plans; <code>
        null
      </code>
      
       hides the configured one. Default: <code>
        appConfig.backend.billing.contact
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        interval
      </code>
    </td>
    
    <td>
      <code>
        PricingInterval
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      The interval the plans show (<code>
        v-model:interval
      </code>
      
      ). Default: the address's <code>
        ?interval=
      </code>
      
       when a plan sells at it, else monthly, when a plan is priced by the month.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        title
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      A heading above the table; none by default. The shipped page passes the <code>
        pricing.title
      </code>
      
       label.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        heading
      </code>
    </td>
    
    <td>
      <code>
        'h1' | 'h2'
      </code>
    </td>
    
    <td>
      <code>
        'h2'
      </code>
    </td>
    
    <td>
      The element the title renders as. The shipped <code>
        /pricing
      </code>
      
       page passes <code>
        'h1'
      </code>
      
       — there the table is the page; embedded in an app page it stays the <code>
        'h2'
      </code>
      
       default under the page's own heading.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        showPacks
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        showPortal
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        redirect
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Same-tab redirect checkout (billing returns here). Default <code>
        true
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      A public promotion of the catalog to offer, by its key (<code>
        'launch'
      </code>
      
      ): each price it applies to says its terms ("20% off for 3 months, then $10/mo") and its real end date, from its start to its end, and its checkout applies it. Not shown to a paying subscriber, whose plan change takes no discount. Default: the campaign link's code (<code>
        ?discount=
      </code>
      
      ), when it is a promotion's, else the promotion a price test shows the person (an experiment's <code>
        discounts
      </code>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        successUrl
      </code>
    </td>
    
    <td>
      <code>
        PricingSuccessUrls
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Where a checkout returns once paid, per kind: <code>
        { plan: '/welcome', pack: '/credits' }
      </code>
      
      , or a function of the plan or pack bought. A path is on the site. Default: back to this page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelOverrides<BackendLabels['pricing']>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this table, over <code>
        appConfig.backend.labels.pricing
      </code>
      
       and the translations.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** The monthly / yearly switch is a fieldset of radios sharing one name under a legend, so the arrow keys move between them and the choice is announced; the currency switch is a select inside its label, each currency named in the reader's language; a promotion is a line of text on each price it applies to, its name, its terms, the regular price after it and its end as a date, never a countdown or a struck-through price; each plan, pack and the contact card is a group named by its name, which also describes its buttons, so a row of the same words reads apart in any language; the current plan's "Cancel plan" says whether it is expanded and opens one group named by its first line, with what ends when and one button that cancels, nothing else; Escape or the same button closes it and keeps focus there, and once the cancellation went through focus stays on the plan's button; a subscriber's switch button says whether it is expanded and opens one group named by its question, with the price it moves to, when the switch happens and how the period settles in words, "Confirm switch" and "Not now"; Escape or "Not now" closes it and gives focus back to the button, and once the switch went through focus moves to the card's button; a busy button keeps focus (`aria-disabled`), says what it waits for, and a status announces it; loading, empty and "Plans open soon" (billing not launched on the deployment) are polite statuses, a failure an alert; the table is `aria-busy` while the plans load or an action runs; a member who manages no billing reads one note instead of buttons.

## `<BillingCheckoutLink>`

A link that opens a checkout for the caller's billing entity. The session is created on click, through the app's `generateCheckoutLink`, so the server checks every input then — never on render, where each page view would open a checkout nobody uses. It returns to the current page unless `success-url` says otherwise, and opens in the same tab unless `redirect` is `false`. A refusal (an off-catalog product, a signed-out visitor) is emitted as `error`; read it with `getBackendError`. It renders nothing for a caller the server says manages none of the billing (`useBilling().canManage`). While a topic of the app's takes the EU soft opt-in (`useBilling().softOptIn`), the soft opt-in's notice and its "Don't email me" box (`PricingEmailOptOut`) follow the link, and its checkout says whether the box was ticked.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/BillingCheckoutLink.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      no ready-made page: place it yourself
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-billing
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      none: the link's words are the app's default slot, which receives <code>
        pending
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      <code>
        default
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      ready, pending, refused
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      none: swap the whole component
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        productIds
      </code>
    </td>
    
    <td>
      <code>
        string | string[]
      </code>
    </td>
    
    <td>
      required
    </td>
    
    <td>
      The catalog product ids to sell.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        subscriptionId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Upgrade this subscription of the entity instead of starting a new one.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        metadata
      </code>
    </td>
    
    <td>
      <code>
        Record<string, string>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Your own metadata keys; the server refuses the ones the package reads back.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        locale
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discountCode
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      A campaign's discount code, checked by the provider.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      A public promotion of the catalog, by its key.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        utm
      </code>
    </td>
    
    <td>
      <code>
        CampaignAttribution
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Campaign attribution, stored as <code>
        utm_*
      </code>
      
       metadata.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        successUrl
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Where the buyer lands afterwards, on the site's own origin. Defaults to the current page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        redirect
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Open in the same tab (the default). <code>
        false
      </code>
      
       opens a new tab, which a browser may block: the tab opens only once the session exists.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        api
      </code>
    </td>
    
    <td>
      <code>
        BillingApi
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Override the injected <code>
        api.billing
      </code>
      
       namespace.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** A real link, named by your slot; `aria-busy` and `aria-disabled` while the checkout is being created, keeping focus; nothing at all for a caller who manages no billing.

## `<BillingPortalLink>`

A link that opens the billing customer portal for the caller's billing entity, through the app's `generateCustomerPortalUrl`, on click. With workspaces the portal is the caller's own member of the workspace's billing customer: anyone but its owner or an admin is refused (`forbidden`, reason `not_billing_manager`), and an entity that never paid has no portal yet (`not_ready`, reason `no_customer`) — both emitted as `error`. It renders nothing for a caller the server says manages none of the billing (`useBilling().canManage`).

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/BillingPortalLink.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      no ready-made page: place it yourself
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-billing
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      none: the link's words are the app's default slot, which receives <code>
        pending
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      <code>
        default
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      ready, pending, refused
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      none: swap the whole component
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        returnUrl
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Where the portal's back link returns to, on the site's own origin. Defaults to the current page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        redirect
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Open in the same tab (the default). <code>
        false
      </code>
      
       opens a new tab, which a browser may block: the tab opens only once the session exists.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        api
      </code>
    </td>
    
    <td>
      <code>
        BillingApi
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Override the injected <code>
        api.billing
      </code>
      
       namespace.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** A real link, named by your slot; `aria-busy` and `aria-disabled` while the portal session is being created, keeping focus; nothing at all for a caller who manages no billing.

## `<BillingHistory>`

The customer's past charges with their invoice links — every row read live from the billing provider (this package stores no order ledger), so what renders is what the provider will show on the invoice.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/BillingHistory.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      the <code>
        /settings
      </code>
      
       page (<code>
        pages.settings
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-history
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#history">
        <code>
          history
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      <code>
        header
      </code>
      
      , <code>
        loading
      </code>
      
      , <code>
        empty
      </code>
      
      , <code>
        order
      </code>
      
      , <code>
        pager
      </code>
      
      , <code>
        error
      </code>
      
      , <code>
        footer
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        invoice
      </code>
      
      , <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      loading, empty, ready, pending, error
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      <code>
        BillingHistoryOrder
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        title
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limit
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Charges per page. Default: the provider's own page size.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invoices
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Render the per-order invoice link. Default <code>
        true
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        redirect
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Open invoices in the same tab instead of a new one.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelOverrides<BackendLabels['history']>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this component, over <code>
        appConfig.backend.labels.history
      </code>
      
       and the translations.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** Each charge is a group named by its date and description, which also describe its invoice button; loading and empty are polite statuses, a failure an alert with no empty note beside it; a busy invoice or pager button keeps focus (`aria-disabled`), says what it waits for, and a status announces it; once no page is left in a pager button's direction, focus moves to the other one; `aria-busy` while a page or an invoice loads.

## `<UsageHistory>`

Metered consumption, event by event, straight from the provider's events API — the same records that drew the credit balance down. Nothing is mirrored locally, so this cannot disagree with what the customer is billed.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/UsageHistory.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      the <code>
        /settings
      </code>
      
       page (<code>
        pages.settings
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-usage
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#usage">
        <code>
          usage
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      <code>
        header
      </code>
      
      , <code>
        loading
      </code>
      
      , <code>
        empty
      </code>
      
      , <code>
        event
      </code>
      
      , <code>
        pager
      </code>
      
      , <code>
        error
      </code>
      
      , <code>
        footer
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      none
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      loading, empty, ready, pending, error
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      <code>
        UsageHistoryEvent
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        meter
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Credit-meter name (or raw meter id). Omit for every metered event.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        title
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limit
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Events per page. Default: the provider's own page size.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelOverrides<BackendLabels['usage']>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this component, over <code>
        appConfig.backend.labels.usage
      </code>
      
       and the translations.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** Loading and empty are polite statuses, a failure an alert with no empty note beside it; `aria-busy` while a page loads; the pager button pressed keeps focus (`aria-disabled`) and says the page loads, a status announcing it, and once no page is left in its direction focus moves to the other one.

## `<UpgradePrompt>`

What someone whose plan lacks a feature sees: a sentence naming the plans on sale that include it, in pricing order, and a link to the first of them on the pricing page (`/pricing?plan=<key>`). The plans come from the catalog (`usePricing`, by each plan's `featureKeys`), so the prompt offers exactly the plans the server's `requireFeature` names; a `feature_required` refusal's own `plans` can be handed over as they are. A workspace member who manages none of its billing gets no link, and is asked to ask an owner or admin instead.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/UpgradePrompt.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      no ready-made page: place it yourself
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-upgrade
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#upgrade">
        <code>
          upgrade
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      <code>
        default
      </code>
      
      , <code>
        message
      </code>
      
      , <code>
        action
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        dismissed
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      loading, ready, refused
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      none: swap the whole component
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        feature
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      The feature to unlock, by its catalog key: the prompt offers the plans on sale that include it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        plans
      </code>
    </td>
    
    <td>
      <code>
        string[]
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      The plans to offer instead, by catalog key, such as a <code>
        feature_required
      </code>
      
       refusal's <code>
        data.plans
      </code>
      
      . Shown in pricing order, and only while on sale.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelOverrides<BackendLabels['upgrade']>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this prompt, over <code>
        appConfig.backend.labels.upgrade
      </code>
      
       and the translations.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        cooldown
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      How long the prompt stays hidden after "Not now", in milliseconds: it offers the dismiss only with one. Counted per feature (or per the <code>
        plans
      </code>
      
       named) for the signed-in person.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** The sentence is a polite status, so the plans it names are announced as they load, and the prompt is `aria-busy` until they have; the action is a real link, named by the plan it opens, and the one stop the prompt adds; a member who manages no billing reads who to ask instead, with no link.

## `<CancelFlow>`

Cancelling takes one step; a save offer is one optional step. The flow asks one optional question, the main reason with a comment, and shows at most the one offer the server answers for it (a pause, a cheaper plan or a discount, by its real terms), then the end: the date the plan ends and a "Keep my plan" button until then. "Cancel my plan" is on every screen and finishes at once, a button of the same size and style as the offer's. Which offer, and whether one may be made at all (none in the withdrawal period, on a past-due plan or a trial, one per customer in 12 months), is the server's: `setupBilling({ lifecycle: { saveOffers } })`. When none can stand for the reason, the question's button is "Cancel my plan" itself, and a confirmation comes before the plan ends.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/CancelFlow.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      the <code>
        /settings
      </code>
      
       page (<code>
        pages.settings
      </code>
      
      ), inside its component
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-cancel-flow
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#cancelflow">
        <code>
          cancelFlow
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      <code>
        question
      </code>
      
      , <code>
        offer
      </code>
      
      , <code>
        confirm
      </code>
      
      , <code>
        end
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        close
      </code>
      
      , <code>
        canceled
      </code>
      
      , <code>
        kept
      </code>
      
      , <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      ready, pending, offered, done, error, confirm-cancel
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      <code>
        CancelFlowQuestion
      </code>
      
      , <code>
        CancelFlowOffer
      </code>
      
      , <code>
        CancelFlowConfirm
      </code>
      
      , <code>
        CancelFlowEnd
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        subscriptionId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Which subscription, with <code>
        multipleSubscriptions
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelOverrides<BackendLabels['cancelFlow']>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this flow, over <code>
        appConfig.backend.labels.cancelFlow
      </code>
      
       and the translations.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** The flow is a region named by its heading; the reasons are a group of radio buttons named by the optional question, and the comment a field with a visible label; "Cancel my plan" is a button on every step and finishes at once; where no offer can stand, the question's own button says "Cancel my plan" and leads to a confirmation, a group named by the flow's heading with "Confirm cancellation" and "Back"; the offer is a polite status with its real terms, and its accept button looks like "Cancel my plan", with no countdown; the end is a status that says when the plan ends, with "Keep my plan"; Escape closes the flow except while a step is on its way; a busy button keeps focus (`aria-disabled`) and says what it waits for; a failure is an alert.

## `<WithdrawalButton>`

The EU withdrawal button (Consumer Rights Directive Art. 11a, from 2026-06-19): "Withdraw from contract here", for a purchase inside its 14 days, then a confirm step, "Confirm withdrawal". The server ends the plan at once and emails a receipt with the date and time; the refund is an administrator's. Nothing renders outside the period, for a member who manages no billing, or while `setupBilling({ lifecycle: { withdrawal } })` is off. Its words are the `withdrawal` labels.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/WithdrawalButton.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      no ready-made page: place it yourself
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-withdrawal
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#withdrawal">
        <code>
          withdrawal
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      none
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        withdrawn
      </code>
      
      , <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      refused
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      none: swap the whole component
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelOverrides<BackendLabels['withdrawal']>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this button, over <code>
        appConfig.backend.labels.withdrawal
      </code>
      
       and the translations.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** A real button labelled "Withdraw from contract here" that says what it controls; its confirm step is a group named by its question, with "Confirm withdrawal" and "Go back", and Escape goes back; the receipt is a status with the date and time; a busy button keeps focus and says what it waits for; a failure is an alert; nothing at all outside the withdrawal period or for a member who manages no billing.

## `<GiftForm>`

The gift form: a credit pack or a plan pass with its length (the lengths the plan is gifted for, at their live prices), the recipient's email, a note and a delivery day, then the purchaser's own checkout (`useGifts().send`). A visitor signs in first and comes back to the form with the choice kept; a purchaser back from paying reads that it is on its way. Its words are the `gift` labels; the logic is `useGiftForm()`.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/GiftForm.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      the <code>
        /gifts
      </code>
      
       page (<code>
        pages.gifts
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-gift
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#gift">
        <code>
          gift
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      none
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        checkout
      </code>
      
      , <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      ready, loading, empty, pending, error, sent
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      none: swap the whole component
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      experimental
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        successUrl
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Where the purchaser returns once paid. Default: this page with <code>
        ?sent=1
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        redirect
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Open the checkout in the same tab (default <code>
        true
      </code>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelOverrides<BackendLabels['gift']>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this form, over <code>
        appConfig.backend.labels.gift
      </code>
      
       and the translations.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** A form named by its heading; what to give, which pack, which plan and for how long are each radios sharing one name under a legend; the recipient, the note and the day are fields inside their labels, the note and the day described by their hints; a refusal is an alert, and the field it names is `aria-invalid` and described by it; the send button says the price, or that a visitor signs in first, keeps focus while the checkout opens (`aria-disabled`) and says what it waits for; the return from a paid checkout is a polite status; nothing on sale to give is a status.

## `<GiftList>`

The gifts a person received, each to claim into a workspace they manage, and the gifts they sent, each with what they can still do until it is claimed: resend its notice, address it to someone else, date it again, or cancel it for a refund behind a recent sign-in. Its words are the `gift` labels; the logic is `useGiftList()`.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/GiftList.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      the <code>
        /gifts
      </code>
      
       page (<code>
        pages.gifts
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-gift
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#gift">
        <code>
          gift
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      none
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      none
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      ready, loading, empty, error
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      none: swap the whole component
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelGroupOverrides<'gift'>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this list, over <code>
        appConfig.backend.labels.gift
      </code>
      
       and the translations.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** The received and sent gifts are each a section named by its heading, every gift an entry with what it is, who it is from or for, its state in words and its date; each action is a button named by what it does, described by its gift; the recipient and date changes are fields inside their labels; an outcome is a polite status, a failure an alert; loading is a busy status.

## `<ReferralCard>`

A person's referral link, with copy and share buttons and the disclosure of the reward: the link is `/r/<code>` on this site, made the first time the card is read. The share text says what both sides get, as endorsement rules ask; pass `shareText` to say it your own way (keep the incentive in it). Beneath, the friends the link brought by state, and the person's choice to carry their code on the pages they share. Nothing renders for a signed-out visitor. Words come from the `referral` labels; `useReferrals()` is its logic, for a card of your own.

<table>
<thead>
  <tr>
    <th>
      At a glance
    </th>
    
    <th>
      
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Registered from
    </td>
    
    <td>
      <code>
        src/runtime/vue/components/billing/ReferralCard.vue
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Rendered by
    </td>
    
    <td>
      no ready-made page: place it yourself
    </td>
  </tr>
  
  <tr>
    <td>
      Family
    </td>
    
    <td>
      <code>
        data-referral
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Labels
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/configuration/labels#referral">
        <code>
          referral
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Slots
    </td>
    
    <td>
      none
    </td>
  </tr>
  
  <tr>
    <td>
      Events
    </td>
    
    <td>
      <code>
        copied
      </code>
      
      , <code>
        shared
      </code>
      
      , <code>
        error
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      States
    </td>
    
    <td>
      ready, loading, error, refused
    </td>
  </tr>
  
  <tr>
    <td>
      Parts
    </td>
    
    <td>
      none: swap the whole component
    </td>
  </tr>
  
  <tr>
    <td>
      Tier
    </td>
    
    <td>
      stable
    </td>
  </tr>
</tbody>
</table>

**Props**

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        shareText
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      The text shared beside the link. Default: what both sides get, from the <code>
        referral
      </code>
      
       labels.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        LabelOverrides<BackendLabels['referral']>
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      Copy for this card, over <code>
        appConfig.backend.labels.referral
      </code>
      
       and the translations.
    </td>
  </tr>
</tbody>
</table>

**Accessibility:** A section named by its heading; the link is a read-only field with a visible label, described by the text shared with it, so it can be selected by hand where the clipboard is refused; "Copy link" says when it copied, and "Share" appears only where the browser has a share sheet; the friends it brought are a polite status; the choice to carry the code on shared pages is a checkbox with a visible label and a note; loading is a busy polite status, a failure an alert; nothing renders for a signed-out visitor.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
