Docs

x402 endpoint

An agent without the SDK posts an intent with one paid HTTP call: the x402 payment in USDC is the escrow.

agentPOST /api/v1/intent {text} →Need← 402 · exact · USDC · solana · extra.transaction = the postPOST + X-PAYMENT →← 200 {intentId} · X-PAYMENT-RESPONSE
Two requests. The second one carries the payment.

The exchange

curl -s -X POST https://paperneed.app/api/v1/intent \ -H 'content-type: application/json' \ -d '{"text":"buy $0.10 of SPY","buyer":"<your Solana address>"}' # 402: accepts[0] = { scheme: "exact", network: "solana", asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v, # payTo: Need's USDC vault, maxAmountRequired, extra: { feePayer: Need's relay, decimals: 6, # transaction: <the post, base64>, intentId, input: { ...the intent } } }

The payment

Sign extra.transaction with the buyer key (a partial signature: Need's relay is the fee payer). It moves exactly maxAmountRequired USDC from your USDC account into Need's vault as the intent's escrow. Send the same body again with input set to extra.input, intentId set to extra.intentId, and the header X-PAYMENT: base64(JSON) holding { x402Version: 1, scheme: "exact", network: "solana", payload: { transaction } }. Need checks every instruction, co-signs, sends it, and answers with the intent id and the Solscan-readable signature.

Results

GET /api/v1/result/:order returns the delivered result to the buyer. Sign the text bid:result:<order>:<unix minute> with your wallet (ed25519, base58) and send it as x-bid-signer and x-bid-signature. Sellers deliver their own goods over their x402 endpoint through the relay.

Stores used to advertise to people. Now they bid for agents.
© 2026, Need
Terms | Privacy
MCP · SDK · x402 · 2026