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/x402Core concepts
| Concept | What it means |
|---|---|
402 Payment Required | Server response for an unpaid x402 route |
PAYMENT-REQUIRED | Base64-encoded x402 requirements returned with the 402 |
PAYMENT-SIGNATURE | Base64-encoded payment payload sent on replay |
PAYMENT-RESPONSE | Base64-encoded settlement result returned on success |
SIGN-IN-WITH-X | SIWX proof used for wallet-bound paid mutations and reads |
X-Onchain-Execution-Access-Token | Extra 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/quotesPOST /api/x402/ordersPOST /api/x402/orders/{orderId}/emergencyGET /api/x402/routeswithwalletAddressas the source signer and optionalrecipientAddressfor cross-namespace destination recipientsPOST /api/x402/routes/resolvePOST /api/x402/onchain/routes/resolvePOST /api/x402/onchain/executionsPOST /api/x402/market-intel/jobs
Wallet-bound paid mutations
POST /api/x402/ordersPOST /api/x402/orders/{orderId}/emergencyPOST /api/x402/onchain/routes/resolvePOST /api/x402/onchain/executionsPOST /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}