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

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

### CancelFlowState

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

What `getCancelFlow` reads before the cancel flow asks its question: the
reasons whose save offer could stand for the subscription now, and
`offers`, whether any could. None inside the withdrawal period, on a
past-due plan or a trial, after an offer in the last 12 months, or with
none configured: "Continue" would then cancel at once, so the flow says
"Cancel my plan" and asks to confirm instead.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="offers">
        
      </a>
      
       <code>
        offers
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="reasons">
        
      </a>
      
       <code>
        reasons
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/api/billing#cancellationreason">
        <code>
          CancellationReason
        </code>
      </a>
      
      <span>
        
      </span>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### WithdrawalPeriod

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

A purchase and its withdrawal period, as `getWithdrawal` reads it: what `<WithdrawalButton>` shows until `endsAt`.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="subscriptionid">
        
      </a>
      
       <code>
        subscriptionId
      </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/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="plan">
        
      </a>
      
       <code>
        plan
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      The plan's catalog key, <code>
        null
      </code>
      
       for a product the catalog does not name.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="startedat">
        
      </a>
      
       <code>
        startedAt
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      When the plan was bought, epoch ms: its checkout's confirmed renewal consent, else the subscription's start.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="endsat">
        
      </a>
      
       <code>
        endsAt
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      When the withdrawal period ends, epoch ms: 14 days after the purchase. The period is open until then.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### BillingPage

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

A page of provider records. The provider paginates by page number (not
cursor), so `pagination` carries the totals rather than a next token.

#### Type Parameters

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

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

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="items">
        
      </a>
      
       <code>
        items
      </code>
    </td>
    
    <td>
      <code>
        Item
      </code>
      
      <span>
        
      </span>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pagination">
        
      </a>
      
       <code>
        pagination?
      </code>
    </td>
    
    <td>
      { <code>
        totalCount
      </code>
      
      : <code>
        number
      </code>
      
      ; <code>
        maxPage
      </code>
      
      : <code>
        number
      </code>
      
      ; }
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pagination.totalCount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pagination.maxPage
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PendingPlanChange

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

A plan change scheduled for the start of the next period. Seats are
deliberately absent: this package does not do per-seat billing.

#### 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>
      The product the subscription switches to.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="appliesat">
        
      </a>
      
       <code>
        appliesAt
      </code>
    </td>
    
    <td>
      <code>
        Date
      </code>
    </td>
    
    <td>
      When the change takes effect.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PlanChangePreview

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

What a plan change would do, before it is made ([UseBillingReturn.changeOf](#changeof)):
when it takes effect, how the current period's difference is settled,
and the rule that decided it. The same rule the server applies
(`billing.updateSubscription`), for a switch made with
`changePlan(productId, { proration: 'invoice' })`, the one the packaged
confirmations make, so a confirmation of your own that switches the same
way says what the switch will do. A `changePlan` without `proration`
settles by the organization's default instead, which may defer the
charge to the next invoice or schedule the switch for the period's end.

#### 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-1">
        
      </a>
      
       <code>
        productId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The product the subscription would switch to.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="plan-1">
        
      </a>
      
       <code>
        plan?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Its plan's catalog key (<code>
        'team'
      </code>
      
      ; a yearly price reads as its plan's key), when the catalog names it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="interval">
        
      </a>
      
       <code>
        interval?
      </code>
    </td>
    
    <td>
      <a href="#planchangeinterval">
        <code>
          PlanChangeInterval
        </code>
      </a>
    </td>
    
    <td>
      The interval it bills at, when known.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="frominterval">
        
      </a>
      
       <code>
        fromInterval?
      </code>
    </td>
    
    <td>
      <a href="#planchangeinterval">
        <code>
          PlanChangeInterval
        </code>
      </a>
    </td>
    
    <td>
      The interval the subscription bills at now, when known.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="applies">
        
      </a>
      
       <code>
        applies
      </code>
    </td>
    
    <td>
      <code>
        "now"
      </code>
      
       | <code>
        "period_end"
      </code>
    </td>
    
    <td>
      <code>
        'now'
      </code>
      
      : the subscription moves at once. <code>
        'period_end'
      </code>
      
      : the change is scheduled for the end of the current period and reads back as <code>
        pendingChange
      </code>
      
       until then.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="appliesat-1">
        
      </a>
      
       <code>
        appliesAt
      </code>
    </td>
    
    <td>
      <code>
        Date
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      When a scheduled change takes effect (the current period's end); <code>
        null
      </code>
      
       for one made at once, or while the period's end is not known.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="proration">
        
      </a>
      
       <code>
        proration
      </code>
    </td>
    
    <td>
      <code>
        "now"
      </code>
      
       | <code>
        "none"
      </code>
    </td>
    
    <td>
      How the switch is settled. <code>
        'now'
      </code>
      
      : money changes hands at once — the current period's difference, prorated, is charged or credited; during a trial, the new plan's first period is charged, as a switch to a plan with no trial (or a shorter one, already over) ends the trial. <code>
        'none'
      </code>
      
      : nothing is settled now — the change waits for the period's end and the new price is charged from the renewal on, or, during a trial, the trial carries over to the new plan and nothing is charged until it ends.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="trial">
        
      </a>
      
       <code>
        trial
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while the subscription is in its trial: the switch then settles no difference, and <code>
        proration
      </code>
      
       says whether the trial carries over (<code>
        'none'
      </code>
      
      ) or ends with a charge (<code>
        'now'
      </code>
      
      ). A change that waits applies when the trial ends.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="rule">
        
      </a>
      
       <code>
        rule
      </code>
    </td>
    
    <td>
      <code>
        "paid_year"
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      Why it waits, when it does: <code>
        'paid_year'
      </code>
      
       for a yearly price left for a monthly one, which runs out the year paid for (that price granted the year's credits up front). <code>
        null
      </code>
      
       for a change made at once.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### EntitlementBenefit

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

A granted benefit — the unit of feature-gating (`useFeatures().has()`).

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="id">
        
      </a>
      
       <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The grant's id.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="benefitid">
        
      </a>
      
       <code>
        benefitId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="type">
        
      </a>
      
       <code>
        type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The provider's own benefit type; <code>
        kind
      </code>
      
       says the same in neutral words.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="kind">
        
      </a>
      
       <code>
        kind?
      </code>
    </td>
    
    <td>
      <a href="#benefitkind">
        <code>
          BenefitKind
        </code>
      </a>
    </td>
    
    <td>
      What the benefit gives (see <a href="#benefitkind">
        BenefitKind
      </a>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="name">
        
      </a>
      
       <code>
        name?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The benefit's name, as the provider lists it to the customer. Absent until the benefit was read once.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="grantedat">
        
      </a>
      
       <code>
        grantedAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      When it was granted (epoch ms).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="licensekey">
        
      </a>
      
       <code>
        licenseKey?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A license key's display key: masked but for its last characters. The whole key is in the billing portal.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="files">
        
      </a>
      
       <code>
        files?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      How many files a download benefit grants; the files are in the billing portal.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="repository">
        
      </a>
      
       <code>
        repository?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The repository a repository benefit opens, as <code>
        owner/name
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="metadata">
        
      </a>
      
       <code>
        metadata?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        string
      </code>
      
       | <code>
        number
      </code>
      
       | <code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      The benefit's live provider metadata (not the grant-time snapshot). Set a stable <code>
        key
      </code>
      
       here (e.g. <code>
        { key: 'premium' }
      </code>
      
      ) to gate on it: <code>
        useFeatures().has('premium')
      </code>
      
       and <code>
        billing.requireFeature
      </code>
      
       match the <code>
        key
      </code>
      
      , else the benefit id, and no other value.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### EntitlementMeter

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

A prepaid credit-meter balance (`useCredits()`).

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="meterid">
        
      </a>
      
       <code>
        meterId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="name-1">
        
      </a>
      
       <code>
        name?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The configured friendly name (<code>
        setupBilling({ credits })
      </code>
      
       / catalog key).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.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 the meter counts, when the catalog names its unit (<code>
        meters.<key>.unit
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="consumedunits">
        
      </a>
      
       <code>
        consumedUnits
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="creditedunits">
        
      </a>
      
       <code>
        creditedUnits
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="balance">
        
      </a>
      
       <code>
        balance
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="cyclestart">
        
      </a>
      
       <code>
        cycleStart?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      The granting subscription's current period (epoch ms), when it has one — a meter has no period of its own in the provider's model, and one bought as a one-time credit pack has no cycle at all.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="cycleend">
        
      </a>
      
       <code>
        cycleEnd?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="rollover">
        
      </a>
      
       <code>
        rollover?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether unspent credited units carry into the next cycle. Only known on the syncs that re-read the granting benefit, so <code>
        undefined
      </code>
      
       means "not said", never "no".
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### Features

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

Feature-gating state for the current user, as returned by `getFeatures`.

#### 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>
      <code>
        string
      </code>
      
      <span>
        
      </span>
    </td>
    
    <td>
      Active product ids the user is subscribed to.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="benefits">
        
      </a>
      
       <code>
        benefits
      </code>
    </td>
    
    <td>
      <a href="#entitlementbenefit">
        <code>
          EntitlementBenefit
        </code>
      </a>
      
      <span>
        
      </span>
    </td>
    
    <td>
      Granted benefits.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="quotas">
        
      </a>
      
       <code>
        quotas?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <a href="https://nuxt-backend.dev/docs/reference/api/use-features#quotausage">
        <code>
          QuotaUsage
        </code>
      </a>
      
      >
    </td>
    
    <td>
      Every quota the catalog declares or a grant names, by key. Absent from a backend older than plan quotas. Experimental.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### Credits

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

Prepaid credit balances for the current user, as returned by `getCredits`.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="meters">
        
      </a>
      
       <code>
        meters
      </code>
    </td>
    
    <td>
      <a href="#entitlementmeter">
        <code>
          EntitlementMeter
        </code>
      </a>
      
      <span>
        
      </span>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### CheckoutPrefill

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

Pre-filled customer details for a checkout session (all still editable).

#### Properties

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

<tbody>
  <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/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="email">
        
      </a>
      
       <code>
        email?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="billingname">
        
      </a>
      
       <code>
        billingName?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The name that should appear on the invoice, when it differs from <code>
        name
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="billingaddress">
        
      </a>
      
       <code>
        billingAddress?
      </code>
    </td>
    
    <td>
      { <code>
        country
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        line1?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        line2?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        postalCode?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        city?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        state?
      </code>
      
      : <code>
        string
      </code>
      
      ; }
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billingAddress.country
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      ISO 3166-1 alpha-2 country code — the one field the provider requires.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billingAddress.line1?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billingAddress.line2?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billingAddress.postalCode?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billingAddress.city?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billingAddress.state?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="taxid">
        
      </a>
      
       <code>
        taxId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      VAT / tax identification number.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="business">
        
      </a>
      
       <code>
        business?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Bill a business: the provider then requires a full address and name.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### CampaignAttribution

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

Campaign attribution, as a campaign link's UTM parameters: stored on the
order or subscription as `utm_*` metadata, each value cut to 100
characters.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="source">
        
      </a>
      
       <code>
        source?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="medium">
        
      </a>
      
       <code>
        medium?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="campaign">
        
      </a>
      
       <code>
        campaign?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="term">
        
      </a>
      
       <code>
        term?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="content">
        
      </a>
      
       <code>
        content?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### BillingApi

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

The billing function references — the result of `setupBilling().api` re-exported
from your `backend/billing.ts` (plus the optional `getCurrentSubscription`
query). Supplied automatically from the injected `api.billing` namespace;
pass `options.api` to override.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="getconfiguredproducts">
        
      </a>
      
       <code>
        getConfiguredProducts?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      <<code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <a href="#billingproduct">
        <code>
          BillingProduct
        </code>
      </a>
      
       | <code>
        undefined
      </code>
      
      >>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="listallsubscriptions">
        
      </a>
      
       <code>
        listAllSubscriptions?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      <<a href="#billingsubscription">
        <code>
          BillingSubscription
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getcurrentsubscription">
        
      </a>
      
       <code>
        getCurrentSubscription?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      <<a href="#billingsubscription">
        <code>
          BillingSubscription
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="generatecheckoutlink">
        
      </a>
      
       <code>
        generateCheckoutLink?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , <a href="#checkoutargs">
        <code>
          CheckoutArgs
        </code>
      </a>
      
      , { <code>
        url
      </code>
      
      : <code>
        string
      </code>
      
      ; }>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="generatecustomerportalurl">
        
      </a>
      
       <code>
        generateCustomerPortalUrl?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        returnUrl?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, { <code>
        url
      </code>
      
      : <code>
        string
      </code>
      
      ; }>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="updatesubscription">
        
      </a>
      
       <code>
        updateSubscription?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        subscriptionId?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        productId?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        proration?
      </code>
      
      : <a href="#clientprorationbehavior">
        <code>
          ClientProrationBehavior
        </code>
      </a>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="cancelsubscription">
        
      </a>
      
       <code>
        cancelSubscription?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        subscriptionId?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        atPeriodEnd?
      </code>
      
      : <code>
        boolean
      </code>
      
      ; <code>
        reason?
      </code>
      
      : <a href="#cancellationreason">
        <code>
          CancellationReason
        </code>
      </a>
      
      ; <code>
        comment?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        offer?
      </code>
      
      : <code>
        false
      </code>
      
      ; }, <a href="#canceloutcome">
        <code>
          CancelOutcome
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getcancelflow">
        
      </a>
      
       <code>
        getCancelFlow?
      </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>
        subscriptionId?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <a href="#cancelflowstate">
        <code>
          CancelFlowState
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="acceptsaveoffer">
        
      </a>
      
       <code>
        acceptSaveOffer?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        offerId
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getwithdrawal">
        
      </a>
      
       <code>
        getWithdrawal?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      < | { <code>
        period
      </code>
      
      : <a href="#withdrawalperiod">
        <code>
          WithdrawalPeriod
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      ; } | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="withdraw">
        
      </a>
      
       <code>
        withdraw?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        subscriptionId?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, { <code>
        withdrawnAt
      </code>
      
      : <code>
        number
      </code>
      
      ; }>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="uncancelsubscription">
        
      </a>
      
       <code>
        uncancelSubscription?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        subscriptionId?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="cancelpendingchange">
        
      </a>
      
       <code>
        cancelPendingChange?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        subscriptionId?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pausesubscription">
        
      </a>
      
       <code>
        pauseSubscription?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        subscriptionId?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        resumesAt?
      </code>
      
      : <code>
        number
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="resumesubscription">
        
      </a>
      
       <code>
        resumeSubscription?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        subscriptionId?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getorders">
        
      </a>
      
       <code>
        getOrders?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , <a href="#ordersargs">
        <code>
          OrdersArgs
        </code>
      </a>
      
      , | <a href="#billingpage">
        <code>
          BillingPage
        </code>
      </a>
      
      <<a href="#billingorder">
        <code>
          BillingOrder
        </code>
      </a>
      
      > | <a href="#billingorder">
        <code>
          BillingOrder
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getinvoiceurl">
        
      </a>
      
       <code>
        getInvoiceUrl?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        orderId
      </code>
      
      : <code>
        string
      </code>
      
      ; }, | { <code>
        url
      </code>
      
      : <code>
        string
      </code>
      
      ; } | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getusagehistory">
        
      </a>
      
       <code>
        getUsageHistory?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , <a href="#usageargs">
        <code>
          UsageArgs
        </code>
      </a>
      
      , | <a href="#billingpage">
        <code>
          BillingPage
        </code>
      </a>
      
      <<a href="#usageevent">
        <code>
          UsageEvent
        </code>
      </a>
      
      > | <a href="#usageevent">
        <code>
          UsageEvent
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getfeatures">
        
      </a>
      
       <code>
        getFeatures?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      <<a href="#features">
        <code>
          Features
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getcredits">
        
      </a>
      
       <code>
        getCredits?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      <<a href="#credits">
        <code>
          Credits
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getbillingaccess">
        
      </a>
      
       <code>
        getBillingAccess?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      < | { <code>
        canManage
      </code>
      
      : <code>
        boolean
      </code>
      
      ; } | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="syncentitlements">
        
      </a>
      
       <code>
        syncEntitlements?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        checkoutId?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="giftcheckout">
        
      </a>
      
       <code>
        giftCheckout?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , <a href="#giftcheckoutargs">
        <code>
          GiftCheckoutArgs
        </code>
      </a>
      
      , { <code>
        url
      </code>
      
      : <code>
        string
      </code>
      
      ; }>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getreceivedgifts">
        
      </a>
      
       <code>
        getReceivedGifts?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      <<a href="#receivedgift">
        <code>
          ReceivedGift
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="claimgift">
        
      </a>
      
       <code>
        claimGift?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        giftId
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        successUrl?
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        workspaceId?
      </code>
      
      : <code>
        string
      </code>
      
      ; }, { <code>
        url
      </code>
      
      : <code>
        string
      </code>
      
       | <code>
        null
      </code>
      
      ; }>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="getsentgifts">
        
      </a>
      
       <code>
        getSentGifts?
      </code>
    </td>
    
    <td>
      <code>
        Query
      </code>
      
      <<a href="#sentgift">
        <code>
          SentGift
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="resendgift">
        
      </a>
      
       <code>
        resendGift?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        giftId
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="changegiftrecipient">
        
      </a>
      
       <code>
        changeGiftRecipient?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        giftId
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        recipientEmail
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="reschedulegift">
        
      </a>
      
       <code>
        rescheduleGift?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        giftId
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        deliverAt
      </code>
      
      : <code>
        number
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="cancelgift">
        
      </a>
      
       <code>
        cancelGift?
      </code>
    </td>
    
    <td>
      <a href="https://docs.convex.dev/api/modules/server#functionreference" rel="nofollow">
        <code>
          FunctionReference
        </code>
      </a>
      
      <<code>
        "action"
      </code>
      
      , <code>
        "public"
      </code>
      
      , { <code>
        giftId
      </code>
      
      : <code>
        string
      </code>
      
      ; }, <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### ReceivedGift

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

A gift addressed to the current user (`getReceivedGifts` shape): paid and
claimed ones only, with the sender's name but never their email or a
billing id.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="id-1">
        
      </a>
      
       <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="purchasername">
        
      </a>
      
       <code>
        purchaserName?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The sender's name, at most 40 characters with no links.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pack-1">
        
      </a>
      
       <code>
        pack?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The credit pack's catalog key.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="plan-3">
        
      </a>
      
       <code>
        plan?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      For a plan pass, the plan's catalog key and how many months it lasts.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="months-1">
        
      </a>
      
       <code>
        months?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="productids-1">
        
      </a>
      
       <code>
        productIds
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
      <span>
        
      </span>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="message-1">
        
      </a>
      
       <code>
        message?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The sender's plain-text message, shown only inside the app.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="status">
        
      </a>
      
       <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        'paid'
      </code>
      
       (claimable) → <code>
        'claimed'
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="createdat">
        
      </a>
      
       <code>
        createdAt
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="paidat">
        
      </a>
      
       <code>
        paidAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="deliveredat">
        
      </a>
      
       <code>
        deliveredAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      When the gift was delivered: from then it is listed and claimable.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="claimedat">
        
      </a>
      
       <code>
        claimedAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### GiftedPass

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

A plan pass a workspace holds: gifted until `endsAt`, with no card and no renewal.

#### 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-4">
        
      </a>
      
       <code>
        plan
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The plan's catalog key.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="months-2">
        
      </a>
      
       <code>
        months?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      How many months it was given for.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="startedat-1">
        
      </a>
      
       <code>
        startedAt
      </code>
    </td>
    
    <td>
      <code>
        Date
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="endsat-1">
        
      </a>
      
       <code>
        endsAt
      </code>
    </td>
    
    <td>
      <code>
        Date
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="trial-1">
        
      </a>
      
       <code>
        trial?
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      A reverse trial's pass: the workspace started on it, nobody gave it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### SentGift

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

A gift the current user sent (`getSentGifts` shape): what it is, who it
goes to, and where it stands. Never a billing id.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="id-2">
        
      </a>
      
       <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="item">
        
      </a>
      
       <code>
        item
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The gift's catalog key: the pack's, or the plan's for a pass.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="plan-5">
        
      </a>
      
       <code>
        plan?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      For a plan pass, the plan and its length in months.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="months-3">
        
      </a>
      
       <code>
        months?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="recipientemail-1">
        
      </a>
      
       <code>
        recipientEmail
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="message-2">
        
      </a>
      
       <code>
        message?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="status-1">
        
      </a>
      
       <code>
        status
      </code>
    </td>
    
    <td>
      <a href="#sentgiftstatus">
        <code>
          SentGiftStatus
        </code>
      </a>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="createdat-1">
        
      </a>
      
       <code>
        createdAt
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="deliverat-1">
        
      </a>
      
       <code>
        deliverAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      The date the notice goes out (the payment's own moment when no date was chosen).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="paidat-1">
        
      </a>
      
       <code>
        paidAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="deliveredat-1">
        
      </a>
      
       <code>
        deliveredAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="claimedat-1">
        
      </a>
      
       <code>
        claimedAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### CheckoutOptions

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

Per-call checkout overrides for [UseBillingReturn.checkout](#checkout). The
trial is the plan's own (the catalog's `trial`): a different one, a
promotion without a code, or a discount by id, is the server's choice —
see `billing.checkout`.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="subscriptionid-2">
        
      </a>
      
       <code>
        subscriptionId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="metadata-3">
        
      </a>
      
       <code>
        metadata?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        string
      </code>
      
      >
    </td>
    
    <td>
      Your own keys: the server refuses the ones the package reads back.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="locale-1">
        
      </a>
      
       <code>
        locale?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency-2">
        
      </a>
      
       <code>
        currency?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The currency to pay in, lower-case ISO 4217: one the catalog prices the product in (<code>
        usePricing().currencies
      </code>
      
      ); the server refuses any other as <code>
        invalid_input
      </code>
      
       (<code>
        currency
      </code>
      
      ). Omit for the catalog's own.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="successurl-2">
        
      </a>
      
       <code>
        successUrl?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Where checkout returns the customer afterwards, on the site's own origin. Defaults to the current URL.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="redirect">
        
      </a>
      
       <code>
        redirect?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Open in the same tab instead of a new one (redirect checkout).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="prefill-1">
        
      </a>
      
       <code>
        prefill?
      </code>
    </td>
    
    <td>
      <a href="#checkoutprefill">
        <code>
          CheckoutPrefill
        </code>
      </a>
    </td>
    
    <td>
      Pre-filled customer details — defaults the customer can still change.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="customfields-1">
        
      </a>
      
       <code>
        customFields?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        string
      </code>
      
       | <code>
        number
      </code>
      
       | <code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Values for the organization's custom checkout fields, keyed by field slug.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="requirebillingaddress-1">
        
      </a>
      
       <code>
        requireBillingAddress?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Require the full billing address, not just the country.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="allowdiscountcodes-1">
        
      </a>
      
       <code>
        allowDiscountCodes?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Let the customer type a discount code (default <code>
        true
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="discountcode-1">
        
      </a>
      
       <code>
        discountCode?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A discount code to apply up front — a campaign link's, say. The provider checks it like one the customer typed; one it refuses rejects the checkout as <code>
        invalid_input
      </code>
      
       (<code>
        discountCode
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="discount-1">
        
      </a>
      
       <code>
        discount?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A public promotion of the catalog to apply, by its key (<code>
        'launch'
      </code>
      
      ): a discount with a code, for a product it applies to. Any other key, or one the provider no longer redeems (ended, used up), rejects the checkout as <code>
        invalid_input
      </code>
      
       (<code>
        discount
      </code>
      
      ): check out again without it to sell at the regular price. Not beside <code>
        discountCode
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="utm-1">
        
      </a>
      
       <code>
        utm?
      </code>
    </td>
    
    <td>
      <a href="#campaignattribution">
        <code>
          CampaignAttribution
        </code>
      </a>
    </td>
    
    <td>
      Campaign attribution (a campaign link's UTM parameters), stored as <code>
        utm_*
      </code>
      
       metadata.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="emailoptout">
        
      </a>
      
       <code>
        emailOptOut?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      The EU soft opt-in's box, where your checkout shows one (<code>
        useBilling().softOptIn
      </code>
      
      ): <code>
        true
      </code>
      
       when the person ticked "Don't email me", <code>
        false
      </code>
      
       when they left it. Omit it where no box shows: the paid order then joins no topic.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseBillingOptions

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

#### 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>
      <a href="#billingapi">
        <code>
          BillingApi
        </code>
      </a>
    </td>
    
    <td>
      Override the injected <code>
        api.billing
      </code>
      
       namespace (or individual references).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### SubscriptionTargetOptions

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

Which subscription a lifecycle call acts on. Omit for the account's single
live subscription; required once the backend runs with
`multipleSubscriptions` and one account can hold several at a time (the ids
are on [UseBillingReturn.subscriptions](#subscriptions)).

#### Extended by

- [`ChangePlanOptions`](#changeplanoptions)
- [`CancelOptions`](#canceloptions)
- [`PauseOptions`](#pauseoptions)

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="subscriptionid-3">
        
      </a>
      
       <code>
        subscriptionId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### ChangePlanOptions

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

Per-call options for [UseBillingReturn.changePlan](#changeplan).

#### Extends

- [`SubscriptionTargetOptions`](#subscriptiontargetoptions)

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="subscriptionid-4">
        
      </a>
      
       <code>
        subscriptionId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="#subscriptiontargetoptions">
        <code>
          SubscriptionTargetOptions
        </code>
      </a>
      
      .<a href="#subscriptionid-3">
        <code>
          subscriptionId
        </code>
      </a>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="proration-1">
        
      </a>
      
       <code>
        proration?
      </code>
    </td>
    
    <td>
      <a href="#clientprorationbehavior">
        <code>
          ClientProrationBehavior
        </code>
      </a>
    </td>
    
    <td>
      How to settle the mid-period difference. Defaults to the provider setting. Client-selectable behaviours only — see <a href="#clientprorationbehavior">
        ClientProrationBehavior
      </a>
      
      .
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### CancelOptions

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

Per-call options for [UseBillingReturn.cancel](#cancel).

#### Extends

- [`SubscriptionTargetOptions`](#subscriptiontargetoptions)

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="subscriptionid-5">
        
      </a>
      
       <code>
        subscriptionId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="#subscriptiontargetoptions">
        <code>
          SubscriptionTargetOptions
        </code>
      </a>
      
      .<a href="#subscriptionid-3">
        <code>
          subscriptionId
        </code>
      </a>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="atperiodend">
        
      </a>
      
       <code>
        atPeriodEnd?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Keep access until the period the customer paid for ends (default <code>
        true
      </code>
      
      ). <code>
        false
      </code>
      
       revokes immediately — no refund is implied either way.
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="reason">
        
      </a>
      
       <code>
        reason?
      </code>
    </td>
    
    <td>
      <a href="#cancellationreason">
        <code>
          CancellationReason
        </code>
      </a>
    </td>
    
    <td>
      Churn reason, recorded on the subscription for the provider's analytics.
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="comment">
        
      </a>
      
       <code>
        comment?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The customer's own words. Visible to them in the provider's portal.
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="offer">
        
      </a>
      
       <code>
        offer?
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
      
       cancels now, past the save offer the reason may have (<code>
        setupBilling({ lifecycle: { saveOffers } })
      </code>
      
      ): "Cancel my plan" on the offer's screen.
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### PauseOptions

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

Per-call options for [UseBillingReturn.pause](#pause).

#### Extends

- [`SubscriptionTargetOptions`](#subscriptiontargetoptions)

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="subscriptionid-6">
        
      </a>
      
       <code>
        subscriptionId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="#subscriptiontargetoptions">
        <code>
          SubscriptionTargetOptions
        </code>
      </a>
      
      .<a href="#subscriptionid-3">
        <code>
          subscriptionId
        </code>
      </a>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="resumesat">
        
      </a>
      
       <code>
        resumesAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
      
       | <code>
        Date
      </code>
    </td>
    
    <td>
      When the subscription should resume by itself (epoch ms or <code>
        Date
      </code>
      
      ). Must be after the current period end; omit to keep it paused until <code>
        resume()
      </code>
      
      .
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UseBillingReturn

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

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="products">
        
      </a>
      
       <code>
        products
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      < | <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <a href="#billingproduct">
        <code>
          BillingProduct
        </code>
      </a>
      
       | <code>
        undefined
      </code>
      
      > | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      Configured products keyed by your product map: <code>
        undefined
      </code>
      
       while they load and after a failed read (<code>
        productsError
      </code>
      
       says why), <code>
        {}
      </code>
      
       on a backend that exports no <code>
        getConfiguredProducts
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="productserror">
        
      </a>
      
       <code>
        productsError
      </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 products could not be read, or <code>
        null
      </code>
      
      : the products read's own part of <code>
        error
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="subscription">
        
      </a>
      
       <code>
        subscription
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#billingsubscription">
        <code>
          BillingSubscription
        </code>
      </a>
      
       | <code>
        null
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The current active subscription, <code>
        undefined
      </code>
      
       while loading. With a free plan in the catalog, the free plan is a subscription too, marked <code>
        free: true
      </code>
      
      ; <code>
        null
      </code>
      
       when there is none at all (no free plan, or not started yet).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="subscriptions">
        
      </a>
      
       <code>
        subscriptions
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#billingsubscription">
        <code>
          BillingSubscription
        </code>
      </a>
      
      <span>
        
      </span>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      Every subscription for the user (incl. ended/expired trials), or <code>
        undefined
      </code>
      
       while loading.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="plan-6">
        
      </a>
      
       <code>
        plan
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        null
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The catalog key of the current plan (<code>
        'free'
      </code>
      
      , <code>
        'pro'
      </code>
      
       — a yearly price reads as its plan's key), <code>
        null
      </code>
      
       without one, <code>
        undefined
      </code>
      
       while loading or for a product the catalog does not name.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="issubscribed">
        
      </a>
      
       <code>
        isSubscribed
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       once a paid subscription is known: one that is not the free plan.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isfree">
        
      </a>
      
       <code>
        isFree
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       once it's known the user is on the free plan, or on no subscription at all.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pass">
        
      </a>
      
       <code>
        pass
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#giftedpass">
        <code>
          GiftedPass
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      The plan pass the workspace holds, gifted for a time: the plan's catalog key, how many months it was given for, and when it started and ends. <code>
        null
      </code>
      
       when there is none. A pass reads as a plan held, not as the free plan: <code>
        isSubscribed
      </code>
      
       is <code>
        true
      </code>
      
       and <code>
        isFree
      </code>
      
       <code>
        false
      </code>
      
       while it runs.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.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 subscription state has loaded (always <code>
        false
      </code>
      
       when signed out, and once a read failed).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="ispending">
        
      </a>
      
       <code>
        isPending
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while an action (checkout, portal, a lifecycle change, …) runs.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="canmanage">
        
      </a>
      
       <code>
        canManage
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Whether the caller may buy and manage the billing — check out, change, cancel, pause or resume the plan, open the portal — as the server decides it (the scaffolded <code>
        getBillingAccess
      </code>
      
      ), with the same fresh reads: a workspace's owner and admins may, its other members read the plan and spend the credits, an administrator impersonating someone may not, and with <code>
        billTo: 'user'
      </code>
      
       every account manages its own. <code>
        true
      </code>
      
       while that is not known (signed out, loading), so a pricing page still shows its plans to a visitor; the server refuses whoever it must either way (<code>
        forbidden
      </code>
      
      , reason <code>
        not_billing_manager
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="saveoffers">
        
      </a>
      
       <code>
        saveOffers
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Whether the cancel flow has a save offer for some reason (<code>
        setupBilling({ lifecycle: { saveOffers } })
      </code>
      
      ): the billing section of <code>
        /settings
      </code>
      
       then opens <code>
        <CancelFlow>
      </code>
      
       for "Cancel plan". <code>
        false
      </code>
      
       until known.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="softoptin">
        
      </a>
      
       <code>
        softOptIn
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Whether a paid checkout joins the topics with <code>
        softOptIn
      </code>
      
       (the EU soft opt-in, <code>
        setupEmail({ topics })
      </code>
      
      ): <code>
        <PricingTable>
      </code>
      
       and <code>
        <BillingCheckoutLink>
      </code>
      
       then show the notice and its "Don't email me" box, and a checkout of yours should too (<code>
        checkout(id, { emailOptOut })
      </code>
      
      ). <code>
        false
      </code>
      
       until known.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.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 last action failed, else why the subscription, the subscription list or the products could not be read, else <code>
        null
      </code>
      
      . An action clears its own failure when the next one starts.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="status-2">
        
      </a>
      
       <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        string
      </code>
      
       | <code>
        null
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      Provider subscription status (<code>
        active
      </code>
      
      , <code>
        trialing
      </code>
      
      , <code>
        past_due
      </code>
      
      , <code>
        paused
      </code>
      
      , <code>
        canceled
      </code>
      
      , …): the free plan's (<code>
        active
      </code>
      
      ) when it is a subscription, <code>
        null
      </code>
      
       without any subscription, <code>
        undefined
      </code>
      
       while loading.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="cancelatperiodend">
        
      </a>
      
       <code>
        cancelAtPeriodEnd
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       when the subscription is set to end when the paid period does.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="resumesat-1">
        
      </a>
      
       <code>
        resumesAt
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        Date
      </code>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      When a paused subscription resumes by itself, <code>
        null
      </code>
      
       when nothing is scheduled. Kept from the subscription's webhooks and from the response of <code>
        pause
      </code>
      
      , so it reads back as soon as the pause call returns: since <code>
        pause
      </code>
      
       takes effect at the end of the period, it is set while <code>
        isPaused
      </code>
      
       is still <code>
        false
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="trialend">
        
      </a>
      
       <code>
        trialEnd
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        Date
      </code>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      End of the trial period, <code>
        null
      </code>
      
       when the plan has no trial.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="istrialing">
        
      </a>
      
       <code>
        isTrialing
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while the subscription is in its trial period.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="ispaused">
        
      </a>
      
       <code>
        isPaused
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while the subscription is paused (its <code>
        status
      </code>
      
       is <code>
        paused
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="ispastdue">
        
      </a>
      
       <code>
        isPastDue
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while a payment failed and the provider retries it (the <code>
        status
      </code>
      
       is <code>
        past_due
      </code>
      
      ): the plan still runs, and the customer updates the payment method in the portal (<code>
        portal()
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isfinishingcheckout">
        
      </a>
      
       <code>
        isFinishingCheckout
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      <code>
        true
      </code>
      
       while the page refreshes the entitlements after the customer came back from checkout: the checkout-return plugin found the checkout's id on the address, took it off and is syncing once. The new plan reads back as soon as it is <code>
        false
      </code>
      
       again.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pendingchange">
        
      </a>
      
       <code>
        pendingChange
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<a href="#pendingplanchange">
        <code>
          PendingPlanChange
        </code>
      </a>
      
       | <code>
        null
      </code>
      
      >
    </td>
    
    <td>
      The plan change scheduled for the start of the next period, <code>
        null
      </code>
      
       when none. Kept from the subscription's webhooks and from the response of a plan change, so it reads back as soon as <code>
        changePlan
      </code>
      
       returns.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="changeof">
        
      </a>
      
       <code>
        changeOf
      </code>
    </td>
    
    <td>
      (<code>
        productId
      </code>
      
      ) => <a href="#planchangepreview">
        <code>
          PlanChangePreview
        </code>
      </a>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      What switching the subscription to <code>
        productId
      </code>
      
       would do — when it takes effect, how the period's difference is settled, and why — before <code>
        changePlan(productId, { proration: 'invoice' })
      </code>
      
       makes it: what a confirmation step says. A yearly price left for a monthly one waits for the paid year's end; any other change applies at once, settling the period's difference then, or during a trial carrying the trial over when the new plan has one. <code>
        null
      </code>
      
       without a paid subscription to change (none, the free plan, a gifted pass, still loading), and for the product it is already on. Reactive: call it inside a <code>
        computed
      </code>
      
       or the template.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="checkout">
        
      </a>
      
       <code>
        checkout
      </code>
    </td>
    
    <td>
      (<code>
        productIds
      </code>
      
      , <code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        string
      </code>
      
      >
    </td>
    
    <td>
      Generate a checkout for the given product(s) and open it (returns the URL).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="portal">
        
      </a>
      
       <code>
        portal
      </code>
    </td>
    
    <td>
      (<code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        string
      </code>
      
      >
    </td>
    
    <td>
      Open the billing customer portal (returns the URL).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="changeplan">
        
      </a>
      
       <code>
        changePlan
      </code>
    </td>
    
    <td>
      (<code>
        productId
      </code>
      
      , <code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Switch the active subscription to another product (upgrade/downgrade). From a yearly price to a monthly one the switch waits for the paid year's end, whatever <code>
        proration
      </code>
      
       says: it reads back as <code>
        pendingChange
      </code>
      
      . Without <code>
        proration
      </code>
      
       the organization's default settles it; <code>
        changeOf
      </code>
      
       describes the switch made with <code>
        proration: 'invoice'
      </code>
      
      , as the packaged confirmations make it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="cancel">
        
      </a>
      
       <code>
        cancel
      </code>
    </td>
    
    <td>
      (<code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<a href="#canceloutcome">
        <code>
          CancelOutcome
        </code>
      </a>
      
      >
    </td>
    
    <td>
      Cancel the active subscription — at period end by default, with the customer's optional reason and comment, which go with the cancellation itself. Where the reason has a save offer (<code>
        setupBilling({ lifecycle: { saveOffers } })
      </code>
      
      ) and nothing bars one, it answers <code>
        { offer }
      </code>
      
       instead, and cancels nothing: the next call, or one with <code>
        offer: false
      </code>
      
      , cancels. Otherwise <code>
        { canceled: true, endsAt }
      </code>
      
       (epoch ms, when the plan ends). Rejects as <code>
        invalid_input
      </code>
      
       (reason <code>
        cancel_scheduled
      </code>
      
      ) when it is already set to cancel: the provider takes one cancellation per period.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="acceptoffer">
        
      </a>
      
       <code>
        acceptOffer
      </code>
    </td>
    
    <td>
      (<code>
        offer
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Accept the save offer <code>
        cancel
      </code>
      
       answered with: the server applies what it made (a pause, a downgrade at the period's end, a discount), once. Rejects as <code>
        invalid_input
      </code>
      
       (<code>
        offer
      </code>
      
      ) for an offer it did not make, one already taken, or one no longer open.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="uncancel">
        
      </a>
      
       <code>
        uncancel
      </code>
    </td>
    
    <td>
      (<code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Undo a pending cancellation, putting the subscription back on renewal. Rejects as <code>
        invalid_input
      </code>
      
       (reason <code>
        no_cancel_scheduled
      </code>
      
      ) when none is set.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="cancelpendingchange-1">
        
      </a>
      
       <code>
        cancelPendingChange
      </code>
    </td>
    
    <td>
      (<code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Undo the plan change scheduled for the next period (<code>
        pendingChange
      </code>
      
      ), so the subscription renews on the plan it has. Rejects as <code>
        invalid_input
      </code>
      
       (reason <code>
        no_change_scheduled
      </code>
      
      ) when none is scheduled.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pause">
        
      </a>
      
       <code>
        pause
      </code>
    </td>
    
    <td>
      (<code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Pause the subscription at the end of the current period.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="resume">
        
      </a>
      
       <code>
        resume
      </code>
    </td>
    
    <td>
      (<code>
        options?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Resume a paused subscription immediately (starts a new billing period).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### ProviderPager

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

Reactive paging over a provider history endpoint (see [createProviderPager](#createproviderpager)).

#### Type Parameters

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

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

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="items-1">
        
      </a>
      
       <code>
        items
      </code>
    </td>
    
    <td>
      <code>
        Ref
      </code>
      
      <<code>
        Item
      </code>
      
      <span>
        
      </span>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      The current page's records — <code>
        undefined
      </code>
      
       until the first load resolves.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="page-2">
        
      </a>
      
       <code>
        page
      </code>
    </td>
    
    <td>
      <code>
        Ref
      </code>
      
      <<code>
        number
      </code>
      
      >
    </td>
    
    <td>
      The page being shown; provider page numbers start at 1.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="total">
        
      </a>
      
       <code>
        total
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        number
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      Total records across all pages, when the provider reported it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="pagecount">
        
      </a>
      
       <code>
        pageCount
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        number
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      Number of pages, when the provider reported it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="hasmore">
        
      </a>
      
       <code>
        hasMore
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Whether a further page exists.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="hasprevious">
        
      </a>
      
       <code>
        hasPrevious
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Whether an earlier page exists.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="isloading-1">
        
      </a>
      
       <code>
        isLoading
      </code>
    </td>
    
    <td>
      <code>
        ComputedRef
      </code>
      
      <<code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Whether a load is in flight.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="error-1">
        
      </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 last load failed (see <code>
        failureOf
      </code>
      
      ), <code>
        null
      </code>
      
       otherwise. Loads never reject.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="refresh">
        
      </a>
      
       <code>
        refresh
      </code>
    </td>
    
    <td>
      () => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Reload the current page.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="next">
        
      </a>
      
       <code>
        next
      </code>
    </td>
    
    <td>
      () => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Load the next page (no-op at the end).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="previous">
        
      </a>
      
       <code>
        previous
      </code>
    </td>
    
    <td>
      () => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Load the previous page (no-op on page 1).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="goto">
        
      </a>
      
       <code>
        goTo
      </code>
    </td>
    
    <td>
      (<code>
        page
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        void
      </code>
      
      >
    </td>
    
    <td>
      Jump to a page number.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### ProviderPagerOptions

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

Options for [createProviderPager](#createproviderpager).

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="limit-2">
        
      </a>
      
       <code>
        limit?
      </code>
    </td>
    
    <td>
      <code>
        MaybeRefOrGetter
      </code>
      
      <<code>
        number
      </code>
      
       | <code>
        undefined
      </code>
      
      >
    </td>
    
    <td>
      Records per page. Reactive — changing it reloads from page 1.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="immediate">
        
      </a>
      
       <code>
        immediate?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Load the first page on mount. Default <code>
        true
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="enabled">
        
      </a>
      
       <code>
        enabled?
      </code>
    </td>
    
    <td>
      () => <code>
        boolean
      </code>
    </td>
    
    <td>
      While this is <code>
        false
      </code>
      
       the pager stays empty and never calls out.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="watchsources">
        
      </a>
      
       <code>
        watchSources?
      </code>
    </td>
    
    <td>
      () => <code>
        unknown
      </code>
    </td>
    
    <td>
      Extra reactive inputs that should reload from page 1 when they change.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="reader">
        
      </a>
      
       <code>
        reader?
      </code>
    </td>
    
    <td>
      () => <code>
        unknown
      </code>
    </td>
    
    <td>
      Who reads (the account and its active workspace): when it changes, the history on screen is another billing entity's, so it clears at once, not only once the new reader's first page arrives.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### GiftOptions

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

Per-call options for `useGifts().send`.

#### Extended by

- [`SendGiftOptions`](https://nuxt-backend.dev/docs/reference/api/use-gifts#sendgiftoptions)

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="message-3">
        
      </a>
      
       <code>
        message?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A plain-text note of at most 500 characters, no links, shown to the recipient inside the app.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="metadata-4">
        
      </a>
      
       <code>
        metadata?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        string
      </code>
      
      >
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="successurl-3">
        
      </a>
      
       <code>
        successUrl?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Where the purchaser returns after paying. Defaults to the current URL.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="redirect-1">
        
      </a>
      
       <code>
        redirect?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Open in the same tab instead of a new one (redirect checkout).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency-3">
        
      </a>
      
       <code>
        currency?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The currency to pay in, lower-case ISO 4217: one the catalog prices the pack in (<code>
        usePricing().currencies
      </code>
      
      ); one it does not is refused as <code>
        invalid_input
      </code>
      
       (<code>
        currency
      </code>
      
      ). Omit for the catalog's own.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

## Type Aliases

### SaveOffer

```ts
type SaveOffer = 
  | {
  id: string;
  reason: CancellationReason;
  kind: "pause";
  months: number;
  resumesAt: number;
  plan: string | null;
}
  | {
  id: string;
  reason: CancellationReason;
  kind: "downgrade";
  plan: string;
  appliesAt: number | null;
}
  | {
  id: string;
  reason: CancellationReason;
  kind: "discount";
  discount: string;
  name: string;
  percentOff?: number;
  amountOff?: Record<string, number>;
  duration: "once" | "forever" | "repeating";
  months?: number;
};
```

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

The save offer `cancel` answered with, its real terms included: what the
cancel flow shows before "Cancel my plan".

#### Union Members

##### Type Literal

```ts
{
  id: string;
  reason: CancellationReason;
  kind: "pause";
  months: number;
  resumesAt: number;
  plan: string | null;
}
```

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

<tbody>
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The offer's id: <code>
        acceptOffer
      </code>
      
       names it, and the server finds what it made by it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reason
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/api/billing#cancellationreason">
        <code>
          CancellationReason
        </code>
      </a>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        kind
      </code>
    </td>
    
    <td>
      <code>
        "pause"
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        months
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      How long the plan pauses.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        resumesAt
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      When it resumes by itself, epoch ms: the period's end plus <code>
        months
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        plan
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      The current plan's catalog key, <code>
        null
      </code>
      
       for a product the catalog does not name.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

##### Type Literal

```ts
{
  id: string;
  reason: CancellationReason;
  kind: "downgrade";
  plan: string;
  appliesAt: number | null;
}
```

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

<tbody>
  <tr>
    <td>
      <code>
        id
      </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/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reason
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/api/billing#cancellationreason">
        <code>
          CancellationReason
        </code>
      </a>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        kind
      </code>
    </td>
    
    <td>
      <code>
        "downgrade"
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        plan
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The cheaper plan's catalog key.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        appliesAt
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      When the switch applies, epoch ms: the current period's end.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

##### Type Literal

```ts
{
  id: string;
  reason: CancellationReason;
  kind: "discount";
  discount: string;
  name: string;
  percentOff?: number;
  amountOff?: Record<string, number>;
  duration: "once" | "forever" | "repeating";
  months?: number;
}
```

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

<tbody>
  <tr>
    <td>
      <code>
        id
      </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/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reason
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/api/billing#cancellationreason">
        <code>
          CancellationReason
        </code>
      </a>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        kind
      </code>
    </td>
    
    <td>
      <code>
        "discount"
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The catalog discount's key.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Its name, as the checkout shows it.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        percentOff?
      </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/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        amountOff?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        number
      </code>
      
      >
    </td>
    
    <td>
      A fixed amount off per currency, in the currency's smallest unit.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <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/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        months?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      The months a <code>
        repeating
      </code>
      
       discount lasts.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/integrations/billing/types/lifecycle.ts" rel="nofollow">
        src/convex/integrations/billing/types/lifecycle.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### CancelOutcome

```ts
type CancelOutcome = 
  | {
  offer: SaveOffer;
}
  | {
  canceled: true;
  endsAt: number | null;
};
```

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

What `cancelSubscription` answers: the save offer for the reason, or the cancellation and when the plan ends (epoch ms).

---

### BillingProduct

```ts
type BillingProduct = {
  id: string;
  name: string;
} & Record<string, unknown>;
```

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

A billing-provider product (loose — the provider owns the full shape; cast as needed).

#### Type Declaration

<table>
<thead>
  <tr>
    <th>
      Name
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### BillingSubscription

```ts
type BillingSubscription = {
  id: string;
  status: string;
  productId: string;
  free?: true;
  productKey?: string;
  pass?: {
     plan: string;
     months?: number;
     startedAt: number;
     endsAt: number;
     trial?: true;
  };
} & Record<string, unknown>;
```

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

A billing-provider subscription (loose — the provider owns the full shape;
cast as needed). `free` marks the catalog's free plan, a subscription
too; `productKey` is its product's catalog key (`pro`, `pro:year`).

#### Type Declaration

<table>
<thead>
  <tr>
    <th>
      Name
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        productId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        free?
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        productKey?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pass?
      </code>
    </td>
    
    <td>
      { <code>
        plan
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        months?
      </code>
      
      : <code>
        number
      </code>
      
      ; <code>
        startedAt
      </code>
      
      : <code>
        number
      </code>
      
      ; <code>
        endsAt
      </code>
      
      : <code>
        number
      </code>
      
      ; <code>
        trial?
      </code>
      
      : <code>
        true
      </code>
      
      ; }
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pass.plan
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pass.months?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pass.startedAt
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pass.endsAt
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pass.trial?
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### BillingOrder

```ts
type BillingOrder = {
  id: string;
  createdAt: string;
  status: string;
  totalAmount: number;
  currency: string;
  paid?: boolean;
  invoiceNumber?: string | null;
  isInvoiceGenerated?: boolean;
  billingReason?: string;
  productId?: string | null;
  subscriptionId?: string | null;
  product?:   | {
     id: string;
     name: string;
   }
     | null;
} & Record<string, unknown>;
```

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

A past charge, as the provider's orders API returns it. Field names mirror
the provider `Order` shape so nothing is lost in translation; the index
signature keeps the rest reachable without a cast.

#### Type Declaration

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

<tbody>
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        createdAt
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      ISO timestamp of the charge.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        totalAmount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Amount in the currency's minor unit (cents), after discounts and taxes.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        currency
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        paid?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invoiceNumber?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      Assigned when the invoice is finalized; <code>
        null
      </code>
      
       on draft orders.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        isInvoiceGenerated?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether an invoice PDF exists yet — <code>
        getInvoiceUrl
      </code>
      
       needs one.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billingReason?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        productId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        subscriptionId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        product?
      </code>
    </td>
    
    <td>
      | { <code>
        id
      </code>
      
      : <code>
        string
      </code>
      
      ; <code>
        name
      </code>
      
      : <code>
        string
      </code>
      
      ; } | <code>
        null
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UsageEvent

```ts
type UsageEvent = {
  id: string;
  timestamp: string;
  name: string;
  units?: number;
  unit?: MeterUnit;
  metadata?: Record<string, string | number | boolean>;
} & Record<string, unknown>;
```

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

One ingested usage event, as the provider's events API returns it — the
source of truth for consumption history (this package keeps no local
usage ledger). `units` is resolved server-side from the meter's value
property and is absent when the meter is unknown.

#### Type Declaration

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

<tbody>
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        timestamp
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      ISO timestamp of the event.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The ingested event name (the one the meter filters on).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        units?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        unit?
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/api/billing#meterunit">
        <code>
          MeterUnit
        </code>
      </a>
    </td>
    
    <td>
      What the meter counts, beside <code>
        units
      </code>
      
       when the catalog names its unit.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        metadata?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        string
      </code>
      
       | <code>
        number
      </code>
      
       | <code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### ClientProrationBehavior

```ts
type ClientProrationBehavior = "invoice" | "prorate";
```

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

The subset of the provider's proration behaviours a **client** may choose
(`ProrationBehavior` in `nuxt-backend/billing` has all four). Both switch
at once: `invoice` charges or credits the difference now, `prorate` on
the next invoice. `next_period` schedules the switch for the period's
end and `reset` charges the new plan in full and restarts the cycle, so
they stay server-side — pass them from your own Convex action via
`billing.updateSubscription(ctx, …)`, or make one the organization's default.

---

### CancellationReason

```ts
type CancellationReason = 
  | "customer_service"
  | "low_quality"
  | "missing_features"
  | "switched_service"
  | "too_complex"
  | "too_expensive"
  | "unused"
  | "other";
```

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

The provider's churn-reason enum, recorded with a cancellation.

---

### PlanChangeInterval

```ts
type PlanChangeInterval = "month" | "year";
```

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

A billing interval a plan is priced at, as a plan change reads it.

---

### BenefitKind

```ts
type BenefitKind = 
  | "license_key"
  | "download"
  | "community"
  | "repository"
  | "shared_channel"
  | "custom"
  | "credits"
  | "feature"
  | "other";
```

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

What a granted benefit gives, in the package's own words rather than the
provider's benefit types: a license key, file downloads, a role in a
community server, access to a code repository, a shared chat channel, a
perk you deliver yourself (`custom`), prepaid credits, a feature of the
catalog, or `other` for a type newer than the package.

---

### CheckoutArgs

```ts
type CheckoutArgs = {
  productIds: string[];
  origin: string;
  successUrl: string;
  subscriptionId?: string;
  metadata?: Record<string, string>;
  locale?: string;
  currency?: string;
  prefill?: CheckoutPrefill;
  customFields?: Record<string, string | number | boolean>;
  requireBillingAddress?: boolean;
  allowDiscountCodes?: boolean;
  discountCode?: string;
  discount?: string;
  customerIpAddress?: string;
  utm?: CampaignAttribution;
};
```

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

Args of the generated `generateCheckoutLink` action. The server sells
only the app's catalog and returns only to the site; the trial is the
product's own, and a discount by id is the server's to apply.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="productids">
        
      </a>
      
       <code>
        productIds
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
      <span>
        
      </span>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="origin">
        
      </a>
      
       <code>
        origin
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="successurl">
        
      </a>
      
       <code>
        successUrl
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="subscriptionid-1">
        
      </a>
      
       <code>
        subscriptionId?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="metadata-1">
        
      </a>
      
       <code>
        metadata?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        string
      </code>
      
      >
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="locale">
        
      </a>
      
       <code>
        locale?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency">
        
      </a>
      
       <code>
        currency?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The currency to pay in, one the catalog prices (<code>
        usePricing().currencies
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="prefill">
        
      </a>
      
       <code>
        prefill?
      </code>
    </td>
    
    <td>
      <a href="#checkoutprefill">
        <code>
          CheckoutPrefill
        </code>
      </a>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="customfields">
        
      </a>
      
       <code>
        customFields?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        string
      </code>
      
       | <code>
        number
      </code>
      
       | <code>
        boolean
      </code>
      
      >
    </td>
    
    <td>
      Values for the organization's custom checkout fields, keyed by field slug.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="requirebillingaddress">
        
      </a>
      
       <code>
        requireBillingAddress?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Require the full billing address, not just the country.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="allowdiscountcodes">
        
      </a>
      
       <code>
        allowDiscountCodes?
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Let the customer type a discount code (default <code>
        true
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="discountcode">
        
      </a>
      
       <code>
        discountCode?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A discount code to apply up front (a campaign link's), checked by the provider.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="discount">
        
      </a>
      
       <code>
        discount?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A public promotion of the catalog, by its key.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="customeripaddress">
        
      </a>
      
       <code>
        customerIpAddress?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The visitor's IP address, for the provider's local pricing: read from <code>
        /api/backend/visitor-ip
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="utm">
        
      </a>
      
       <code>
        utm?
      </code>
    </td>
    
    <td>
      <a href="#campaignattribution">
        <code>
          CampaignAttribution
        </code>
      </a>
    </td>
    
    <td>
      Campaign attribution, stored as <code>
        utm_*
      </code>
      
       metadata.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### OrdersArgs

```ts
type OrdersArgs = {
  page?: number;
  limit?: number;
};
```

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

Args of the `getOrders` action — provider page numbers start at 1.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="page">
        
      </a>
      
       <code>
        page?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="limit">
        
      </a>
      
       <code>
        limit?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### UsageArgs

```ts
type UsageArgs = {
  meter?: string;
  page?: number;
  limit?: number;
  startTimestamp?: number;
  endTimestamp?: number;
};
```

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

Args of the `getUsageHistory` action (provider event history for one meter).

#### 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>
      A configured credit-meter name, or a raw meter id.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="page-1">
        
      </a>
      
       <code>
        page?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="limit-1">
        
      </a>
      
       <code>
        limit?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="starttimestamp">
        
      </a>
      
       <code>
        startTimestamp?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Epoch milliseconds — only events at or after this moment.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="endtimestamp">
        
      </a>
      
       <code>
        endTimestamp?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Epoch milliseconds — only events at or before this moment.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### GiftCheckoutArgs

```ts
type GiftCheckoutArgs = {
  pack?: string;
  plan?: string;
  months?: number;
  recipientEmail: string;
  message?: string;
  deliverAt?: number;
  origin: string;
  successUrl: string;
  metadata?: Record<string, string>;
  currency?: string;
};
```

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

Args of the `giftCheckout` action: the purchaser's own checkout of a gift
for someone else: a credit pack by its catalog key, or a plan as a pass by
its key and a length in months.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="pack">
        
      </a>
      
       <code>
        pack?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The credit pack's catalog key (<code>
        credits500
      </code>
      
      ).
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="plan-2">
        
      </a>
      
       <code>
        plan?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A plan's catalog key, with its <code>
        months
      </code>
      
      : a plan pass.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="months">
        
      </a>
      
       <code>
        months?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="recipientemail">
        
      </a>
      
       <code>
        recipientEmail
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="message">
        
      </a>
      
       <code>
        message?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="deliverat">
        
      </a>
      
       <code>
        deliverAt?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      When the notice goes out and the recipient may claim it, epoch milliseconds, up to a year ahead.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="origin-1">
        
      </a>
      
       <code>
        origin
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="successurl-1">
        
      </a>
      
       <code>
        successUrl
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="metadata-2">
        
      </a>
      
       <code>
        metadata?
      </code>
    </td>
    
    <td>
      <code>
        Record
      </code>
      
      <<code>
        string
      </code>
      
      , <code>
        string
      </code>
      
      >
    </td>
    
    <td>
      -
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="currency-1">
        
      </a>
      
       <code>
        currency?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The currency to pay in, one the pack's gift is priced in.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/vue/composables/use-billing.ts" rel="nofollow">
        src/runtime/vue/composables/use-billing.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### SentGiftStatus

```ts
type SentGiftStatus = "scheduled" | "delivered" | "claimed" | "refunded";
```

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

Where a gift the signed-in person sent stands.

---

### PageFetcher

```ts
type PageFetcher<Item> = (args) => Promise<BillingPage<Item> | Item[] | null>;
```

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

Fetches one page from a provider-history action.

#### Type Parameters

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

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

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        args
      </code>
    </td>
    
    <td>
      { <code>
        page
      </code>
      
      : <code>
        number
      </code>
      
      ; <code>
        limit?
      </code>
      
      : <code>
        number
      </code>
      
      ; }
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        args.page
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        args.limit?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
  </tr>
</tbody>
</table>

#### Returns

`Promise`<[`BillingPage`](#billingpage)<`Item`> | `Item`<span>



</span>

 | `null`>

## Functions

### toBillingDate()

```ts
function toBillingDate(value): Date | null;
```

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

Provider timestamps reach the client as ISO strings (the component's cache
stores them that way) but as epoch numbers when an action forwards the SDK's
`Date` through Convex's JSON wire. Accept both, and never hand a component an
`Invalid Date`.

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        value
      </code>
    </td>
    
    <td>
      <code>
        unknown
      </code>
    </td>
  </tr>
</tbody>
</table>

#### Returns

`Date` | `null`

---

### formatBillingAmount()

```ts
function formatBillingAmount(
   amount, 
   currency?, 
   locale?
): string;
```

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

Money the way the provider states it — a minor-unit integer plus an ISO
currency code — rendered in `locale`, else the app's active
`@nuxtjs/i18n` locale, else English: never the visitor's own, so a server
render and the browser write it alike. The minor unit is the one the
provider states the currency in: cents for USD and EUR (`1999` is
$19.99), hundredths for HUF and ISK too (`500000` is HUF 5,000), the yen
itself for JPY (`1999` is ¥1,999), a fils for KWD (three digits). A whole
amount shows no decimals. Without a currency the amount counts in cents; an
unknown code falls back to the bare amount rather than throwing mid-render.

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        amount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        currency?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        null
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        locale?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
       | <code>
        undefined
      </code>
    </td>
  </tr>
</tbody>
</table>

#### Returns

`string`

---

### createCheckout()

```ts
function createCheckout(billing): (productIds, opts) => Promise<string>;
```

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

Build a `checkout(productIds, options)` action over a billing namespace —
shared by [useBilling](#usebilling) (subscriptions) and
["runtime/vue/composables/use-credits"!useCredits](https://nuxt-backend.dev/docs/reference/api/use-credits#usecredits) (top-ups),
since a credit-pack top-up is just a checkout for a one-time product. Must be
called during component setup (it sets up the underlying action).

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        billing
      </code>
    </td>
    
    <td>
      <a href="#billingapi">
        <code>
          BillingApi
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

(`productIds`, `opts`) => `Promise`<`string`>

---

### createProviderPager()

```ts
function createProviderPager<Item>(fetchPage, options?): ProviderPager<Item>;
```

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

The reactive paging both provider-history composables need — `useOrders`
and `useUsage` differ only in what they fetch. Provider history lives behind
page numbers rather than a cursor, so this tracks a page and its totals.

Loads run in the browser only (they need a Convex client and the signed-in
identity), never reject — a failure lands in `error` as `failureOf` reads
it, so a permanently mounted history panel cannot break a page — and stay
put when `fetchPage` is `null`, which is how an undeployed backend
function degrades. Must be called during component setup.

#### 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>

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        fetchPage
      </code>
    </td>
    
    <td>
      <a href="#pagefetcher">
        <code>
          PageFetcher
        </code>
      </a>
      
      <<code>
        Item
      </code>
      
      > | <code>
        null
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#providerpageroptions">
        <code>
          ProviderPagerOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`ProviderPager`](#providerpager)<`Item`>

---

### useBilling()

```ts
function useBilling(options?): UseBillingReturn;
```

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

Reactive billing state plus the full subscription lifecycle — checkout,
portal, plan change and undoing a scheduled one, cancel (with its save
offer) and uncancel, pause/resume — linked to your auth user. Works with no arguments via the auto-provided `api.billing`
namespace; pass `{ api }` to override.

Follows the composable conventions: the reads never throw (a failed read
shows in `error`), and every action resolves or rejects with the error the
call threw, mirrors it into `error` and counts toward `isPending`. Lifecycle
reads (`status`, `cancelAtPeriodEnd`, `trialEnd`, `resumesAt`,
`pendingChange`, …) come off the subscription record, and an action whose
function the backend has not deployed rejects only when it is called.

#### Parameters

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

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#usebillingoptions">
        <code>
          UseBillingOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`UseBillingReturn`](#usebillingreturn)

#### Example

```vue
<script setup lang="ts">
const { isSubscribed, checkout, isPending, error } = useBilling()
</script>
<template>
  <p v-if="isSubscribed">Pro</p>
  <p v-if="error">{{ error.message }}</p>
  <button :aria-disabled="isPending || undefined" @click="isPending || checkout(productId, { utm: { source: 'newsletter' } })">
    Upgrade
  </button>
</template>
```


## Sitemap

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