Jun 4, 2025

Jun 4, 2025

Jun 4, 2025

Jun 4, 2025

How to implement credit-based pricing using Flexprice?

Credit-based pricing is becoming the go-to model for AI and API-first products. In this model, users purchase a set number of credits in advance, which act as a universal currency across your product. Instead of pricing each feature individually in tokens, API calls, compute time, or storage, you assign each action a credit cost. As the user interacts with the product, credits are deducted based on what they use.

Implementing a credit-based pricing model is hard. We’ve written about the framework you should consider before launching a credit-based pricing model.

In this guide I will walk you through how to implement credit-based pricing in minutes using Flexprice.

Let’s take an example of a popular AI-powered lead enrichment and outreach automation tool which is Clay

Clay allows users to:

  • Create prospecting workflows

  • Enrich leads using multiple data sources

  • Generate AI-written messages

  • Export results into CRMs

Whenever a user signs up on Clay’s platform, they are onboarded on a free trial period of 14 days and get 100 credits in your wallet for free to explore the platform. Whenever you perform any action in the product like enriching a contact, running a scraping workflow, or generating a message using AI, credits are consumed based on individual action. Example,

  • Creating a table of suitable prospects costs 10 credits.

  • Enriching a contact costs 1.5 credits per table row.


Now, let’s build a Starter plan in Flexprice:

  • Login to Fleprice and log in to your workspace.

  • Features represent the building blocks of your pricing logic. They determine what you meter, charge for, or gate under different plans. Every action a user performs in the product (whether it consumes credits or not but is part of pricing) can be defined as a Feature in Flexprice.

    • Let’s say whenever a user using Clay’s platform successfully creates a table, an event is triggered with

      • Event name = table_create

      • Status = success

      You can define the feature by selecting Metered feature and defining the event details


    • As soon as a user plans to enrich the row, Clay’s team again triggers an event which can be defined in a similar format.


    • Then there are features like Exporting that are part of pricing page but aren’t consuming any credits. Feature like these can be defined as Boolean features. If however, you want to know how many times a user clicks on export or maybe plan to charge at a later stage, you can go ahead and define it as a metered feature.


  • Now. let’s create a Starter plan

    • Charges

      • Define Recurring charges as $149 per month. You can also define whether you want users to pay during start or end of the billing period as well as trial period.


      • Similarly, define charges for usage-based features as well by selecting the feature and amount associated with it. Example create table feature consumes $10 while enrich contacts consume $1.5 per row. Don’t worry about currency ($) to credit conversion. That will be taken care of while we’ll create a wallet.


      • You can use Entitlements to define the other features which are part of pricing plan (e.g. Exporting in this case) but you don’t want to charge for them. Also, if say Clay wanted to give 5 table creations for free, they can do it using Entitlements.



  • Create customer and assign a subscription to the customer. You can select the subscription date as well as do you want to bill users based on on Calendar(1st of every month) or Anniversary ( the date on which user has purchased the subscription)


  • Now, for the same customer, hover over to the wallet section and click on Add button


  • You will get the option to define the wallet currency, currency to credit conversion rate. You can define free credits that you want to offer as well along with the expiry date as well.


  • Now, for the Starter plan, Clay renews 2000 credits every month for the users. You can define how you want to automatically top-up credits in user’s wallet.


Credit-based pricing helps abstract complex usage into a flexible, fair monetization model — one that aligns better with infrastructure costs, product value, and customer willingness to pay.

With Flexprice, you can:

  • Launch credit-based plans in minutes

  • Track and meter real-time usage

  • Empower product and GTM teams to iterate without engineering cycles

Blogs

Blogs

Blogs

More insights on billing

Insights on
billing and beyond

Explore expert tips, industry trends, and best practices for billing, pricing, and scaling revenue.

Get started with your billing today

Get started with
your billing today