When engineers start building SaaS products around autonomous AI agents, the default instinct is to decompose the commercial side into separate services:
- A payment provider for payment collection and subscription state;
- A hosted identity service for multi-tenant organizations;
- A time-series or analytics database for raw token metering;
- HTTP webhooks and background workers to wire them together.
Where the asynchronous design strains
In a product driven by people clicking through a UI, this architecture often holds up, because requests arrive at human speed. Agent workloads behave differently:
- An agent workflow can start many tool calls at once;
- Each call can consume tokens and third-party API credits at the same time;
- Webhooks from a payment provider arrive after a delay you do not control;
- By the time a webhook marks a customer as out of quota, concurrent calls may already have spent more than the plan allows.
The single-transaction design
ShipRev is designed to address this failure mode by keeping the catalog, subscriptions, metering and identity in one process and one PostgreSQL database:
- Balance checks and usage deductions are designed to run in the same database transaction;
- Entitlements are designed to be read from the same records as the subscriptions that grant them.
ShipRev has not been released. This post describes its design, not a product you can use today.