Charge by the call, the token or the task.
Usage-based recurring payments for AI products. Your customers prepay credit with a card, you record what they use, and Tuppence draws it down — no card fee on each use, and no invoice to chase at the end of the month.
Price a unit
Create a meter — say report at 50p. A meter’s price is fixed; a new price is a new meter.
Customers prepay
They top up credit on a hosted page with a card, once or automatically when it runs low. That card payment is the only one that carries a fee.
Record what they use
Send a meter event with your own ID for the work. Send it twice and it counts once. Out of credit? The call says so, with a top-up link.
Record usage without double-charging.
Every usage event carries your own identifier — the task, the request, the job. Retries, replays and at-least-once queues can’t charge a customer twice.
- Quantity × the meter’s price, or an exact amount per event
- Batches of up to 100 events in one call
- Usage summaries per customer and per meter
402 insufficient_creditswith atopup_urlwhen the balance can’t cover it
// Once: 50p per report await tuppence.meters.create({ name: "report", unit_amount: 50 }); // Every time one is delivered await tuppence.meterEvents.create({ customer: "cus_01K…", meter: "report", identifier: "task_42", // sent twice, counted once });
# Once: 50p per report tuppence.meters.create(name="report", unit_amount=50) # Every time one is delivered tuppence.meter_events.create( customer="cus_01K…", meter="report", identifier="task_42", # sent twice, counted once )
Your customers top up. You never chase.
Credit is bought with a card, at the normal card rate, and drawn down as it’s used. There’s no card fee on each use and nothing to collect afterwards.
Top-ups
Top a customer up from your code, or send them to a hosted top-up page that shows their balance, with your branding.
Auto top-up
Set a threshold and an amount: when the balance drops below it, their saved card is charged and the credit refilled.
Low-balance events
credits.low_balance, credits.depleted and credits.auto_topup_failed reach your webhook so you can warn them first.
Refund unused credit
Give back what’s left, all or part, refunded to the cards it came from.
Put a price on an API route in one line.
An unpaid request gets 402 Payment Required, with a link to pay or a way to spend prepaid credit. The caller — a person or an agent — pays, retries with the receipt and gets the response.
import { http402 } from "@tuppence/http402"; app.get( "/v1/report", http402({ tuppence, price: 50, currency: "gbp", credits: { meter: "report" }, // or pay by card }), (req, res) => res.json(buildReport()), );
from tuppence import AsyncTuppence from tuppence.http402 import Http402Middleware, PayWall app.add_middleware( Http402Middleware, routes={ "GET /v1/report": PayWall( AsyncTuppence(key), price=50, currency="gbp" ), }, )
$ curl -i https://your-api.example/v1/report HTTP/1.1 402 Payment Required Link: <https://pay.tuppence.ai/pay/pay_…>; rel="payment" { "price": 50, "currency": "gbp", "resource": "GET /v1/report", "accepts": [{ "type": "card_link", … }] } # Pay, then retry with the receipt: $ curl https://your-api.example/v1/report \ -H "Authorization: Tuppence-Receipt eyJ…"
Checked offline
Receipts are signed by Tuppence and checked against our published keys — no call to us on the hot path.
Bound and single-use
A receipt names the route and the amount it paid for, goes to your account only, and works once.
Agents spend credit, capped
Give a customer’s agent a short-lived credit token with a spending cap. Past the cap or the expiry, it gets a 402 saying why.
Agents that can take payments — and prove who they are.
Tuppence meets agents where they work: an MCP server, tool packs for the big agent frameworks, a SKILL.md, and signed identities so everyone can tell which agent did what.
MCP server
29 tools — payment links, payments, refunds, subscriptions, customers, credit and cards. An agent only sees the tools its API key’s permissions allow, and tools that move money need an idempotency key.
claude mcp add tuppence --env TUPPENCE_API_KEY=sk_test_… -- npx -y @tuppence/mcpAgent frameworks
The same tools for the OpenAI Agents SDK, LangChain and the Claude Agent SDK, from one package: @tuppence/agent-tools.
import { tuppenceTools } from "@tuppence/agent-tools/openai-agents"; const { tools, close } = await tuppenceTools();
Agent identity
Give an agent its own key pair. It signs each request, and anyone can check the signature against the public keys Tuppence publishes. Mandates record what a person allowed it to buy.
Identity docsCards for agents
Virtual Tuppence cards for your agents, with spending rules by merchant type and country, limits, and a person’s approval above an amount you set. Their spend earns cashback.
How cashback worksPay the card rate once, when credit is bought.
A £20 top-up on a UK consumer card costs 16p (0.79%). The hundreds of uses it pays for cost nothing more to record.
See all pricing- Prices below a penny per unit
- x402 and stablecoin payments
- Stripe’s Shared Payment Tokens
- Agent-to-agent payments
Spending credit through an agent’s token is available in test mode; it opens for live payments once our compliance review is complete.
Get paid to accept card payments.
Test mode is open today. Join the waitlist and we’ll tell you when your account can take real payments.