Payment scheme in ETH
Native ETH has no signed-transfer standard, so Nouspay pays with signed vouchers against a prepaid vault. Here is the full scheme.
The problem
Most x402 payments use USDC, which supports EIP-3009 transferWithAuthorization: the payer signs a message and anyone can submit it, so the payer pays with one signature and no gas. Native ETH has no such function. To pay in ETH with one signature, a contract has to be involved.
The decision: vault + EIP-712 vouchers (nous-voucher)
| Option | How it works | Trade-off |
|---|---|---|
| A. Vault + EIP-712 vouchers (chosen) | The agent wallet deposits ETH into NousVault. Each call signs one voucher. Vouchers are redeemed after the answer. | One signature, no gas per call. Needs a deposit first. Mandates and the kill switch live in the same contract. |
| B. WETH + Permit2 | The agent pays in wrapped ETH with a Permit2 signature. | Standard tooling, but WETH rather than ETH and a one-time approval. A possible compatibility path later. |
| C. Plain ETH transfer | The agent sends ETH and puts the tx hash in the header. | A transaction and gas on every call. Breaks the single request. |
How a paid call works
- Open a vault account. The agent wallet calls
open(owner, perCallCap, dailyCap)with ETH. The owner is you. - Ask. The agent calls the endpoint. With no payment it answers
402with an x402 requirement: schemenous-voucher, networkeip155:4663, price in wei,payTo, andextra.vault. - Sign. The agent signs an EIP-712
Voucher(payer, seller, amount, nonce, deadline, requestHash)with domainNousVaultversion1.requestHashiskeccak256("GET " + resource), so a voucher buys exactly one resource. - Retry with the voucher in the
X-PAYMENTheader (base64 JSON, x402 v1). - Answer, then pay. The seller checks the voucher through the facilitator, holds it while it works, and only queues it for redemption if it answered. The response carries
X-PAYMENT-RESPONSE. - Redeem and claim. Vouchers are redeemed in batches; the amount is credited to the seller, who calls
claim(to).
What the vault enforces on every voucher
Account open, not frozen, not expired, nonce unused, signature from the payer, amount within the cap per call, today's spend within the daily budget, seller on the allowlist (when enabled), and enough balance. The owner can change the mandate, unfreeze and withdraw; withdrawals always go to the owner. The owner or the agent can freeze (the kill switch). There is no admin key, no fee in the contract and no upgrade path.
Facilitator
| Endpoint | Does |
|---|---|
GET /api/x402/supported | Lists nous-voucher on eip155:4663 with the vault address |
POST /api/x402/verify | Checks a voucher against the requirement and the vault, counting vouchers not yet redeemed against the balance and budget |
POST /api/x402/settle | Records the voucher once and queues it for redemption |
All on https://dapp.nouspay.app. The facilitator fee is TBD.