Accountless x402
PubFi supports accountless x402 payment on explicitly enabled Registry v2 gateway routes. The caller uses a wallet authorization instead of creating a PubFi account or API key.Current Availability
The current public Registry exposes this ready example:
PubFi does not currently publish a Base mainnet x402 route. Always inspect the live challenge
before signing because route terms can change through a new reviewed offer.
1. Request The Resource Without Auth
- HTTP
402 Payment Required; - a
PAYMENT-REQUIREDheader; - the same payment requirements in the JSON response; and
Cache-Control: private, no-store.
2. Validate Before Signing
Use an x402 V2 client and reject the challenge unless every field matches your wallet policy. At minimum, validate:- the exact HTTPS resource;
- x402 version
2and schemeexact; - Base Sepolia network
eip155:84532; - canonical Base Sepolia USDC;
- EIP-3009;
- the expected PubFi payee;
- the maximum amount you authorize; and
- the maximum authorization lifetime.
3. Send The Signed Request
The x402 client repeats the exact request withPAYMENT-SIGNATURE. Do not add a PubFi API key to
that request. Supplying both payment modes is a conflict and PubFi rejects it.
A successful settled response includes PAYMENT-RESPONSE. Treat the full payment signature,
payment payload, and payment response as sensitive payment evidence. Do not log them.
The challenge also includes the official Signed Offers & Receipts offer-receipt extension. Its
offer is a compact Ed25519 JWS. The successful payment response includes the extension’s signed
receipt. The JWS kid points to PubFi’s did:web verification method.
PubFi uses one active private signer. The did:web document can also publish up to eight retained
public verification keys. Only the active key signs new offers and receipts. Retained public keys
keep supported historical receipts verifiable after key rotation.
4. Replay Safely
If a connection is lost after signing, resend the exact same request with the exact samePAYMENT-SIGNATURE. Do not create a second authorization first.
After settlement, exact replay returns the same bounded response bytes and the same
PAYMENT-RESPONSE, including the same signed receipt. A changed method, path, query, body, route,
or payment binding is rejected.
Verify The Offer And Receipt
Use a JWS and DID library that supports EdDSA anddid:web.
- Read the offer JWS from
PaymentRequired.extensions["offer-receipt"].info.offers. - Require JWS algorithm
EdDSAand resolve the exactkidthrough itsdid:webdocument. - Require the DID document to authorize that Ed25519 verification method for assertions.
- Require the decoded payload bytes to match the JSON Canonicalization Scheme form, then verify the compact JWS.
- Check the signed offer fields against the live payment requirement: version, resource URL, scheme, network, asset, payee, amount, and expiry.
- After settlement, read and verify
SettlementResponse.extensions["offer-receipt"].info.receiptin the same way. - Check the signed receipt’s version, network, resource URL, payer,
issuedAt, and optional transaction. Require an exact replay to return the same receipt.
issuedAt comes from Quantro’s durable settledAt settlement time. It is the receipt issuance
time, not the earlier provider execution stage time. Exact replay reuses the durable receipt
instead of creating a new issuance time.
For operators, PUBFI_X402_OFFER_RECEIPT_VERIFYING_KEYS_JSON is nonsecret configuration. It can
contain only retained public verification keys. It must not contain a private key. The active
private signing key stays in the separate secret configuration.
Billing Expectations
The x402 lane:- creates no PubFi account;
- creates no API key;
- creates no Credits balance;
- creates no invoice or anonymous billing dashboard; and
- does not consume a registered account’s allowance.
No-Payment Inspection Example
The public repository contains a no-secret script that displays the current challenge without signing or spending test USDC:pubfi.route.execute. See MCP Client Setup for the official MCP
metadata flow.
Remote Paid Smoke Limits
The deployment smoke creates two independent payments for the selected route: one through HTTP and one through MCP. Each payment can spend at most 0.01 test USDC. The total maximum is 0.02 test USDC. The MCP replay check compares the returnedstructuredContent and
result._meta["x402/payment-response"]. It does not compare raw JSON-RPC response bytes.