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 spendingBegin with controlled evidence.
Experiment 0 — See a real 402
Objective:
Understand the protocol response.
Test:
curl a protected test endpointSuccess:
HTTP 402 returned
payment requirements visibleNo 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 walletSuccess:
unpaid request rejected
paid retry accepted
resource delivered
settlement recordedExperiment 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 deliveriesExperiment 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 budgetCreate endpoints:
A = $0.01
B = $0.04
C = $0.20
D = $1.00Policy:
auto-pay <= $0.05
human approval > $0.05
hard reject > $0.50Success:
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.05Ask agent to choose based on:
price
reputation
latencyNow you are testing machine procurement.
Experiment 6 — upto
Create a variable-cost service.
Example:
Maximum authorization: $0.20
Actual usage:
$0.07Success:
buyer authorized ceiling
seller captured actual amount
internal ledger matchesExperiment 7 — Paid MCP
Expose:
free_tool
paid_toolAsk an MCP-compatible agent to use the paid tool.
Success:
agent encounters payment requirement
policy permits payment
payment completes
tool result is returnedExperiment 8 — Discovery
Publish/discover the resource through an x402 discovery mechanism.
Test whether another client can:
discover
understand
pay
consumewithout 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,000logical 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 assetRun:
100 × US$0.01 transactionsThen 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
→ 200Level 2 — Cryptographic proof
Show:
invalid signature rejected
valid signature acceptedLevel 3 — Settlement proof
Show:
transaction/settlement identifier
payer
recipient
asset
amount
networkLevel 4 — Accounting proof
Show:
100 delivered services
=
100 valid commercial payment records
=
expected wallet/settlement balanceLevel 5 — Security proof
Show that:
replay fails
tampering fails
over-budget purchase fails
wrong network fails
wrong recipient failsLevel 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 marginLevel 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 existsThat 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
Request a paid endpoint with no payment.
Decode the payment-required data.
Change the quoted amount locally and see verification fail.
Change the recipient.
Use an expired authorization.
Reuse an authorization.
Attempt insufficient funds.
Try an unsupported asset.
Try an unsupported network.
Observe settlement confirmation.
Pricing experiments
Change price from US$0.01 to US$0.05.
Make price depend on request complexity.
Use
upto.Compare fixed vs usage billing.
Agent experiments
Give an agent a US$0.10 budget.
Add seller allowlists.
Add network allowlists.
Add human approval above a threshold.
Force the agent to choose between two suppliers.
Test what happens when the cheaper supplier fails.
Discovery experiments
Publish an endpoint into discovery.
Search for it by category/capability.
Test machine-readable metadata.
Change pricing and see how discovery representation changes.
Identity experiments
Pay for access.
Return later and prove wallet control.
Avoid paying twice where entitlement semantics permit.
Performance experiments
Run 1,000 exact payments.
Run equivalent logical payments with batch settlement.
Compare latency and cost.
Failure experiments
Turn facilitator access off mid-test.
Simulate timeout after transaction broadcast.
Reconcile a
settlement_pendingstate.Confirm your system does not blindly retry and double-execute expensive work.
Treasury experiments
Receive stablecoin.
Move it to a treasury wallet.
Convert according to a controlled policy.
Reconcile realized fees/slippage.
By the end of these experiments, your team will understand x402 far better than by reading protocol documentation alone.
Related x402 Explainers
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.
