<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>ShipRev Blog</title>
    <link>https://shiprev.dev/blog</link>
    <description>Notes on the design behind ShipRev: identity, subscriptions, metering and entitlements on one customer record.</description>
    <language>en</language>
    <atom:link href="https://shiprev.dev/blog/rss.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Designing Identity, Subscriptions, Metering and Entitlements Around One Database Transaction</title>
      <link>https://shiprev.dev/blog/four-domains-single-transaction</link>
      <guid isPermaLink="true">https://shiprev.dev/blog/four-domains-single-transaction</guid>
      <pubDate>Sat, 10 Oct 2026 00:00:00 GMT</pubDate>
      <dc:creator>ShipRev</dc:creator>
      <category>Core Invariants</category>
      <description>Why ShipRev is designed to keep the four pieces of commercial state for a SaaS product in one process and one PostgreSQL database, written to in one transaction.</description>
      <content:encoded><![CDATA[<p>A SaaS team that sells several plans with quotas usually keeps the state behind them in several places: a sign-in service, a payment provider, a usage counter and its own code.</p>
<p>ShipRev is designed to hold that state on one customer record, in one process and one database, so that a change to one of the four is written in the same transaction as the others. Here is how the four are meant to fit together:</p>
<ol>
<li><strong>Catalog and tiers</strong>: products, capabilities and the tiers that bundle them, published as versions.</li>
<li><strong>Subscriptions</strong>: subscription state, invoices and prepaid balances, connected to your own Stripe account.</li>
<li><strong>Metering</strong>: usage events recorded against each customer, with reservations that are confirmed or released.</li>
<li><strong>Identity</strong>: end users, the organizations they belong to, and the boundary between one customer's data and another's.</li>
</ol>
<p>Changes to configuration, subscriptions and entitlements are designed to be recorded in an append-only change log, so that each change can be traced afterwards.</p>
<p>ShipRev has not been released. This post describes its design, not a product you can use today.</p>]]></content:encoded>
    </item>
    <item>
      <title>Why Distributed Billing and Metering Strain Under AI Agent Workloads</title>
      <link>https://shiprev.dev/blog/why-single-process-operational-plane</link>
      <guid isPermaLink="true">https://shiprev.dev/blog/why-single-process-operational-plane</guid>
      <pubDate>Sat, 10 Oct 2026 00:00:00 GMT</pubDate>
      <dc:creator>ShipRev</dc:creator>
      <category>Architecture</category>
      <description>A look at how separate usage meters, payment webhook queues and tenant auth services can drift apart under concurrent agent workloads, and the single-transaction design ShipRev takes instead.</description>
      <content:encoded><![CDATA[<p>When engineers start building SaaS products around autonomous AI agents, the default instinct is to decompose the commercial side into separate services:</p>
<ul>
<li>A payment provider for payment collection and subscription state;</li>
<li>A hosted identity service for multi-tenant organizations;</li>
<li>A time-series or analytics database for raw token metering;</li>
<li>HTTP webhooks and background workers to wire them together.</li>
</ul>
<h2>Where the asynchronous design strains</h2>
<p>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:</p>
<ol>
<li>An agent workflow can start many tool calls at once;</li>
<li>Each call can consume tokens and third-party API credits at the same time;</li>
<li>Webhooks from a payment provider arrive after a delay you do not control;</li>
<li>By the time a webhook marks a customer as out of quota, concurrent calls may already have spent more than the plan allows.</li>
</ol>
<h2>The single-transaction design</h2>
<p>ShipRev is designed to address this failure mode by keeping the catalog, subscriptions, metering and identity in one process and one PostgreSQL database:</p>
<ul>
<li>Balance checks and usage deductions are designed to run in the same database transaction;</li>
<li>Entitlements are designed to be read from the same records as the subscriptions that grant them.</li>
</ul>
<p>ShipRev has not been released. This post describes its design, not a product you can use today.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
