---
title: "usePricing"
description: "usePricing, auto-imported in the app: its options, return value and types."
canonical_url: "https://nuxt-backend.dev/docs/reference/api/use-pricing"
---
# usePricing

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.

## Interfaces

### PricedCredits

Defined in: [src/convex/integrations/billing/types/records.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts)

Credits a price grants, from the live product's meter-credit benefit.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="meter">
        
      </a>
      
       <code>
        meter?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The catalog meter they land on; absent for a meter the catalog does not name.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="unit">
        
      </a>
      
       <code>
        unit?
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/api/billing#meterunit">
        <code>
          MeterUnit
        </code>
      </a>
    </td>
    
    <td>
      What that meter counts, when the catalog names its unit.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="units">
        
      </a>
      
       <code>
        units
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Units per billing cycle (a plan), or once (a pack).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="rollover">
        
      </a>
      
       <code>
        rollover
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether unspent units carry over into the next cycle.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PricedTrial

Defined in: [src/convex/integrations/billing/types/records.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts)

A free trial a plan's price opens with, as the provider holds it.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="interval">
        
      </a>
      
       <code>
        interval
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        day
      </code>
      
       | <code>
        week
      </code>
      
       | <code>
        month
      </code>
      
       | <code>
        year
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="count">
        
      </a>
      
       <code>
        count
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PricedPlanPrice

Defined in: [src/convex/integrations/billing/types/records.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts)

One of a plan's prices: its product, at one billing interval.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="productid">
        
      </a>
      
       <code>
        productId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="amount">
        
      </a>
      
       <code>
        amount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      What one interval costs, in the currency's smallest unit: in <a href="#currency-2">
        Pricing.currency
      </a>
      
       when the product is priced in it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency">
        
      </a>
      
       <code>
        currency
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Lower-case ISO 4217 code.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="monthly">
        
      </a>
      
       <code>
        monthly
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      The same price per month (a year's divided by twelve, unrounded), so plans compare across intervals.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="savings">
        
      </a>
      
       <code>
        savings?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      How many percent a yearly price saves against twelve monthly ones of the same plan and currency, rounded down; absent when it saves nothing.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="credits">
        
      </a>
      
       <code>
        credits?
      </code>
    </td>
    
    <td>
      <a href="#pricedcredits">
        <code>
          PricedCredits
        </code>
      </a>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="trial">
        
      </a>
      
       <code>
        trial?
      </code>
    </td>
    
    <td>
      <a href="#pricedtrial">
        <code>
          PricedTrial
        </code>
      </a>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="archived">
        
      </a>
      
       <code>
        archived?
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      This price's product is archived, or its plan retired: sold to nobody new. Listed so the people on it still see their card; nothing offers it to anyone else. Absent on a price that sells.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="promotion">
        
      </a>
      
       <code>
        promotion?
      </code>
    </td>
    
    <td>
      <a href="#pricedoffer">
        <code>
          PricedOffer
        </code>
      </a>
    </td>
    
    <td>
      The asked-for promotion (<a href="#promotion-2">
        Pricing.promotion
      </a>
      
      ) on this price, when it applies to it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PricedOffer

Defined in: [src/convex/integrations/billing/types/records.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts)

A price with a promotion: what one payment costs while it applies.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="amount-1">
        
      </a>
      
       <code>
        amount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      What one payment costs with it, in the price's currency: never below zero.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="off">
        
      </a>
      
       <code>
        off
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      What it takes off one payment, in the price's currency.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PricedPromotion

Defined in: [src/convex/integrations/billing/types/records.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts)

A public promotion as a pricing page shows it: the catalog discount's
real terms, from what `billing sync` pushed. Never its code, and never
a countdown: the end is a date.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="key">
        
      </a>
      
       <code>
        key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The catalog key.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="name">
        
      </a>
      
       <code>
        name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The name the customer sees at checkout.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="percentoff">
        
      </a>
      
       <code>
        percentOff?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Percent off, <code>
        20
      </code>
      
       for 20%; absent on a fixed amount off.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="duration">
        
      </a>
      
       <code>
        duration
      </code>
    </td>
    
    <td>
      <code>
        "once"
      </code>
      
       | <code>
        "forever"
      </code>
      
       | <code>
        "repeating"
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="months">
        
      </a>
      
       <code>
        months?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      The months a <code>
        repeating
      </code>
      
       promotion lasts.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="startsat">
        
      </a>
      
       <code>
        startsAt?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      When it can first be redeemed (ISO); a page shows it from then on.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="endsat">
        
      </a>
      
       <code>
        endsAt?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      When it can no longer be redeemed (ISO): the offer's real end.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PricedPlan

Defined in: [src/convex/integrations/billing/types/records.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts)

A plan as a pricing page shows it, from its live products.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="key-1">
        
      </a>
      
       <code>
        key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The catalog key.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="name-1">
        
      </a>
      
       <code>
        name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The product's name at the provider.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="description">
        
      </a>
      
       <code>
        description
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="retired">
        
      </a>
      
       <code>
        retired
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      A retired plan: archived, sold to nobody new. Listed so its subscribers' card still shows; <code>
        <PricingTable>
      </code>
      
       shows it to them alone.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="free">
        
      </a>
      
       <code>
        free?
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      The catalog's free plan: every billing entity is on it until it buys another, and back on it when that one ends. Never checked out.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="welcome">
        
      </a>
      
       <code>
        welcome?
      </code>
    </td>
    
    <td>
      <code>
        Omit
      </code>
      
      <<a href="#pricedcredits">
        <code>
          PricedCredits
        </code>
      </a>
      
      , <code>
        "rollover"
      </code>
      
      >
    </td>
    
    <td>
      The free plan's welcome credits: what each person gets once, as the first billing entity they own first starts on it (<code>
        credits: { once: true }
      </code>
      
       in the catalog). Only on the catalog's free plan, and only when it grants some.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="prices">
        
      </a>
      
       <code>
        prices
      </code>
    </td>
    
    <td>
      <code>
        Partial
      </code>
      
      <<code>
        Record
      </code>
      
      <<a href="https://nuxt-backend.dev/docs/reference/api/billing#cataloginterval">
        <code>
          CatalogInterval
        </code>
      </a>
      
      , <a href="#pricedplanprice">
        <code>
          PricedPlanPrice
        </code>
      </a>
      
      >>
    </td>
    
    <td>
      One entry per interval the plan is priced at.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="features">
        
      </a>
      
       <code>
        features
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
      <span>
        
      </span>
    </td>
    
    <td>
      The names of the feature benefits the plan grants, at the provider. A benefit that carries quotas is listed in <a href="#quotas">
        PricedPlan.quotas
      </a>
      
       instead.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="featurekeys">
        
      </a>
      
       <code>
        featureKeys
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
      <span>
        
      </span>
    </td>
    
    <td>
      The key of every benefit the plan grants, its credits included: what <code>
        billing.requireFeature
      </code>
      
      , <code>
        useFeatures().has()
      </code>
      
       and <code>
        <UpgradePrompt>
      </code>
      
       match a feature by (its <code>
        key
      </code>
      
       metadata, else its benefit id). From the prices that still sell, or from all of them for a retired plan.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="quotas">
        
      </a>
      
       <code>
        quotas?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        number
      </code>
      
       | <code>
        "unlimited"
      </code>
      
      >
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
      
       How many of each quota the plan allows, by quota key: a whole number, or <code>
        'unlimited'
      </code>
      
      . A quota the plan does not name allows none. From the live benefits' metadata, as the gate reads it, and from the prices that still sell (all of them for a retired plan). Absent from a backend older than plan quotas.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="gift">
        
      </a>
      
       <code>
        gift?
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/api/billing#pricedplangift">
        <code>
          PricedPlanGift
        </code>
      </a>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
      
       The plan as a gift (<code>
        gift: { months }
      </code>
      
       in the catalog): each length a pass is sold for, at its live price. Absent for a plan that is not giftable, a retired one, and until <code>
        billing sync
      </code>
      
       has loaded the gift products. What <code>
        useGifts().send(plan, { months })
      </code>
      
       buys.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PricedPack

Defined in: [src/convex/integrations/billing/types/records.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts)

A credit pack as a pricing page shows it, from its live product.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="key-2">
        
      </a>
      
       <code>
        key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="productid-1">
        
      </a>
      
       <code>
        productId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="name-2">
        
      </a>
      
       <code>
        name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="description-1">
        
      </a>
      
       <code>
        description
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="amount-2">
        
      </a>
      
       <code>
        amount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency-1">
        
      </a>
      
       <code>
        currency
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="credits-1">
        
      </a>
      
       <code>
        credits?
      </code>
    </td>
    
    <td>
      <a href="#pricedcredits">
        <code>
          PricedCredits
        </code>
      </a>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="percredit">
        
      </a>
      
       <code>
        perCredit?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      What one credit costs, in the currency's smallest unit (unrounded). Absent for a pack the comparison skips: no single credit benefit, a custom or $0 price, or credits that do not roll over.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="lesspercredit">
        
      </a>
      
       <code>
        lessPerCredit?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      How many percent less per credit than the costliest pack on the same meter and currency, rounded down; absent when it is no cheaper.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isbestvalue">
        
      </a>
      
       <code>
        isBestValue
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      The one pack whose credits cost least, among two or more comparable ones.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="promotion-1">
        
      </a>
      
       <code>
        promotion?
      </code>
    </td>
    
    <td>
      <a href="#pricedoffer">
        <code>
          PricedOffer
        </code>
      </a>
    </td>
    
    <td>
      The asked-for promotion (<a href="#promotion-2">
        Pricing.promotion
      </a>
      
      ) on this pack, when it applies to it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### Pricing

Defined in: [src/convex/integrations/billing/types/records.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts)

What `getPricing` answers: the plans and packs on sale, in catalog order.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="plans">
        
      </a>
      
       <code>
        plans
      </code>
    </td>
    
    <td>
      <a href="#pricedplan">
        <code>
          PricedPlan
        </code>
      </a>
      
      <span>
        
      </span>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="packs">
        
      </a>
      
       <code>
        packs
      </code>
    </td>
    
    <td>
      <a href="#pricedpack">
        <code>
          PricedPack
        </code>
      </a>
      
      <span>
        
      </span>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency-2">
        
      </a>
      
       <code>
        currency?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The currency the prices are in, lower-case ISO 4217: the one asked for when the catalog prices it, else the catalog's own. A product with no price in it shows its price in the catalog's.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currencies">
        
      </a>
      
       <code>
        currencies?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
      <span>
        
      </span>
    </td>
    
    <td>
      Every currency the catalog prices its products in, its own first: what a currency switch offers.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="promotion-2">
        
      </a>
      
       <code>
        promotion?
      </code>
    </td>
    
    <td>
      <a href="#pricedpromotion">
        <code>
          PricedPromotion
        </code>
      </a>
    </td>
    
    <td>
      The public promotion <code>
        getPricing
      </code>
      
       was asked for (<code>
        discount
      </code>
      
      : its key or its code), when the catalog has one by that name; each price and pack it applies to carries its <a href="#pricedoffer">
        PricedOffer
      </a>
      
      . Shown only between its <code>
        startsAt
      </code>
      
       and <code>
        endsAt
      </code>
      
      , which the page compares with its own clock.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="launched">
        
      </a>
      
       <code>
        launched?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether billing sells on this deployment yet: <code>
        false
      </code>
      
       on a production deployment with no provider token or no production catalog, where a pricing page reads "Plans open soon" and every checkout is refused (<code>
        unavailable
      </code>
      
      , reason <code>
        not_launched
      </code>
      
      ). <code>
        getPricing
      </code>
      
       always answers it; a backend older than 0.3 leaves it out, which reads as launched.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/records.ts" rel="nofollow">
        src/convex/integrations/billing/types/records.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PricingSuccessUrls

Defined in: [src/runtime/vue/composables/use-pricing.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts)

Where each kind of checkout returns to ([UsePricingOptions.successUrl](#successurl)).

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="plan">
        
      </a>
      
       <code>
        plan?
      </code>
    </td>
    
    <td>
      <a href="#pricingsuccessurl">
        <code>
          PricingSuccessUrl
        </code>
      </a>
      
      <<a href="#pricedplan">
        <code>
          PricedPlan
        </code>
      </a>
      
      >
    </td>
    
    <td>
      A plan's checkout. Default: back to the page it started on.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pack">
        
      </a>
      
       <code>
        pack?
      </code>
    </td>
    
    <td>
      <a href="#pricingsuccessurl">
        <code>
          PricingSuccessUrl
        </code>
      </a>
      
      <<a href="#pricedpack">
        <code>
          PricedPack
        </code>
      </a>
      
      >
    </td>
    
    <td>
      A credit pack's checkout. Default: back to the page it started on.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UsePricingOptions

Defined in: [src/runtime/vue/composables/use-pricing.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts)

Options for [usePricing](#usepricing).

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="api">
        
      </a>
      
       <code>
        api?
      </code>
    </td>
    
    <td>
      { <code>
        getPricing?
      </code>
      
      : <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "query"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        currency?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        discount?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <a href="#pricing">
        <code>
          Pricing
        </code>
      </a>
      
      >; }
    </td>
    
    <td>
      Override the injected <code>
        api.billing.getPricing
      </code>
      
       reference.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        api.getPricing?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "query"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        currency?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        discount?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <a href="#pricing">
        <code>
          Pricing
        </code>
      </a>
      
      >
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency-3">
        
      </a>
      
       <code>
        currency?
      </code>
    </td>
    
    <td>
      <code>
        MaybeRefOrGetter
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The currency to show prices in, lower-case ISO 4217, over the visitor's: what a page that knows it passes (<code>
        'eur'
      </code>
      
      ). One the catalog does not price shows the catalog's own.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="discount">
        
      </a>
      
       <code>
        discount?
      </code>
    </td>
    
    <td>
      <code>
        MaybeRefOrGetter
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      A public promotion to show (<code>
        'launch'
      </code>
      
      ): its key, or its code as a campaign link carries it. Its terms come back as <code>
        promotion
      </code>
      
      , and each price and pack it applies to carries its <code>
        promotion
      </code>
      
       offer. A name that is no public promotion of the catalog shows none.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="server">
        
      </a>
      
       <code>
        server?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Read the pricing on the server too, so the page's HTML carries it (default <code>
        true
      </code>
      
      ). <code>
        false
      </code>
      
       reads it in the browser only, without holding up the page: for something that only sometimes needs it, like a banner that sits in a layout — and for a pricing page served from a cache or prerendered, whose HTML would carry the currency guessed for the request that rendered it to every visitor.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="enabled">
        
      </a>
      
       <code>
        enabled?
      </code>
    </td>
    
    <td>
      <code>
        MaybeRefOrGetter
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      While this is <code>
        false
      </code>
      
       the pricing is not read, nor kept live (default <code>
        true
      </code>
      
      ): for something that needs it only some of the time, like a banner that shows only while the balance is low.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="successurl">
        
      </a>
      
       <code>
        successUrl?
      </code>
    </td>
    
    <td>
      <a href="#pricingsuccessurls">
        <code>
          PricingSuccessUrls
        </code>
      </a>
    </td>
    
    <td>
      Where a checkout returns once paid, per kind: a plan's to a welcome page, a pack's to the credits, say. A path is on the site. Read by <code>
        bind.planAction
      </code>
      
      's checkout and answered by <code>
        successUrlFor
      </code>
      
       for a checkout of your own. Default: back to the page it started on.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UsePricingReturn

Defined in: [src/runtime/vue/composables/use-pricing.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts)

What [usePricing](#usepricing) returns.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="plans-1">
        
      </a>
      
       <code>
        plans
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#pricedplan">
        <code>
          PricedPlan
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The plans, in catalog order, retired ones included and marked (their subscribers still see their card): <code>
        undefined
      </code>
      
       until the pricing loads.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="packs-1">
        
      </a>
      
       <code>
        packs
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#pricedpack">
        <code>
          PricedPack
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The credit packs on sale, in catalog order: <code>
        undefined
      </code>
      
       until the pricing loads.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="intervals">
        
      </a>
      
       <code>
        intervals
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="https://nuxt-backend.dev/docs/reference/api/billing#cataloginterval">
        <code>
          CatalogInterval
        </code>
      </a>
      
      <span>
        
      </span>
      
      >
    </td>
    
    <td>
      The intervals a plan on sale is priced at by a price that still sells, monthly first: what a monthly / yearly switch offers.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency-4">
        
      </a>
      
       <code>
        currency
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The currency the prices are in: the one chosen (<code>
        setCurrency
      </code>
      
      , a <code>
        ?currency=
      </code>
      
       in the address, the <code>
        currency
      </code>
      
       option), else the visitor's — from the country their request comes from, else their language's region — when the catalog prices it, else the catalog's own. <code>
        undefined
      </code>
      
       until the pricing loads.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currencies-1">
        
      </a>
      
       <code>
        currencies
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        string
      </code>
      
      <span>
        
      </span>
      
      >
    </td>
    
    <td>
      Every currency the catalog prices in, its own first: what a currency switch offers.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="promotion-3">
        
      </a>
      
       <code>
        promotion
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#pricedpromotion">
        <code>
          PricedPromotion
        </code>
      </a>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The promotion asked for (<code>
        discount
      </code>
      
      ) with its real terms and dates; <code>
        undefined
      </code>
      
       without one, whether it runs now or not: <code>
        activePromotion
      </code>
      
       is the one that does.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="activepromotion">
        
      </a>
      
       <code>
        activePromotion
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#pricedpromotion">
        <code>
          PricedPromotion
        </code>
      </a>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The promotion asked for, while it runs: from its <code>
        startsAt
      </code>
      
       to its <code>
        endsAt
      </code>
      
      , by the page's clock — the moment the page rendered on the server while the browser hydrates it, so the server's HTML and the hydration agree on it, then the browser's own time once the page is on screen, and the time a client-side visit enters the page at. <code>
        undefined
      </code>
      
       before it starts, after it ends, and without one.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="requested">
        
      </a>
      
       <code>
        requested
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The plan the address asks for (<code>
        ?plan=<key>
      </code>
      
      , as <code>
        <UpgradePrompt>
      </code>
      
       links to it), when the pricing has a plan by that key: the card to mark and bring into view. <code>
        undefined
      </code>
      
       without one.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="successurlfor">
        
      </a>
      
       <code>
        successUrlFor
      </code>
    </td>
    
    <td>
      (<code>
        kind
      </code>
      
      , <code>
        key
      </code>
      
      ) => <code>
        string
      </code>
      
       | <code>
        undefined
      </code>
    </td>
    
    <td>
      Where a checkout of this kind returns, as an absolute URL on the site: the <code>
        successUrl
      </code>
      
       option's for it, else <code>
        undefined
      </code>
      
       (the checkout's own default, the current page). Pass it as <code>
        checkout
      </code>
      
      's <code>
        successUrl
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="launched-1">
        
      </a>
      
       <code>
        launched
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      Whether billing sells on this deployment yet: <code>
        false
      </code>
      
       on a production deployment whose billing is not launched (no provider token, or no production catalog), where <code>
        <PricingTable>
      </code>
      
       reads "Plans open soon" and every checkout is refused (<code>
        unavailable
      </code>
      
      , reason <code>
        not_launched
      </code>
      
      ). Hide your own pricing and gift links on it. <code>
        undefined
      </code>
      
       until the pricing loads; a backend older than 0.3 reads as launched.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="welcome-1">
        
      </a>
      
       <code>
        welcome
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        Omit
      </code>
      
      <<a href="#pricedcredits">
        <code>
          PricedCredits
        </code>
      </a>
      
      , <code>
        "rollover"
      </code>
      
      > | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The free plan's welcome credits: what each person gets once (<code>
        credits: { once: true }
      </code>
      
       in the catalog), with the meter's unit. <code>
        undefined
      </code>
      
       while the pricing loads, or when the catalog grants none.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="setcurrency">
        
      </a>
      
       <code>
        setCurrency
      </code>
    </td>
    
    <td>
      (<code>
        currency
      </code>
      
      ) => <code>
        void
      </code>
    </td>
    
    <td>
      Show the prices in another currency, for this visit; a checkout from the pricing table pays in it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isloading">
        
      </a>
      
       <code>
        isLoading
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       until the pricing has loaded (<code>
        false
      </code>
      
       once the read failed, and while it is not enabled).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="error">
        
      </a>
      
       <code>
        error
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      < | <a href="https://nuxt-backend.dev/docs/reference/api/functions#backenderror">
        <code>
          BackendError
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      Why the pricing could not be read, else <code>
        null
      </code>
      
      . The read never throws.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="packfor">
        
      </a>
      
       <code>
        packFor
      </code>
    </td>
    
    <td>
      (<code>
        units
      </code>
      
      , <code>
        meter?
      </code>
      
      ) => <a href="#pricedpack">
        <code>
          PricedPack
        </code>
      </a>
      
       | <code>
        undefined
      </code>
    </td>
    
    <td>
      The pack to offer someone short of <code>
        units
      </code>
      
       credits: the smallest that covers them, else the largest there is — on <code>
        meter
      </code>
      
       when one is named. <code>
        undefined
      </code>
      
       while the pricing loads, or with no pack on that meter. What an <code>
        insufficient_credits
      </code>
      
       refusal's call to action preselects (<code>
        need - balance
      </code>
      
      ), and the low-credits notice too.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="refresh">
        
      </a>
      
       <code>
        refresh
      </code>
    </td>
    
    <td>
      () => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Read the pricing again. It is live already; this is for a retry after a failure.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="checkout">
        
      </a>
      
       <code>
        checkout
      </code>
    </td>
    
    <td>
      (<code>
        kind
      </code>
      
      , <code>
        key
      </code>
      
      , <code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        string
      </code>
      
      >
    </td>
    
    <td>
      Check a plan out, at the price its card shows (the <code>
        interval
      </code>
      
       shown, else the one it sells at), or a credit pack, the way <code>
        <PricingTable>
      </code>
      
       does: with the address's campaign (<code>
        useCampaign
      </code>
      
      ), the promotion this pricing shows (<code>
        discount
      </code>
      
      ) in the place of the campaign link's code on a price it is offered on, one discount per checkout, and, when the server refuses that discount, once more without it, so a dead code never blocks the purchase; in the currency the price shows in where the catalog prices more than one; back where <code>
        successUrl
      </code>
      
       says. A plan's promotion is not offered to a paying subscriber, whose plan changes rather than checks out (<code>
        usePlanChange
      </code>
      
      ). <code>
        options
      </code>
      
       go with it, over what it picks; a discount of their own goes in the campaign's place. Resolves the checkout's URL, opened in this tab unless <code>
        options
      </code>
      
       say <code>
        redirect: false
      </code>
      
      . Rejects with what the call threw, and as <code>
        invalid_input
      </code>
      
       (<code>
        field
      </code>
      
       <code>
        plan
      </code>
      
       or <code>
        pack
      </code>
      
      ) for a key nothing on sale has. A visitor signs in first: <code>
        bind.planAction
      </code>
      
       takes them there.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="structureddata">
        
      </a>
      
       <code>
        structuredData
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        unknown
      </code>
      
      > | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The plans and packs on sale as schema.org <code>
        Product
      </code>
      
      s with an <code>
        Offer
      </code>
      
       per price, for a <code>
        <script type="application/ld+json">
      </code>
      
       of a pricing page of your own: each price in the currency's main unit with its own digits (19.99 USD, 1999 JPY), a plan's with its billing period. A retired plan and an archived price are left out, since nobody new can buy them. What the packaged <code>
        /pricing
      </code>
      
       page carries with an SEO module installed. <code>
        undefined
      </code>
      
       until the pricing loads.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="interval-1">
        
      </a>
      
       <code>
        interval
      </code>
    </td>
    
    <td>
      <code>
        Ref
      </code>
      
      <<a href="https://nuxt-backend.dev/docs/reference/api/billing#cataloginterval">
        <code>
          CatalogInterval
        </code>
      </a>
      
      >
    </td>
    
    <td>
      The interval the plans show: the address's <code>
        ?interval=
      </code>
      
       when a plan sells at it, else monthly when a plan is priced by the month, until <code>
        setInterval
      </code>
      
       picks another.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="setinterval">
        
      </a>
      
       <code>
        setInterval
      </code>
    </td>
    
    <td>
      (<code>
        interval
      </code>
      
      ) => <code>
        void
      </code>
    </td>
    
    <td>
      Show the plans at another interval.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pending">
        
      </a>
      
       <code>
        pending
      </code>
    </td>
    
    <td>
      <code>
        Ref
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      The key of the plan whose action runs (checkout or a plan change), else <code>
        null
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="bind">
        
      </a>
      
       <code>
        bind
      </code>
    </td>
    
    <td>
      <a href="#pricingbindings">
        <code>
          PricingBindings
        </code>
      </a>
    </td>
    
    <td>
      Attribute and handler bags for markup of your own: <code>
        periodSwitch
      </code>
      
      , <code>
        planCard(plan)
      </code>
      
      , <code>
        planAction(plan)
      </code>
      
       and <code>
        packCard(pack)
      </code>
      
      . Spread each with <code>
        v-bind
      </code>
      
      ; they carry the accessibility attributes and the actions the packaged table has. <code>
        planAction
      </code>
      
       asks nothing first: a subscriber's press switches at once with <code>
        proration: 'invoice'
      </code>
      
      , the switch <code>
        useBilling().changeOf
      </code>
      
       describes and the packaged confirmations make, so a step of your own before it can say what it does; a gifted plan's holder checks the plan out, which ends the gift.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts" rel="nofollow">
        src/runtime/vue/composables/use-pricing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PricingBindings

Defined in: [src/runtime/vue/utils/pricing-bindings.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/utils/pricing-bindings.ts)

The attribute and handler bags `usePricing().bind` holds.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Modifier
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="periodswitch">
        
      </a>
      
       <code>
        periodSwitch
      </code>
    </td>
    
    <td>
      <code>
        readonly
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        unknown
      </code>
      
      >
    </td>
    
    <td>
      A monthly / yearly toggle: <code>
        role="switch"
      </code>
      
      , <code>
        aria-checked
      </code>
      
       on yearly, and the click that flips it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/utils/pricing-bindings.ts" rel="nofollow">
        src/runtime/vue/utils/pricing-bindings.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="plancard">
        
      </a>
      
       <code>
        planCard
      </code>
    </td>
    
    <td>
      <code>
        public
      </code>
    </td>
    
    <td>
      (<code>
        plan
      </code>
      
      ) => <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        unknown
      </code>
      
      >
    </td>
    
    <td>
      One plan's container: <code>
        role="group"
      </code>
      
      , named by the plan, so a row of the same buttons reads apart.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/utils/pricing-bindings.ts" rel="nofollow">
        src/runtime/vue/utils/pricing-bindings.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="planaction">
        
      </a>
      
       <code>
        planAction
      </code>
    </td>
    
    <td>
      <code>
        public
      </code>
    </td>
    
    <td>
      (<code>
        plan
      </code>
      
      ) => <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        unknown
      </code>
      
      >
    </td>
    
    <td>
      The plan's button: checkout, or a plan change for a subscriber, or the sign-in page for a visitor; <code>
        aria-disabled
      </code>
      
       while it opens, and hidden from a member who manages no billing.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/utils/pricing-bindings.ts" rel="nofollow">
        src/runtime/vue/utils/pricing-bindings.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="packcard">
        
      </a>
      
       <code>
        packCard
      </code>
    </td>
    
    <td>
      <code>
        public
      </code>
    </td>
    
    <td>
      (<code>
        pack
      </code>
      
      ) => <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        unknown
      </code>
      
      >
    </td>
    
    <td>
      One credit pack's container: <code>
        role="group"
      </code>
      
      , named by the pack.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/utils/pricing-bindings.ts" rel="nofollow">
        src/runtime/vue/utils/pricing-bindings.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

## Type Aliases

### PricingInterval

```ts
type PricingInterval = CatalogInterval;
```

Defined in: [src/runtime/vue/composables/use-pricing.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts)

A billing interval a plan is priced at.

---

### PricingSuccessUrl

```ts
type PricingSuccessUrl<Item> = string | ((item) => string);
```

Defined in: [src/runtime/vue/composables/use-pricing.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts)

Where a checkout returns once paid: a path on the site (`/settings`) or a
full URL on its own origin, or a function of what was bought that answers
one (`plan => '/welcome?plan=' + plan.key`).

#### Type Parameters

<table>
<thead>
  <tr>
    <th>
      Type Parameter
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="type-parameter-item">
        
      </a>
      
       <code>
        Item
      </code>
    </td>
  </tr>
</tbody>
</table>

## Functions

### usePricing()

```ts
function usePricing(options?): UsePricingReturn;
```

Defined in: [src/runtime/vue/composables/use-pricing.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-pricing.ts)

The app's plans and credit packs as a pricing page shows them — every
plan with its monthly and yearly price, what a year saves, its trial and
the credits it grants per cycle; every pack with its price per credit and
which is the best value — read through the scaffolded `getPricing`, in
the visitor's currency where the catalog prices it. The figures are the
live products' (`billing sync` loads them), never a copy in the page.

Rendered on the server: the first read rides in the page's payload, so
`/pricing` arrives with its prices for a visitor and a crawler alike, and
the read then stays live. It is public — the same for everyone, signed in
or not.

#### Parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#usepricingoptions">
        <code>
          UsePricingOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`UsePricingReturn`](#usepricingreturn)

#### Example

```vue
<script setup lang="ts">
const { plans, intervals } = usePricing()
const interval = ref<'month' | 'year'>('month')
</script>
<template>
  <article v-for="plan in plans?.filter(plan => !plan.retired)" :key="plan.key">
    <h3>{{ plan.name }}</h3>
    <p v-if="plan.prices[interval]">{{ formatBillingAmount(plan.prices[interval].amount, plan.prices[interval].currency) }}</p>
  </article>
</template>
```


## Sitemap

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