MESH ONLINECODENAME:
v0.34
payments

Payments

Net Payments attaches pricing, payment evidence, verification, spend policy, and billing events to capability invocation. The payment rail moves the funds; Net does not hold them.

Net standardizes the commercial facts around capability invocation; it does not intermediate the money. x402 moves the funds; Net signs the facts around them — provider identity, discovery-time pricing, tiered verification, immutable billing, and spend policy.

"Commercial facts" is a bounded term. They are references, commitments, signatures, quotes, verification results, policy decisions, and billing events — not customer PII, tax records, KYB files, invoices, shipping data, or provider account records. If a provider needs commercial identity, Net carries an opaque reference plus a commitment, never the record itself.

Net Payments does not custody funds, process payments, issue invoices, determine taxes, or clear transactions. Those responsibilities remain with the payment rail and the participating businesses. See What Net Payments is.

You don't need an HTTP server. Net-native paid capabilities are announced and invoked over the mesh (nRPC); the x402 payment material rides as opaque preserved bytes inside the invocation. HTTP 402 is an adapter path for web APIs, not a requirement for Net providers (x402 and Net).

Run it first

If you'd rather see the whole loop before reading about it, the compiled examples/docs_payments.rs drives announced terms → provider-signed quote → caller spend policy → x402 payload → verify + settle → billing, in one process against the mock facilitator:

shell
cargo run -p net-payments --example docs_payments
text
paid; redemption binding = 031cc917c742f74e…
billed 2500 for docs-provider/summarize
billing event df9efd87267bfd6d…  — 2500

Every Rust snippet in this section comes from that file, so CI compiles the docs along with the crate.

Start here

The object model at a glance

Five signed Net envelopes wrap the x402 payment; each has exactly one canonical byte encoding, and each carries references and commitments — never customer data:

EnvelopeWhat it commits
net.pricing.terms@1what a capability costs, announced at discovery
net.payment.quote@1a signed, expiring quote binding a caller to terms
net.settlement.ref@1a reference to the settled x402 transaction
net.payment.verification@1a tiered verification result (see below)
net.billing.event@1an immutable usage record

The lifecycle walks these in order.