How witn works

A short overview of outcome-based billing and the building blocks you will use.

This page explains the concepts. To start sending API calls right away, see the Quickstart.

The problem with proxy billing

Most billing systems charge for proxies: seats, API calls, storage. These are easy to measure but not what buyers want. A buyer wants the result, not the activity.

witn lets you define exactly what a successful outcome looks like. You send events as things happen. witn evaluates the condition after each event and resolves the outcome automatically.

The six building blocks

BlockWhat it is
CustomerA company or person you bill. Each customer has a key you choose.
AgentA contract template. Defines the billable condition, the settlement window, and how billing units are counted.
OutcomeA live instance of an agent for one customer. Tracks whether the condition was met and resolves to confirmed or missed.
EventA signal from your system. The condition is evaluated after each event.
Billable conditionThe boolean rule that decides when an outcome confirms.
Rate cardA pricing table. Maps agents to prices for a customer.

How they connect

The typical flow:

  1. Create a customer and an agent in the dashboard.
  2. Assign a rate card to the customer.
  3. Send the first event when something billable begins: a ticket opens, a document is sent, a job is posted.
  4. Send more events as things happen.
  5. witn evaluates the billable condition after each event.
  6. Each event resets the settlement timer. When the condition is met and the timer expires, the outcome confirms. When the timer expires without the condition being met, the outcome is missed.
  7. You receive a notification when the outcome confirms or is missed.

What the settlement window means

Every event resets a timer equal to the agent's settlement period (default: 72 hours). When the timer expires:

  • Condition met → outcome confirms. You receive a notification and an invoice line is created.
  • Condition not met → outcome is missed. You receive a notification.

If you send another event before the timer expires, the timer resets. An outcome cannot confirm or be missed while events are still arriving.

On this page