# Setting up Rebilling

If you are on an Enterprise plan, you have access to our rebilling system, which allows you to rebill your own clients for AI token usage!

### Stripe Setup

The first step to setup rebilling with Capri is to set up a product/price in Stripe!

<figure><img src="/files/i6867gZRdVKVtUFPCFa0" alt=""><figcaption></figcaption></figure>

We recommend setting a price per unit per month, such as in this screenshot! The "unit" in this instance would be the number of times that your client reaches a certain usage limit, which you will later set in the portal! After setting up the price, you will then need to generate a Stripe API key. After generating the key, go to the billing tab in the Capri Portal, then select rebilling, and you will be prompted to enter this key!

<figure><img src="/files/6J9JxEggYmZNhoyQPDxC" alt=""><figcaption></figcaption></figure>

### Customer Setup

After doing so, you will then see the rebilling portal, where you can then add your clients to the rebilling system!&#x20;

<figure><img src="/files/sqkUTdu9loSPbCciBM6p" alt=""><figcaption></figcaption></figure>

When you select, "Add User", you will then have a panel popup where you can enter the details for a client.

<figure><img src="/files/FnnjqO5IkKdrJcfTASub" alt=""><figcaption></figcaption></figure>

For the first field, Nickname, this is just where you can specify the name of a client. This can be useful if the client has the wrong name or a different name in Stripe. The second field, Provider, is where you can choose the platform that your client uses Capri through. If you are using the Capri API, then you can select that and enter in the API Channel that they are using in the next field. If you are using GoHighLevel, you can instead choose the subaccount that the client is using!

<figure><img src="/files/xbyjwfgbG3GSNW3QqHY7" alt=""><figcaption></figcaption></figure>

After selecting the channel and provider, you can then select the product and price that you created earlier, and then enter the Stripe customer ID for the client!

Finally, you can then set the usage count that you'd like to trigger a "unit" of the product that you chose earlier. You can either charge by token or by message count, and whenever the count that you choose is exceeded, a "unit" will be logged in Stripe. For instance, if you have the charge by set to tokens and the billing unit set to 1000, every 1000 tokens the user uses, a single "unit" will be logged in Stripe. For example, if the product you are using in Stripe is a monthly charge of 10 cents per unit, then for every 1000 tokens the user uses, they will incur a cost of 10 cents that will be charged via Stripe monthly!

<figure><img src="/files/oZfIOlAqrEnrMI8dGYr9" alt=""><figcaption></figcaption></figure>

### Video Overview

We also have a video walkthrough that you can check out [here](https://youtu.be/DVlDonpBsiw?si=xzdTQeUnyHLpHDQn)!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.capriai.us/capri-portal/setting-up-rebilling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
