Agent creates the order
Use the Agent API when software already knows the destination wallet and wants deposit instructions directly.
POST /api/agent/v1/quotes POST /api/agent/v1/orders
HekaSwap
Agents can quote routes for free, pay a $0.01 x402 access fee, create a swap order, or generate an XMR payment request without opening the browser UI.
This is for wallets, scripts, trading bots, AI agents, commerce flows, and app backends that need a clean way to request XMR swap instructions. Heka does not ask for private keys and does not receive the swap principal. The agent pays the small API fee for direct order creation, then sends swap funds directly to the provider deposit address returned by the order.
Use the Agent API when software already knows the destination wallet and wants deposit instructions directly.
POST /api/agent/v1/quotes POST /api/agent/v1/orders
Create an XMR request for a merchant, share the hosted checkout, or keep going through the API.
POST /api/payments/v1/merchant/requests
GET /pay/{requestId}
Run the local MCP server and expose Heka tools to Claude Desktop, Cursor, custom agents, or bot runtimes.
npm run mcp:heka
OpenAPI, x402 discovery, manifest, and llms.txt are public so scanners and agents can index the service.
GET /openapi.json GET /.well-known/x402 GET /llms.txt
Pull route caps, x402 payment metadata, and endpoint URLs from the public manifest.
GET https://www.hekaswap.com/api/agent/v1/routes GET https://www.hekaswap.com/.well-known/x402
Use preview quotes before the final receive wallet is known, then create an order once the payout wallet is ready.
Loading quote example...
Order creation requires an Idempotency-Key and a valid x402 payment header. Never send a private key to HekaSwap.
POST /api/agent/v1/orders Idempotency-Key: agent-job-001 PAYMENT-SIGNATURE: generated-by-your-x402-client
Send swap funds only after an order response returns depositInstructions and the asset/network match what the agent expects.
GET /api/agent/v1/orders/{orderId}
Loading the live agent surface...
Your agent handles the x402 payment locally, calls Heka, and stores the returned order id. The swap itself still settles through the selected provider.
Loading JavaScript example...
Create a merchant-owned XMR request, receive a checkout link, and let the payer choose ETH, Base USDC, SOL, BTC, or another accepted route.
Loading payment request example...
Configure the MCP server with a merchant key when you want the agent to own request history and webhook-backed checkouts.
Loading MCP example...
Use this to verify route discovery and quote creation before wiring x402 order payment.
Loading curl example...
Use a unique Idempotency-Key for every order attempt. Provide a refundAddress for the source chain whenever possible. Re-check deposit asset, deposit network, minimums, provider, and expiry before sending funds. x402 pays for API access only; it is not the swap amount. Keep merchant API keys server-side only.