Merchant setup

Expose to agents

Choose the surfaces each resource is reachable on: HTTP, MCP, A2A and ACP checkout.

Two switches decide where a resource appears: the protocol must be enabled under protocols, and the resource must name it in expose. Naming a disabled protocol fails validate, so the two can never drift apart silently.

yaml
protocols:
  http: { enabled: true }
  mcp:  { enabled: true, mountPath: /mcp }
  a2a:  { enabled: false, mountPath: /a2a }
  acp:  { enabled: false, mountPath: /acp }

resources:
  premium_report:
    # …
    expose: [http, mcp]

Protocols

Native routes. Every resource exposed over http is invocable at POST /api/resources/:id/invoke with a JSON body as input.

bash
# free resource
curl -s http://localhost:8080/api/resources/basic_weather/invoke \
  -X POST -H 'content-type: application/json' -d '{"city":"berlin"}'

# paid resource without a proof -> 402 Payment Required
curl -i http://localhost:8080/api/resources/premium_report/invoke -X POST

The proof goes in PAYMENT-SIGNATURE. Reference: Invoke a resource.

Discovery

Whatever the protocol, two public routes describe what this gateway offers:

RouteReturns
GET /.well-known/agent-commercemerchant, enabled protocols, adapter descriptors with pinned specs, settlement destination
GET /api/resourcesevery resource with its input schema, pricing, exposure and payment methods

Mount paths

Defaults are /mcp, /a2a and /acp. Two enabled mounts that overlap, or a mount that claims a route the gateway already serves (including the A2A Agent Card and ACP discovery paths), fail validation.