<!-- DOCS_PAY_ONLY_WHAT_WAS_EARNED:composed-reference -->
# Pay only what was earned

Canonical HTML: https://spoolis.com/docs/pay-only-what-was-earned. This page is also available in machine-readable Markdown.

Reference integration: authorize a spending cap on a payment platform, verify delivered work with Spoolis, and pay exactly the earned amount with the receipt attached.

## The shape

authorize up to $1.00, verify 100 units with 97 accepted, pay exactly $0.97.

The payment platform answers whether the agent may spend and whether the money moved. Spoolis answers what the work earned. The earned amount and the signed receipt are the only contract between them.

## 1. Authorize the ceiling

Give the agent a wallet with a per-transaction cap at the agreed maximum. Spend limits should be owner-controlled: the paying agent must not be able to raise its own cap. The cap is the most the work can possibly cost, not what the work will earn.

## 2. Verify the delivered work

Submit the agreement and the delivered rows to one-call verification with the unit count and per-unit price declared, so partial results earn partial value. Each rejected unit keeps a named reason. The signed Outcome Receipt binds the agreement, the evidence digest, the per-condition results, and the earned amount.

[Outcome Receipt specification](/docs/outcome-receipt)

## 3. Pay exactly the earned amount

Execute one payment for earned_cents and put the receipt reference in the payment description so the money carries its own justification. Keep an idempotency key on every payment call, and treat an email-addressed payment that is awaiting claim as created, not failed.

## The live run

Reference run on 2026-08-27: 100 records submitted, 97 accepted, 3 rejected with reasons, $0.97 earned against a $1.00 cap, one Natural payment of exactly $0.97 whose description references the receipt. The verification half runs keylessly against the sandbox with the request shown on this page.

[Read the essay](/learn/authorization-is-not-earned-value)
