x402 APIOverview

x402 API

MindSwap exposes its paid machine-client surface on /api/x402. Paid routes use the official x402 HTTP 402 flow. Wallet-bound paid mutations and reads use SIGN-IN-WITH-X.

Base URL

https://mindswap.fun/api/x402

Core concepts

ConceptWhat it means
402 Payment RequiredServer response for an unpaid x402 route
PAYMENT-REQUIREDBase64-encoded x402 requirements returned with the 402
PAYMENT-SIGNATUREBase64-encoded payment payload sent on replay
PAYMENT-RESPONSEBase64-encoded settlement result returned on success
SIGN-IN-WITH-XSIWX proof used for wallet-bound paid mutations and reads
X-Onchain-Execution-Access-TokenExtra access token still required for onchain execution status

One-sentence mental model

  • Business API authenticates the caller before the request.
  • x402 API returns a payment challenge first, then serves the same request after replay with proof.

Route families

Paid mutations

  • POST /api/x402/quotes
  • POST /api/x402/orders
  • POST /api/x402/orders/{orderId}/emergency
  • GET /api/x402/routes with walletAddress as the source signer and optional recipientAddress for cross-namespace destination recipients
  • POST /api/x402/routes/resolve
  • POST /api/x402/onchain/routes/resolve
  • POST /api/x402/onchain/executions
  • POST /api/x402/market-intel/jobs

Wallet-bound paid mutations

  • POST /api/x402/orders
  • POST /api/x402/orders/{orderId}/emergency
  • POST /api/x402/onchain/routes/resolve
  • POST /api/x402/onchain/executions
  • POST /api/x402/market-intel/jobs

Wallet-bound reads

  • GET /api/x402/orders/{orderId}
  • GET /api/x402/onchain/executions/{executionPlanId}
  • GET /api/x402/market-intel/jobs/{jobId}