Skip to main content
Proxy Accounting for Stripe MPP

MPP streams payments.
StringCost accounts for them.

Stripe's Machine Payments Protocol is OAuth for money. But OAuth doesn't give you a P&L. StringCost adds credits, double-entry ledgers, usage caps, and chargebacks on top of every MPP session.

Trusted by YC and a16z-backed teams

MPP is a payment protocol,
not an accounting system

Stripe calls MPP “OAuth for money.” But OAuth doesn't give you a general ledger. The moment you meter real agent workloads, payment alone breaks down.

Sessions don't track margin

MPP sessions stream micropayments but never reconcile cost vs. revenue. You see spend, not profit.

No cross-provider normalization

GPT-4 tokens, Claude tokens, vector DB queries — MPP records each payment separately with no unified cost basis.

No ledger, no attribution

Thousands of micro-transactions aggregate into a single settlement. Which agent run drove which cost?

Accounting Primitives

The missing layer that makes MPP viable for business

MPP settles payments via Stripe. StringCost sits in front of your agent traffic as a proxy — metering the full workflow, computing the ledger, and settling the exact amount across stablecoins and fiat.

Finally answer: “What's the P&L of each MPP session?”

Authorize then capture

Set a max, stream usage, capture only what was consumed. Dynamic ceilings, not static session caps.

Credits & prepaid balances

Package usage into credits with discounts and flexible terms. MPP has no native credit system.

Double-entry ledger

Every tool call becomes a debit and credit. Margin is visible per run, per agent, per customer.

Usage caps & budgets

Per-user, per-agent, per-org limits. MPP session caps are a single number, not a policy engine.

Refunds & reversals

Failed runs reversed cleanly with full audit trail. MPP refunds are manual Stripe Dashboard operations.

Normalized costs

Unified cost basis across stablecoins, fiat SPTs, and all providers. One ledger for everything.

Credit rails for agents,
not just session caps

MPP sessions commit funds upfront with a single cap. StringCost adds a full credit system on top — prepaid balances, volume discounts, postpaid invoicing, and dynamic limits that adjust in real time.

Micro

$0.01

USDC on Tempo

Macro

$10,000

Multi-agent workflow

Same accounting backbone handles stablecoins and fiat SPTs — no prefunded wallet required.

Credit FlowAuth → Capture
1

Agent identity + limits

Agent maps to organization with credit policies and spending ceilings

2

MPP 402 intercepted

StringCost catches the challenge before payment executes

3

Draw from credit pool

StringCost draws from prepaid balance, opens double-entry ledger

4

MPP settles payment

Stablecoins or fiat SPTs flow through Stripe as normal

5

Capture exact, refund delta

Close the run, return unused credit, reconcile the books

MPP without StringCost
is a billing blind spot

Stripe's MPP handles the payment. But payments don't replace accounting.

MPP Alone
MPP + StringCost
Cost visibility
Aggregate settlement total
Line-item ledger per run
Margin tracking
Not available
Real-time P&L per agent
Refunds
Manual via Stripe Dashboard
Automatic reversals
Business models
Pay-per-call only
Prepaid, postpaid, credits
Budget controls
Session cap (single number)
Per-user, per-org policies
Multi-agent attribution
Flat list of PaymentIntents
Parent-child cost trees

Under the Hood:
How StringCost Actually Works

StringCost is a runtime-aware proxy — not a library that invades your code. It inspects agent traffic at the network level via a secure, signed-URL architecture.

1

Request a One-Time URL

Your app asks the Control Plane for permission to make a call. No static API keys — ever.

2

Get a Signed URL

The Control Plane returns a short-lived, single-use signed URL with encrypted credentials. Key leakage is impossible.

3

Call the Gateway

Your agent calls the Gateway with this URL. We validate the signature, check for replay attacks, proxy the call, and record every action to the ledger.

StringCost Financial Architecture

Deep Runtime Inspection

Every request flows through an asynchronous deep prompt inspection engine. A background worker polls every 200ms, calling a meta-classifier to tag each request with an action type — synthesis, tool_selection, evaluation — with zero added latency.

Every Action is a Ledger Entry

Every computational action — LLM calls, tool invocations, MPP micropayments — becomes a distinct line item with two sides:

  • Cost Side (Debits): Tokens paid to your provider, tool call costs, compute time.
  • Revenue Side (Credits): The billable event for your customer based on your pricing model.

The result: an auditable, real-time P&L for every MPP session. Which agents are most profitable? Which tools drive the most cost? What's your true AI margin?

How proxy accounting
makes MPP viable

MPP returns a 402 challenge. StringCost turns that into a metered session with real-time cost attribution across every provider.

01

Agent hits MPP endpoint

Server returns HTTP 402 challenge. StringCost intercepts before payment executes.

02

StringCost opens ledger

Authorization ceiling set, signed session issued, double-entry ledger started.

03

Micropayments stream

Each token, tool call, and compute step recorded as a line item with cost and revenue.

04

Settle & reconcile

MPP settles the payment. StringCost captures the exact amount, refunds the delta, closes the books.

Make Stripe's MPP actually work
for the agent economy

Proxy accounting, credits, and settlements in one stack. Built for usage-based AI — across stablecoins and fiat.

No integration required
Works with any provider
Enterprise ready