# Top-Up Pricing (like OpenAI)

### Overview

Top-up pricing is a variation of usage-based pricing. Customers must make payments to purchase credits upfront. As the product usage occurs, credits will be deducted accordingly. When certain percentage of the top-up amount is reached, such as 20%, customers will be charged again up to top-up amount. This pricing model is especially popular among AI companies due to the model set-forth by OpenAI's API pricing.

### Enable Top-up Pricing

To enable top-up pricing, a product plan should be created with **Billing Cycle** be `Top Up`. In contrast to billing cycles being monthly or annually, the billing cycle is not driven by time, but by credit balance. The property **Recurring Fee Amount** on the product plan is the total top-up amount. Therefore, it is required to have a non-zero value of **Recurring Fee Amount** in order to use top-up pricing. Optionally, you can specify a property **Top Up Threshold** that triggers recharge of customers to the full top-up amount. By default, the threshold is 20% of full top-up amount. The customers' customer wallets inside Paigo are used to store credits recharged and keep track of the credit balance.

For example, if **Recurring Fee Amount** is $100 and **Top Up Threshold** is 20%, then a customer will be recharged if they started using product with $100 balance in credit and used the product until $20 remaining in balance. The recharging amount would be $80, which is the difference of full top-up amount and the current balance.

Below are some of the implementation mechanism of top-up pricing:

* Top-up product plan can be used only on `Usage-based` plan type. It does not support `Subscription-based` or `Fixed Price` plan types. Top-up product plan also does not support pricing features such as free trial and minimum payments.
* The credit consumption is calculated frequently as customers are using the product, and deducted from credit balance in customer wallet. Invoices will be generated for recharges of top-up product plan.
* Top-up pricing plan can be used only with `Metered Usage` product items. There is no limitation of how pricings of product items are defined, they will be calculated as part of credit consumption.


---

# 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://docs.paigo.tech/saas-pricing/model-pricing-structure/top-up-pricing-like-openai.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.
