Skip to main content
This template shows you how to offer free upfront credits to new users on a ‘pay-as-you-go’ pricing model. It suits infrastructure companies, like this BigQuery example. AI companies also use it widely to let new users try their products. Mistral or Perplexity are other great examples.

Pricing structure

BigQuery offers customers the possibility to subscribe for free and only pay based on usage. For new customers, the platform offers $300 worth of credits during 90 days to try the product completely for free.

Get started

1

Set up Lago

2

Create a billable metric

Create a billable metric to track data processing volume.
  1. Set the aggregation_type to sum_agg to sum all data processed
  2. Set the field_name to data_processed_volume for tracking usage
  3. Set recurring to false for metered billing
Refer to the API reference to create a billable metric.
3

Create a plan

Create a plan with graduated pricing to include free tier usage.
  1. Set the amount_cents to 0 since there is no subscription fee
  2. Use graduated charge model with BigQuery’s $6.25 per TiB rate
  3. Configure first 10 TiB as free, then $6.25 per TiB after that
Refer to the API reference and guide on graduated pricing to learn more.
4

Create a customer

Create a customer with a unique external_id.
Refer to the API reference to create a customer.
5

Create a wallet with free credits

BigQuery lets new users try its product for free by offering upfront credits valid for 90 days. We can replicate this logic using Lago’s wallet feature.
  1. Create a wallet with $300 of free credits for the customer
  2. Set expiration_at to 90 days from now for the trial period
Refer to the API reference to create a wallet.
6

Create a subscription

Create a subscription for the customer with the plan’s code.
Refer to the API reference to create a subscription.
7

Ingest usage via events

Send usage events to Lago to track usage.
  1. Reference your billable metric with code
  2. Reference the customer’s subscription with external_subscription_id
  3. Include usage and filters data in properties
Refer to the API reference to create an event.
8

Monitor current usage

Track real-time customer usage for the current billing period.
Refer to the API reference to get the current usage.

Wrap-up

Offering free upfront credits is a popular strategy among AI and infrastructure companies with pay-as-you-go models like BigQuery. With Lago, you can adapt this template to your products and services using:
  1. Billable metrics, to aggregate your pay-as-you-go usage;
  2. Graduated charges, to price that metric on a plan; and
  3. Wallets, to grant prepaid free credits.
Get started with Lago to build this template.