scheme

A scheme is x402's word for how a payment is formed, checked and settled. The specification defines several, and a client and a facilitator have to support the same scheme on the same network before a payment between them is possible at all.

The specification states that payment schemes define how payments are formed, validated and settled on specific payment networks, and it carries a document for each scheme it defines: exact, upto, auth-capture and batch-settlement. An endpoint quoting a fixed price for one call is quoting the exact scheme.

A scheme name is not by itself an implementation. The repository's own note is that scheme implementations vary across blockchains, and that clients and facilitators must explicitly support a given (scheme, network) pair in order to build, check and settle payments for it. The same word can therefore describe different code on two networks.

This is why a quote names both. Each entry of the accepts array states its scheme beside its network and its asset, so a client can tell before it signs anything whether it can satisfy that option. A facilitator publishes the pairs it will handle through its /supported operation.

→ probe402 records the scheme and network each tracked endpoint quoted at each check — open an endpoint from the endpoint list.

Sources

Related accepts array · facilitator · settlement · EIP-3009

Glossary