---
title: "Codelet"
description: "Usage-based and credit-based billing API for AI and SaaS products. Meter events, rate usage, and invoice through Stripe or Paddle."
url: "/"
---

# Codelet

*Metering & pricing layer for Stripe & Paddle*

## Usage-based billing, minus the engineering

Add complex pricing to your app without building a billing system. From flat subscriptions to graduated usage and prepaid credits. Built-in flexibility to launch pricing and then try new things.

Free until $1,000 monthly revenue · No credit card required

## Example pricing models

### Graduated usage — $49/m + tiers

First 1M tokens at $0.001, next 9M at $0.0008. Best for high-volume APIs.
### Flat fee + metred — $99/m + overage

Includes 100k events, then $0.20 per 1k events. Simple base plus growth pricing.
### Prepaid credits — $100 credit pack

Buy credits upfront and decrement per action. Great for budget-controlled teams.
### Seat + usage hybrid — $25 / seat + usage

Per-seat access plus token or API-call charges. Works for AI features in SaaS.
### Commitment plan — $1,000 commit

Monthly commit with lower usage rate above it. For enterprise-style contracts.

*The gap*

## Stripe gets rigid. Paddle skips metering. Codelet fills the gap.

Payment providers move money well. They struggle when pricing gets complex. Codelet is the metering and rating layer on top, so you keep Stripe or Paddle and still ship flexible usage billing.

## Where Stripe and Paddle fall short

### Stripe

Powerful, but rigid when pricing gets interesting. Metered billing means Price objects, meters, and catalog gymnastics. Hybrid plans and pricing experiments often need custom code and a deploy.
### Paddle

Strong on tax and MoR. Weak on usage metering. Paddle does not offer native usage metering, graduated tiers, or real-time credit balances. Usage-based products still need a layer on top.

*Billing solution*

## Metering and rating with pricing flexibility your provider can't match

Stripe or Paddle handles checkout and money movement. Codelet owns the billing logic.

### Hybrid pricing that matches your product

Combine seats, usage, and prepaid credits without bending your provider's catalog.
### Change pricing without a code update

Edit plans, tiers, and credit packs in the dashboard. New rates go live without a redeploy.
### Try new pricing for certain customers

Offer a new plan or rate to a segment while everyone else stays on the current plan.
### Simpler API, agent-ready setup

A small set of endpoints for ingest, checkout, and balances. Let your coding agent build your integration.

*Why Codelet*

## Operate in real time

Codelet is built for developers and teams that ship fast and learn from live usage.

*Real-time visibility*

## See every event. Know what you're earning.

Usage events appear as they're ingested and rated against each customer's plan. Balances update in real time so you can gate features and see billable usage before the invoice closes.

- Last 24 hours: 12,847 events ingested
- Rated usage: $1,284 billable this period
- **api_request — 4,820 ($4.82)**: cust_abc
- **tokens — 12,400 ($1.24)**: cust_xyz
- **api_request — 890 ($0.09)**: cust_def
- **webhook — 156 ($0.31)**: cust_ghi

*Iterate on pricing*

## Launch pricing today. Change it tomorrow.

Create plans, tiers, and credit packs in the dashboard. When you learn what works, update pricing without a code change or redeploy.

- Pricing model: Graduated usage
- **0 – 1M units**: $0.001 / unit
- **1M+ units**: $0.0008 / unit
- **Grandfathering**: New customers get the updated plan at checkout. Existing subscribers can be grandfathered or move to new pricing, no code changes needed.

*How it works*

## Keep your payment provider. Add flexible billing on top.

Codelet sits between your app and Stripe or Paddle, not instead of them. Meter usage, rate invoices, and change pricing without switching providers or rebuilding billing.

1. **Connect Stripe or Paddle**: Use the provider you already have for checkout and payouts. Codelet handles metering and rating on top.
2. **Set up pricing in the dashboard**: Create subscription plans and prepaid credits with a few clicks. Then add a checkout link to your app.
3. **Send usage events**: Your app sends usage events to Codelet with one API call per action.
4. **Change pricing, or providers, at any time**: Update plans and tiers in the dashboard, or switch between Stripe and Paddle, without rewriting billing logic.

## Architecture

```
┌─────────────────────────────┐
│        Your product         │
└─────────────────────────────┘
               ▲
               │
               ▼
┌─────────────────────────────┐
│           Codelet           │
└─────────────────────────────┘
               ▲
               │
       ┌───────┴───────┐
       ▼               ▼
┌────────────┐  ┌────────────┐
│   Stripe   │  │   Paddle   │
└────────────┘  └────────────┘
```

*Developer experience*

## Simple API, minimal code

A small set of endpoints to create checkouts, ingest usage, and check balances. Billing logic stays in Codelet, so you ship complex pricing with very little engineering work.

## Ingest usage

```
POST api.codelet.co/v1/ingest

{
  "customer_id": "cust_abc123",
  "metric": "api_request",
  "quantity": 4820,
  "idempotency_key": "req_7f3a..."
}
```

## Subscription checkout

```
POST api.codelet.co/v1/checkout

{
  "plan_id": "plan_pro",
  "customer_email": "buyer@example.com",
  "success_url": "https://app.example.com/welcome"
}
```

## Credit pack checkout

```
POST api.codelet.co/v1/checkout

{
  "pack_id": "pack_abc",
  "customer_id": "cus_31da..."
}
```

## Check balance

```
GET api.codelet.co/v1/customers/cust_abc123/balance?metric=api_request

{
  "balances": [
    {
      "metric": "api_request",
      "included_remaining": "73",
      "purchased_remaining": "412",
      "total_available": "485"
    }
  ]
}
```

*Agent native*

## Agent native

Point Cursor, Claude Code, Codex or another coding agent at Codelet's agent skill. It can sign you up, create a project, and mint a sandbox API key, so you're ready to start.

- **Create plans and credit packs**: Define metrics, graduated tiers, and prepaid packs in Codelet from a prompt. Avoid fiddly forms.
- **Wire a full app integration**: You agent can map customers, add checkouts, report customer usage, and gate features in your app.

## Starter prompt

```
Read https://codelet.co/SKILL.md. I don't have a Codelet account yet. Sign me up, create a project, and get a test API key.
```

- [Set up with an agent](https://codelet.co/agents)
- [Open SKILL.md](https://codelet.co/SKILL.md)

*Features*

## Complex billing logic, without the billing rebuild

The metering and rating layer that sits between your product and your payment provider.

### Unlimited pricing models

Flat rate, tiered, volume, package, hybrid, and prepaid credits. Bill your customers precisely how you want to.
### Iterate on pricing

Create and update plans, tiers, and credit packs in the dashboard. Your pricing strategy shouldn't need an engineering sprint.
### Keep your payment provider

Codelet handles complex metering and rating. Stripe or Paddle handles checkout, tax, and money movement.
### Real-time usage & revenue

Events and rated usage appear as they happen. See what's billable before month-end, and keep customer balances in sync for feature gating.
### Developer-friendly

A single ingest endpoint, simple API, and sandbox environments. Ship billing without a sales call.
### Metre what matters

Define metrics for any unit of value your product delivers, like actions, seats, credits, or outcomes, and bill customers on what they actually use.

*EU infrastructure*

## Built in Europe. Hosted on EU infrastructure.

Codelet is EU-made and runs on EU-based infrastructure owned by an EU company. Not a US cloud with an EU toggle.

### Based in the EU

Built and operated from the EU.
### Crafted in the EU

Designed and engineered in the EU.
### Hosted in the EU

Hosted on EU-owned infrastructure.

## Start metering in minutes

Connect Stripe or Paddle, define your metrics, and start ingesting events. No enterprise contract required.
