Skip to content

docs: add x402 usage-based settlement example and accounting guidance #203

@up2itnow0822

Description

@up2itnow0822

Market signal

MoonPay's Open Wallet Standard launch explicitly positions OWS as the wallet layer that makes x402 and session-style machine payments usable across agent frameworks. At the same time, x402's upto scheme has made usage-based settlement a first-class agent-payment pattern.

Why it matters

OWS already has x402-related adoption pressure in the repo, but the missing piece is practical guidance for usage-based settlement after a max authorization is approved.

For agent builders, the hard part is no longer just signing the payment. It is explaining:

  • the max amount that was authorized
  • the actual amount that settled
  • the remaining headroom or released capacity
  • the wallet-visible accounting effects after settlement

Without a reference pattern here, every framework will invent its own local accounting story.

Recommended action

Add an official x402 usage-based billing example and guidance for upto-style settlement flows in OWS docs/examples.

Scope

Suggested deliverables:

  1. A minimal example showing max authorization first, then actual settlement.
  2. Guidance on what the wallet layer should expose locally after settlement (authorized amount, settled amount, released amount, net delta).
  3. A note on how OWS should interoperate with app-layer accounting modules when settlement occurs after the original authorization step.
  4. Optional: a reference integration example using an external accounting layer such as agentwallet-sdk's UptoBillingPolicy, which already models max-authorize / actual-settle / release flows.

Non-scope

  • Standardizing all downstream accounting formats.
  • Replacing existing x402 protocol behavior.
  • Mandating a single ledger schema for all frameworks.

Expected outcome

OWS would have a clearer answer for one of the fastest-growing payment patterns in agent systems: variable-cost work where the final amount is not known until the task completes.

Acceptance criteria

  • A documented upto/usage-based flow exists in docs or examples.
  • The example shows both max authorization and final settlement.
  • Local post-settlement accounting expectations are described.
  • The docs make clear which parts belong in OWS and which parts belong in the app or SDK layer.

Notes / confidence

High confidence this is a real integration gap. x402 payment support is already active in this repo, and usage-based settlement is now becoming a practical requirement for agent wallets rather than a theoretical edge case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions