> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suby.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Pay As You Go

> Charge customers based on usage. Suby meters consumption and bills automatically.

Pay As You Go lets you charge customers based on how much they use, instead of a fixed one-time or recurring price. Suby meters usage and bills the customer accordingly.

<img src="https://mintcdn.com/suby/4fVS1Z07udSZDVk1/images/pay-as-you-go.png?fit=max&auto=format&n=4fVS1Z07udSZDVk1&q=85&s=a544b577d2c7d15f80646f9922d481ba" alt="Pay As You Go" width="2930" height="1658" data-path="images/pay-as-you-go.png" />

## How It Works

When a customer is on a Pay As You Go plan, Suby:

<Steps>
  <Step title="Tracks usage">
    Usage is reported to Suby as your customer consumes your product or service.
  </Step>

  <Step title="Calculates the charge">
    At the end of the billing period, the charge is calculated based on recorded usage and your pricing.
  </Step>

  <Step title="Processes the payment">
    The payment is collected across the customer's chosen method, card, bank, Apple Pay, Google Pay, or stablecoin.
  </Step>

  <Step title="Calculates taxes">
    Applicable taxes are calculated and collected automatically based on the customer's location.
  </Step>

  <Step title="Fires a webhook">
    A `payment.succeeded` event is sent to your server if you have a webhook configured.
  </Step>
</Steps>

## Use Cases

<CardGroup cols={2}>
  <Card title="API & Infrastructure" icon="server">
    Charge per API call, per request, or per unit of compute.
  </Card>

  <Card title="AI & LLM Products" icon="microchip">
    Bill based on tokens processed, generations, or credits consumed.
  </Card>

  <Card title="Data & Storage" icon="database">
    Charge based on data processed, stored, or transferred.
  </Card>

  <Card title="Platform Usage" icon="gauge">
    Bill customers based on seats, actions, or any other usage metric specific to your product.
  </Card>
</CardGroup>

## Setting Up Pay As You Go

You create the product itself from the dashboard, but the usage-based configuration, defining what's metered and how usage is reported, is done via the API.

<Steps>
  <Step title="Go to Catalog">
    In your dashboard, navigate to **Catalog**, then **Product**, and click **New product**.
  </Step>

  <Step title="Fill in the basics">
    Enter your **product name**, **image**, **description**, **currency**, and select **Pay As You Go** as the billing type.
  </Step>

  <Step title="Set access delivery (optional)">
    Choose how access is delivered once payment is completed: **Discord**, **Telegram**, **digital files**, **license key**, or **external link**.
  </Step>

  <Step title="Configure additional options (optional)">
    * Choose which **payment methods** are available for this specific product
    * Add **custom fields** to collect information from the customer at checkout
    * Set a **success URL** and **cancel URL** to redirect the customer after checkout
  </Step>

  <Step title="Configure usage via the API">
    Once the product exists, define your usage metering and pricing, and report usage events, through the API.
  </Step>
</Steps>

## Via API

<Card title="Full API Reference" icon="code" href="/v3-beta/api-reference/overview">
  Endpoints, parameters, and response objects for usage-based billing.
</Card>
