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

# Set up credits auto-recharge

## Overview

This guide explains how to set up **credits auto-recharge** for prepaid, usage-based billing in Stigg.

In a prepaid credits model, customers purchase credits upfront and consume them as they use your product. Auto-recharge extends this model by automatically replenishing credits when a customer’s balance drops below a defined threshold, ensuring uninterrupted usage while enforcing strict spending limits.

Auto-recharge is one of several ways to manage credit replenishment and is best suited for customers who want continuous access without manual top-ups.

By the end of this guide, you’ll have:

* A credit-based pricing model
* An initial prepaid credit balance
* Auto-recharge configured to maintain a rolling balance over time

## When to use auto-recharge

Auto-recharge is ideal for:

* Usage-based products with continuous consumption
* API-driven or automation-heavy workloads
* AI or compute-based services
* Customers who want predictable spend without service interruptions

If you want usage to hard-stop when credits reach zero, consider using prepaid credits **without** auto-recharge and rely on manual top-ups instead.

## Credit lifecycle overview

Before diving into setup, it’s helpful to understand how credits and auto-recharge behave over time:

1. Customers are granted an initial prepaid credit balance.
2. Credits are consumed as usage is reported.
3. When the balance drops below a threshold, Stigg triggers an automatic recharge.
4. Credits are granted up to a target balance and billed using the selected payment method.
5. Auto-recharge pauses automatically when the monthly spend limit is reached or if a payment fails.

## Example credit model

This guide uses the following example:

* Credits are consumed per API call
* Customers start with an initial prepaid credit balance
* When the balance drops below **20 credits**, it is automatically recharged back up to **50 credits**
* Auto-recharge spending is capped at **\$500 per month**

## Prerequisites

Before enabling auto-recharge, ensure that:

* A credit type is configured
* Usage is metered through meter-based features
* Customers have an active payment method on file
* An initial credit balance has been granted

## Step 1: Create a product

The product represents the commercial offering that will contain your credit-based usage.

1. Go to **Product catalog → Products**.
2. Click **+ New product**.
3. Select **Single active subscription**.
4. Give the product a name.
5. Click **Create**.

## Step 2: Create meter-based features

Credits are consumed by meter-based features.

1. Go to **Product catalog → Features**.
2. Click **+ New feature**.
3. Configure the feature:
   * **Name**: Display name shown in the UI
   * **Description (optional)**: What the feature enables
   * **Feature type**: Select **Meter**
   * **Meter type**: Select **Calculated usage**
   * **Unit names**: For example, *request* / *requests*
4. (Optional) Enable **Feature is sold in different units** if required.

This feature will later be linked to credit consumption.

## Step 3: Create a prepaid credit plan

This plan is used to grant customers an initial credit balance.

1. Go to **Product catalog → Plans**.
2. Click **+ New plan**.
3. Select the product you created.
4. Give the plan a name (for example, *Prepaid credits*).
5. Click **Create**.

## Step 4: Configure pricing

1. Go to **Product catalog → Plans**.
2. Select the plan.
3. In the **Price** section, click **+ Set**.
4. Select **Paid**.
5. Choose **One-time** as the billing model.
6. Click **Continue**.

## Step 5: Configure credits

This step defines how many credits are granted to the customer upfront.

Under **Charges**:

1. Select **Credits**.
2. In **Credit type**, select **Credits (Credits)**.
3. Choose a pricing model (for example, **Flat** or **Stairstep**).
4. Define the number of credits granted (for example, **50 credits**).
5. Set the price for the credit grant.
6. Click **Add** to save the charge.

## Step 6: Grant credits to a customer

1. Go to **Customers → Customer accounts**.
2. Select a customer.
3. In the **Subscriptions** section, click **+ Add**.
4. Select the product.
5. Select the prepaid credit plan.
6. Add a billing method.
7. Click **Create**.

The customer now has an initial credit balance.

## Step 7: Enable auto-recharge

Once a customer has a credit balance, you can configure auto-recharge.

### Credit usage per customer

1. Go to **Customers**.
2. Select a customer.
3. Go to the **Credits** tab.

The **Auto-recharge** section shows the current credit spend and the configured monthly spending limit.

### Auto-recharge settings

1. Click **Manage** in the **Auto-recharge** widget.
2. In **When credit balance goes below**, enter the credit balance that triggers auto-recharge, such as 30.
3. In **Then bring credit balance back up to**, enter the target balance after recharge.
4. In **Limit total monthly spend to**, enter the maximum amount that can be charged per month.
5. Select a reset interval in **Spend limit resets every**.
6. Select a duration in **Grant expiration**.
7. Select a payment method under **Payment method**.
8. Click **Save settings**.

Once saved, credits will be automatically recharged according to the configured rules.

## Step 8: Monitor credit usage

You can monitor how customers consume and recharge credits over time.

1. Go to **Customers → Customer accounts**.
2. Select a customer.
3. Open the **Credits** tab.

This view shows:

* Current credit balance
* Credit consumption
* Auto-recharge spend for the current month

<Note>
  If the monthly spend limit is set lower than the customer’s current spend for the month, auto-recharge will be disabled and no additional credits will be recharged until the limit is increased or the spend limit resets.
</Note>
