Spec · v0.1 draft

Developers

M.A.X.I.S. exposes the local-commerce agent contract: discoverable catalog, deterministic order creation, and x402 checkout on Solana.

Public catalog route

GET /merchants/:slug/catalog
Accept: application/json

200 OK
{
  "merchant": {
    "slug": "north-star-cafe",
    "name": "North Star Cafe",
    "city": "Bangalore"
  },
  "currency": "USD",
  "items": [
    {
      "id": "item_latte_sm",
      "name": "Latte Small",
      "usd": 4.5,
      "available": true
    },
    {
      "id": "item_cap_md",
      "name": "Cappuccino Medium",
      "usd": 5,
      "available": true
    },
    {
      "id": "item_americano",
      "name": "Americano",
      "usd": 3.75,
      "available": true
    }
  ]
}

Order route

POST /orders
Content-Type: application/json

{
  "merchantSlug": "north-star-cafe",
  "items": [{ "itemId": "item_cap_md", "qty": 2 }],
  "fulfillment": { "type": "pickup", "pickupAt": "2026-05-05T18:00:00Z" }
}

201 CREATED
{
  "orderId": "ord_8Hx3...",
  "totalUsd": 11.50,
  "status": "AWAITING_PAYMENT",
  "currency": "USD",
  "fulfillment": { "type": "pickup", "pickupAt": "2026-05-05T18:00:00Z" }
}

Checkout · 402

POST /orders/checkout
Content-Type: application/json

{ "orderId": "ord_8Hx3..." }

# Accepted alias: { "order_id": "ord_8Hx3..." }

402 PAYMENT REQUIRED
{
  "error": "payment_required",
  "orderId": "ord_8Hx3...",
  "paymentRequestId": "pr_...",
  "amount": "11.50",
  "currency": "USD",
  "asset": "USDC",
  "chain": "solana-devnet",
  "recipient": "<merchant payoutWallet>",
  "reference": "ord_8Hx3...",
  "expiresAt": "...",
  "anchor": { "...": "on-chain program + escrow hints" }
}

Agent integration · checklist

  • Resolve merchant slug from user intent
  • Fetch /catalog · cache 60s
  • Create /orders request for pickup intent
  • Handle 402 · sign and send USDC tx
  • Verify tx and poll GET /orders/:id/status until status = READY