Confidential by defaultEstablished 201072 Jurisdictions

x402 Beta Testing, Controlled Experiments, and Proof

x402 Beta Testing: Small Controlled Experiments

The best way to understand x402 is to run progressively more difficult experiments.

Do not begin with:

production
mainnet
multiple chains
large balances
real customers
automatic unlimited agent spending

Begin with controlled evidence.


Experiment 0 — See a real 402

Objective:

Understand the protocol response.

Test:

curl a protected test endpoint

Success:

HTTP 402 returned
payment requirements visible

No payment yet.


Experiment 1 — First testnet payment

Objective:

Prove full end-to-end payment.

Configuration:

one endpoint
Base Sepolia
test USDC
US$0.01 equivalent
one test wallet

Success:

unpaid request rejected
paid retry accepted
resource delivered
settlement recorded

Experiment 2 — Wrong-payment attack

Objective:

Prove payment requirements are enforced.

Try:

  • pay less;

  • change recipient;

  • alter amount;

  • alter asset;

  • use invalid signature.

Success:

0 unauthorized deliveries

Experiment 3 — Replay

Objective:

Determine what happens if the same payment authorization is reused.

Success criterion:

No accidental multiple-resource delivery
against one invalidly replayed payment.

Experiment 4 — Agent budget

Give the agent:

US$0.25 test budget

Create endpoints:

A = $0.01
B = $0.04
C = $0.20
D = $1.00

Policy:

auto-pay <= $0.05
human approval > $0.05
hard reject > $0.50

Success:

  • A auto-pays;

  • B auto-pays;

  • C asks permission;

  • D is rejected.

Now you are testing agentic financial control, not merely payment.


Experiment 5 — Two sellers

Create:

Seller A: same result, $0.03
Seller B: same result, $0.05

Ask agent to choose based on:

price
reputation
latency

Now you are testing machine procurement.


Experiment 6 — upto

Create a variable-cost service.

Example:

Maximum authorization: $0.20

Actual usage:
$0.07

Success:

buyer authorized ceiling
seller captured actual amount
internal ledger matches

Experiment 7 — Paid MCP

Expose:

free_tool
paid_tool

Ask an MCP-compatible agent to use the paid tool.

Success:

agent encounters payment requirement
policy permits payment
payment completes
tool result is returned

Experiment 8 — Discovery

Publish/discover the resource through an x402 discovery mechanism.

Test whether another client can:

discover
understand
pay
consume

without being manually programmed with the service URL.

This gets closer to the real strategic vision.


Experiment 9 — Batch settlement

Create a controlled high-frequency workload:

1,000
5,000
10,000

logical micro-interactions.

Measure:

  • average request latency;

  • settlement count;

  • effective settlement cost per logical payment;

  • failure recovery;

  • accounting accuracy.

Compare against per-call settlement.


Experiment 10 — Real US$1 mainnet laboratory

Use:

real money
tiny wallet
hard spend cap
production facilitator
single network
single asset

Run:

100 × US$0.01 transactions

Then reconcile every one.

The objective is to prove operational reality.


Experiment 11 — External buyer

The strongest test is not your own buyer paying your own seller.

Find one external developer/company.

Give them:

  • endpoint documentation;

  • price;

  • no special onboarding beyond what your chosen compliance model requires.

Ask them to purchase the service independently.

When an external buyer succeeds, you have moved from engineering proof to market proof.


How to Prove x402 Works

A proof should have multiple layers.

Level 1 — Protocol proof

Show:

unpaid request
→ 402

paid request
→ 200

Level 2 — Cryptographic proof

Show:

invalid signature rejected
valid signature accepted

Level 3 — Settlement proof

Show:

transaction/settlement identifier
payer
recipient
asset
amount
network

Level 4 — Accounting proof

Show:

100 delivered services
=
100 valid commercial payment records
=
expected wallet/settlement balance

Level 5 — Security proof

Show that:

replay fails
tampering fails
over-budget purchase fails
wrong network fails
wrong recipient fails

Level 6 — Reliability proof

Run enough transactions to measure:

success %
P50 latency
P95 latency
P99 latency
settlement pending %
retry %
duplicate %
facilitator failure %

Level 7 — Economic proof

Calculate:

Revenue
- compute cost
- data cost
- network cost
- facilitator cost
- treasury cost
- compliance cost
- expected support/refund cost
= contribution margin

Level 8 — Customer proof

An unrelated buyer successfully purchases.

Level 9 — Agentic proof

The strongest “agentic” demonstration is:

Agent receives a goal
      ↓
Agent determines capability is missing
      ↓
Agent discovers external paid service
      ↓
Agent evaluates price against budget
      ↓
Agent pays without human intervention
      ↓
Agent consumes result
      ↓
Agent completes original goal
      ↓
Full audit trail exists

That is the demonstration worth showing to a board, customer, or conference audience.


How to Play With It

Here is a practical laboratory menu.

Protocol experiments

  1. Request a paid endpoint with no payment.

  2. Decode the payment-required data.

  3. Change the quoted amount locally and see verification fail.

  4. Change the recipient.

  5. Use an expired authorization.

  6. Reuse an authorization.

  7. Attempt insufficient funds.

  8. Try an unsupported asset.

  9. Try an unsupported network.

  10. Observe settlement confirmation.

Pricing experiments

  1. Change price from US$0.01 to US$0.05.

  2. Make price depend on request complexity.

  3. Use upto.

  4. Compare fixed vs usage billing.

Agent experiments

  1. Give an agent a US$0.10 budget.

  2. Add seller allowlists.

  3. Add network allowlists.

  4. Add human approval above a threshold.

  5. Force the agent to choose between two suppliers.

  6. Test what happens when the cheaper supplier fails.

Discovery experiments

  1. Publish an endpoint into discovery.

  2. Search for it by category/capability.

  3. Test machine-readable metadata.

  4. Change pricing and see how discovery representation changes.

Identity experiments

  1. Pay for access.

  2. Return later and prove wallet control.

  3. Avoid paying twice where entitlement semantics permit.

Performance experiments

  1. Run 1,000 exact payments.

  2. Run equivalent logical payments with batch settlement.

  3. Compare latency and cost.

Failure experiments

  1. Turn facilitator access off mid-test.

  2. Simulate timeout after transaction broadcast.

  3. Reconcile a settlement_pending state.

  4. Confirm your system does not blindly retry and double-execute expensive work.

Treasury experiments

  1. Receive stablecoin.

  2. Move it to a treasury wallet.

  3. Convert according to a controlled policy.

  4. Reconcile realized fees/slippage.

By the end of these experiments, your team will understand x402 far better than by reading protocol documentation alone.


If You Are Building This Commercially

If a beta evolves into a customer-facing money-movement product rather than a seller receiving payment for its own service, pause before scaling and map the operating model to the relevant licensing pathway.

Key Takeaway

A convincing proof moves through protocol proof, security proof, operational proof, economic proof, and external-customer proof. One successful transaction proves only the happy path.

This page is part of x402 Protocol Explained, the full guide to how machine-to-machine payments work.

Sources and Further Reading

Share
Page Last Updated: 21/Sep/2026 (5396089)