The 402 body
An agent that has never seen Veil still understands this response, because it is a standard x402 Payment Required body with one added requirement: settle confidentially, or do not settle at all. Every body on this page was captured from a running Veil server — the same process that produced the merchant ledger — and its /.well-known/veil published privacySource: pool-ledger.
One unpaid call, one paid call
GET /v1/oracle/tide
X-PAYMENT: (none)
← 402 Payment Required
accepts[0].scheme "exact-confidential"
accepts[0].asset 6pFk…3ur
accepts[0].payTo Eidqo…RUKr (one-time)
accepts[0].maxAmountRequired 49000
accepts[0].extra.privacy confidential-balances
accepts[0].extra.poolIndex 7
GET /v1/oracle/tide
X-PAYMENT: signed · confidential
← 200 OK · resource delivered
paid true
settled.at 23:41:15
settled.signature null
amount [ciphertext on chain]
mode local-ledger-only
Note what is not hidden here, on purpose: the price. An x402 challenge has to state what it costs, and Veil does not pretend otherwise. What stays unreadable is the on-chain amount and the balance either side of it — so the chain records that a confidential transfer happened without recording the figure, while the payer's own HTTP exchange is a private conversation with the server.
The body, verbatim
{
"x402Version": 2,
"resource": {
"url": "https://veil-devnet.vercel.app/v1/oracle/tide",
"description": "Sea-state and tidal window, per call (0.049000 units)",
"mimeType": "application/json"
},
"accepts": [
{
"scheme": "exact-confidential",
"network": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
"asset": "6pFkZndusKGifrKLXgaQJFjUT3Gi9n1uXcwkG7Jef3ur",
"payTo": "EidqotpL1dEap2ykWc7uKxXKJpvKRYpwyzhv6gWkRUKr",
"maxAmountRequired": "49000",
"amount": "49000",
"resource": "https://veil-devnet.vercel.app/v1/oracle/tide",
"description": "Sea-state and tidal window, per call (0.049000 units)",
"maxTimeoutSeconds": 60,
"extra": {
"tokenProgram": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",
"decimals": 6,
"privacy": "confidential-balances",
"poolIndex": 7,
"auditor": null,
"hides": [
"on-chain-amount",
"on-chain-balance"
]
}
}
]
}
The accepts[] entry is a conformant x402 offer. Everything under extra is Veil's addition, and it is published in both directions: hides and exposes name what stays private and what does not, so a client cannot read the privacy claim and miss the boundary. A client that ignores scheme is refused rather than served in the clear.
Every refusal is a specific code
A facilitator that fails opaquely is a support burden and a privacy hole: the agent retries, and a looser code path settles in public. Each failure mode below has one code, one cause and one thing the agent should do.
| Code | HTTP | Cause |
|---|---|---|
| VEIL-CONF-001 | — | Mint is not confidential |
| VEIL-CONF-002 | — | Destination cannot receive confidential credits |
| VEIL-CONF-003 | 402 | Confidentiality cannot be guaranteed — refusing to serve |
| VEIL-CONF-004 | 402 | Buyer spend cap exceeded |
| VEIL-CONF-005 | 503 | One-time address pool exhausted |
| VEIL-CONF-006 | — | Could not reserve a one-time address |
| VEIL-CONF-007 | — | Payment is bound to a different resource |
| VEIL-CONF-008 | — | Transaction is not a confidential transfer |
The proofs are generated in this browser
"Private" means nothing if a server does the proving, because then the server learns every amount. So this is not a claim on a slide: press the button and this page builds the three zero-knowledge proofs a confidential transfer needs, from the payer's own keys, on this device. It also counts the network requests made while it works, so you do not have to take "no prover service" on trust.
Press “Generate a transfer proof”. Nothing is sent anywhere; the log below is the real output.
The bundle this loads is compiled from the same proofs.ts the test suite exercises; it is not a browser-only reimplementation. npm run prove:browser asserts the shipped artifact in CI, including the statements it must refuse.
The signal a merchant actually ships
Everything above is produced by a facilitator the merchant points at. From the merchant's side the change is one value in the settlement config; the response body does the rest. The refusal below is real output from a running server — the same code the merchant dashboard renders as a row with no amount beside it.
settlement = x402.facilitator( payTo: "8gz…e2", asset: "USDC" )
settlement = veil.facilitator( alias: "feedmarket.veil", confidential: true ) // everything else unchanged
{
"x402Version": 2,
"resource": {
"url": "https://veil-devnet.vercel.app/v1/payee/test",
"description": "Reference payee — the seat the end-to-end check pays (0.001000 units)",
"mimeType": "application/json"
},
"accepts": [
{
"scheme": "exact-confidential",
"network": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
"asset": "6pFkZndusKGifrKLXgaQJFjUT3Gi9n1uXcwkG7Jef3ur",
"payTo": "2KncEeBuW9WRRqfxbrCgVJ63nMPTBJqpwvzaRXAuRTi5",
"maxAmountRequired": "1000",
"amount": "1000",
"resource": "https://veil-devnet.vercel.app/v1/payee/test",
"description": "Reference payee — the seat the end-to-end check pays (0.001000 units)",
"maxTimeoutSeconds": 60,
"extra": {
"tokenProgram": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",
"decimals": 6,
"privacy": "confidential-balances",
"poolIndex": 8,
"auditor": null,
"hides": [
"on-chain-amount",
"on-chain-balance"
]
}
}
]
}
A refusal carries no accepts[] entry at all, which is the field that matters. An offer alongside a refusal would invite a client to pay something the server has already said it cannot settle privately — the failure this whole surface exists to prevent. Why the refusal matters →