Published Build3 min read
An x402 Seller in an Afternoon, Then Three Days of Solana
A developer put eight machine-payable endpoints behind x402 on Solana mainnet. The protocol worked. Associated token accounts, a rotating fee payer, and a 60-second blockhash did not.
Written for builders.See today for builders
What happened
- A developer publishing as mypocketsmells put a paper-trading lab's telemetry up for sale over x402: 8 endpoints on a Cloudflare Worker, $0.01-$0.02 per request, USDC on Solana mainnet, listed in the CDP Bazaar.
- The happy path took an afternoon; getting real settlements to work took three genuinely undocumented failures.
- In x402 v2, a paid endpoint answers 402 with a PAYMENT-REQUIRED header containing base64 JSON payment requirements; the client signs a payment against those requirements and retries with a PAYMENT-SIGNATURE header; a facilitator verifies and settles on-chain and the 200 returns a settlement receipt in PAYMENT-RESPONSE.
- The author used Coinbase's CDP facilitator; PayAI also settles Solana.
- On EVM chains the x402 flow is forgiving; on Solana three of its assumptions break.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
A developer writing as mypocketsmells put a paper-trading lab's telemetry up for sale over x402: eight endpoints on a Cloudflare Worker, priced at $0.01 to $0.02 per request, settling in USDC on Solana mainnet and listed in Coinbase's CDP Bazaar [1]. According to the writeup, the happy path took an afternoon and getting real settlements to work took three failures the author calls genuinely undocumented [2]. That delta is the honest price of an agent-payable endpoint today, and all three failures are Solana-specific.
The mechanics first. A paid endpoint answers 402 with a PAYMENT-REQUIRED header carrying base64 JSON payment requirements; the client signs against those requirements and retries with PAYMENT-SIGNATURE; a facilitator verifies and settles on-chain, and the 200 comes back with a receipt in PAYMENT-RESPONSE [3]. The author used Coinbase's CDP facilitator and notes PayAI also settles Solana [4]. On EVM chains the author found this flow forgiving; on Solana three of its assumptions break [5].
Failure one presented as every buy returning 402 with `transaction_simulation_failed` and nothing else, with a funded buyer wallet and a reachable facilitator [6]. The cause: the payout address had never held USDC, so it had no associated token account for the USDC mint, and the facilitator's verification-time simulation of a transfer into a nonexistent ATA fails before anything touches the chain [7]. The fix is to send the payout address a few cents of USDC once [8]. No funds were lost during the failures, because verification rejects before money moves [9]. The generalisation is worth keeping: on EVM any address can receive tokens, while on Solana receiving is a stateful capability you provision [10].
Failure two is the one that should worry anyone running serverless. On Solana the facilitator sponsors fees, and its fee-payer pubkey is embedded in the requirements your server hands out, learned from the facilitator's `/supported` endpoint [11]. CDP rotates that fee payer between `/supported` calls while PayAI's is static [12], and six consecutive curls against the author's Worker returned three different fee payers [13]. Each Worker isolate fetches and caches `/supported` independently, so a buyer can sign a transaction naming the fee payer from isolate A and have the retry land on isolate B, which expects a different one [14]. The author's fix was pinning one `/supported` snapshot in KV with a 1200-second TTL against a 300-second payment-proof window [15], four times the proof lifetime [17], after which six requests returned one fee payer and the purchase settled on-chain in under four seconds [16].
Failure three is arithmetic, not configuration. Solana transactions embed a recent blockhash and expire in roughly 60 to 90 seconds [18], while an EVM payment authorization is a signature over typed data that survives the whole maxTimeoutSeconds window [19]. Carrying a signed payment between tools, sign in one place and redeem in another, returned BlockhashNotFound every time [20]. Against a 300-second proof window, the Solana leg gives you 20 to 30 percent of the wall clock [21]. The supplied text breaks off before prescribing a fix [22].
What to watch: whether facilitators document fee-payer rotation as coordination state rather than config, and whether x402 tooling starts treating ATA provisioning as a deployment step.
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
A developer publishing as mypocketsmells put a paper-trading lab's telemetry up for sale over x402: 8 endpoints on a Cloudflare Worker, $0.01-$0.02 per request, USDC on Solana mainnet, listed in the CDP Bazaar.
- [2]
The happy path took an afternoon; getting real settlements to work took three genuinely undocumented failures.
- [3]
In x402 v2, a paid endpoint answers 402 with a PAYMENT-REQUIRED header containing base64 JSON payment requirements; the client signs a payment against those requirements and retries with a PAYMENT-SIGNATURE header; a facilitator verifies and settles on-chain and the 200 returns a settlement receipt in PAYMENT-RESPONSE.
- [4]
The author used Coinbase's CDP facilitator; PayAI also settles Solana.
- [5]
On EVM chains the x402 flow is forgiving; on Solana three of its assumptions break.
- [6]
Symptom of the first failure: every buy attempt returned 402 again with transaction_simulation_failed and no other detail, despite a funded buyer wallet, cleanly decoding requirements and a reachable facilitator.
Sources & coverage · 1 publisher
The reporting this story was synthesized from, earliest first. Every link goes to the original.
- dev.tomypocketsmellsAug 13X402 Battle Scars
Cited in this coverage: dev.to post 'X402 Battle Scars' by mypocketsmells
Cited in this coverage: mypocketsmells, dev.to
Additional citations
- supplied source material, truncated
