---
schema: 4
type: case
id: 15
title: "A pricing engine that turns vendor prices into margins"
description: "A small library that prices AI products from incompatible vendor rates and shows what a business model earns, month by month."
created: 2026-10-20
updated: 2026-10-20
attributes:
  channels: [website]
  status: published
  motif: data
  kind: own
  client: "h1902y"
  year: 2026
  state: "Experiment"
  stack: ["TypeScript", "Zod", "Vitest"]
  timeline: "Started October 2026"
---

## Problem

AI vendors price in different units: per minute, per message, per seat, per token. Founders cannot tell what a product costs or earns without a spreadsheet.

## What we built

- Rate cards for variable, fixed, step and grant pricing, with exact decimal maths
- Recipes that combine vendors into a product, and scenarios that show revenue, cost, margin and payback month by month
- Versioned price cards that record the source page and the date they were checked
- A first card for Retell

## Outcome

- 17 automated tests passing
- Feeds the multi-tenant platform’s pricing decisions
