Replicate Stripe's per-transaction pricing

How to replicate Stripe's pricing with Lago

Note: Stripe’s product suite includes 21 modules. In this article, ‘Stripe’ refers to Stripe Payments, the global payments platform and main module of the Stripe suite.


Implement a per-transaction pricing model like Stripe, the leading payments infrastructure company, including fees based on the total amount and number of transactions.

What's in it for you?

In this article, you will learn how to build a ‘pay-as-you-go’ billing system, where a single event can trigger multiple charges.

This template is suitable for companies whose pricing depends on transactions, such as fintechs and marketplaces that deduct their fees from their customers’ revenue.

What's the secret sauce?

Stripe offers ‘pay-as-you-go’ pricing based on successful card charges processed via its platform. Stripe’s API includes many payment options and rates vary depending on the payment method.

Percentage charge
(based on transaction amount)
Fixed fee
(per transaction)
Card payments (online)
Card payments (in-person)
Wallets (Apple Pay, Alipay, etc.)
Pre-authorised debits in Canada
SEPA Direct Debit

As Stripe supports more 20 payment methods in the US and most of them share the same charge model, we will focus on online card payments.

Here’s how you can replicate this pricing with our billing solution.

What do you need?

The first thing to do is to create your company account on Lago Cloud or deploy Lago Open Source on your existing infrastructure. In both cases, you should ask a back-end developer to help you with the setup.

Our documentation includes a step-by-step guide on how to get started with our solution.

Instruction manual

Step 1 – How to record transactions

Lago monitors consumption by converting events into billable metrics. For Stripe’s per-transaction pricing, we can create a billable metric for each payment method.

Using the ‘sum’ aggregation type, we create a billable metric that will allow us to record transactions.

Billable metric for transactions
How to record transactions

When a successful card charge is processed via the platform, our backend system will generate an ‘online_payments’ event, including the transaction amount.

Step 2 – How to set up a ‘pay-as-you-go’ pricing model

When creating a new plan, the first thing to do is to define the plan model, including billing frequency and subscription fee. Here we can select the monthly plan interval. As we are implementing a ‘pay-as-you-go’ pricing model, there is no subscription fee.

Plan model for pay-as-you-go pricing
How to configure the plan model for 'pay-as-you-go' pricing

We want our customers to pay for their use of the payments platform, so we add charges to our plan. Each charge is associated with a billable metric (i.e. one charge per payment method in this case) and has its own pricing structure. In order to replicate Stripe’s pricing, we select the percentage charge model.

The percentage charge model allows us to combine a percentage charge based on the total amount of transactions and a fixed fee based on the number of transactions.

Percentage charge model for transactions
How to use the percentage charge model for transactions

If we wanted to go even further, we could define free units. For instance, we could:

• Offer the first three transactions; or
• Offer the first $1,000; or
• Create a model where the first three transactions or first $1,000 would be free of charge.

Free units with the percentage charge model
How to add free units with the percentage charge model


For fintech companies like Stripe, implementing a per-transaction pricing model is a good way to increase revenue as customers grow.

With Lago, you can create your own billable metrics and use the percentage charge model to adapt this template to your products and services.

Give it a try, click here to get started!

Want to talk to our team?