Spondo Billing

Spondo Billing is billing for AI products. It records what your product does for each customer and what that costs you, prices it with plans and credits, bills through Stripe, and shows each customer the value they got.

What you get

A dashboard that puts what each customer pays you next to what they cost you to serve. These screenshots are from the live demo: a company selling two AI products, DocuMind and CallPilot, to 14 customers. Open it and look around; there's nothing to sign up for.

Revenue and margin by month: bars of cost to serve and gross profit for each month, with gross margin as a line above them.
Revenue, cost and margin by month: revenue at your plan prices, cost from every traced call, and the margin between them. See it in the demo
Margin by product: customers, revenue, cost to serve, gross margin and margin percentage for DocuMind and CallPilot.
Margin by product: which products make money, even when one plan covers several. See it in the demo
Customers: each customer's status, plan, credits used this month, and revenue and margin with their weekly trend.
Every customer's margin and its trend, and who needs your attention: low margin, overdue, or ready for a bigger plan. See it in the demo
Unit economics by signal: how many of each signal there were, what they cost in all, and what each one cost.
What each thing your product does costs you, from the LLM calls behind it. See it in the demo

The Quickstart puts your first customer's cost on screen in about ten minutes.

How it fits together

You send two streams of data from your product:

  • Signals: one event each time your product does something a customer pays for or values, such as document_uploaded or contract_reviewed.
  • Cost traces: OpenTelemetry traces of your LLM calls, which Spondo Billing prices from their tokens.

Everything else is built on those: what each customer owes, what they cost you, your margin, and the value you delivered.

Your productSignalswhat you did for each customerCost traceswhat each LLM call cost youSpondo Billingcost to serve, revenue at your prices, marginDashboardmargin by customer,product and signalInvoicesthrough yourown StripeValue receiptsfor yourcustomers
ConceptWhat it is
CustomerA business you sell to. You give each one your own ID, its external ID, and use it everywhere instead of storing Spondo Billing's IDs.
SignalOne thing your product did for a customer: an event name, the customer, optionally the product, and any numbers in data, such as { "pages": 12 }.
Cost traceAn LLM call your product made, with its model and token counts. Spondo Billing prices it and puts the cost on the customer, and on the signal it produced.
ProductSomething you sell, such as DocuMind. Signals and costs can be attributed to a product, so you see margin per product.
PlanHow a customer is charged: a fee, included credits, the price of extra credits and charges priced from signals.
CreditsA balance a customer spends as they use your product. Plans say how many credits each signal costs; grants and purchases add credits.
OrderA customer's subscription to a plan: what they bought, from when, at what price. A checkout creates one when the customer pays.
InvoiceWhat a customer owes for a period. With Stripe connected, Stripe collects payment and invoices sync back.
ValueWhat your product's work was worth to the customer, from agreed value per signal. A value receipt shows them "You paid $203. We delivered $3,823 of value."

A typical integration

  1. Create customers as they sign up, with your own ID as externalId.
  2. Send a signal each time your product does billable work, with that ID.
  3. Trace your LLM calls, tagged with the same customer ID.
  4. Set up products and plans in the dashboard or through the API.
  5. Take payment with a checkout link, and let Stripe invoice.
  6. Listen for webhooks to keep your product in step: an invoice paid, a payment failed, credits running low.

The Quickstart does steps 1 to 3 in about ten minutes.

Customers and external IDs

You don't need to store Spondo Billing's IDs. Every customer, product and plan takes an externalId: your own ID for it, such as your account ID. Use it wherever the API asks for a record:

  • In request bodies, as externalCustomerId or externalProductId instead of customerId or productId.
  • In paths, through each operation's /external/{externalId} twin: GET /customers/external/acme-legal instead of GET /customers/cus_Q2x9vB7mK4pT1sLw.

Customer external IDs are matched without regard to case. A customer can also have aliases, other IDs it is known by (from another system, say), which signals and traces can use too.

Ways in

Use it for
REST APIEverything: https://billing.getspondo.com/api/v1, with an API key from the dashboard.
Node clientThe same API from Node, Bun, Deno or the edge, with typed methods: npm install @spondo/billing.
OpenTelemetryCost traces from any language, at https://billing.getspondo.com/v1/traces.
WebhooksEvents from Spondo Billing to your server.
DashboardAPI keys, plans, Stripe, and seeing it all: revenue, cost, margin and value by customer.