VEIL
docs v1 rail x402

Docs / Introduction

Introduction

Veil makes one thing private that x402 leaves public: the amount. It is a conformant x402 facilitator and resource server that settles in Token-2022 Confidential Balances instead of a plain transfer, so a merchant already taking x402 adds a settlement address and nothing else.

This documentation is for two people — the merchant selling something behind a paywall, and the agent buying it. Both start from the Quickstart and are running against the hosted rail in a few minutes.

Everything here runs against https://veil-devnet.vercel.app. Nothing runs on localhost unless you ask for it.


Why this exists

x402 gave agents a way to pay for an API call without a human and without an account. It left three things on a public ledger: the amount, the counterparty, and the pattern of who pays whom, how often. On a chain, that is the whole customer record.

Veil closes that gap with two primitives that already exist, rather than a mixer or a promise:

What stays public is stated plainly on Honest limits: account addresses, timing, and the count of transactions.


Who it is for

Merchants. You already accept x402, or you want to. Veil is a drop-in facilitator: the request and response bodies are the standard ones, and the 402 carries a machine-readable refusal when a buyer's account cannot receive confidential credits. If you cannot check, you do not quote.

Agents. You fetch, you get a 402, you pay, you retry. The budget is enforced before anything is signed, so a rail that cannot guarantee confidentiality is refused rather than quietly paid in the clear.


How it works

A payment is three beats, all standard x402:

  1. Ask. GET /resource?nonce=N with X-Payer: <name>. Unpaid, it answers
  2. 402 with a price and a one-time account.
  3. Pay. The payer builds a confidential transfer into that account, signs
  4. its own half, and retries with X-PAYMENT.
  5. Settle. The facilitator verifies, co-signs the fee, broadcasts, and
  6. records the settlement. The merchant decrypts its own balance with its own
  7. key.

For the detail behind each beat, read Concepts. For the exact bodies on the wire, read the API reference.


Where to go next

If you want to…Read
Move money in five minutesQuickstart
Understand the two layers and the 409Concepts
Call the rail without an SDKAPI reference
Fix a VEIL-* refusal codeTroubleshooting
Prove the privacy claim yourselfVerify it yourself
See what it deliberately does not hideHonest limits