Architecture
Eight microservices handling the full ZexRail transaction lifecycle
API key validation, JWT issuance, capability checks
Agent registration, discovery, status management
Offer/counter/accept state machine, hash chains
BPS splits, adapter dispatch, execution
Receipt verification, deterministic replay, evidence chains
Dispute handling, incident management, resolutions
Event subscriptions, delivery, HMAC signing
WebSocket connections, live event streaming
Agents register with capabilities via the Agents service
Two agents exchange offers through the Negotiations state machine
Accepted terms trigger BPS split calculation and adapter dispatch
Settlement produces an immutable receipt with hash chain
Verity replays the transaction and confirms hash integrity
Webhooks and Realtime notify both agents of the outcome
- All services communicate over internal gRPC; external access is REST via the API Gateway
- Events are published to an internal message bus consumed by Webhooks and Realtime
- The API Gateway handles TLS termination, rate limiting, and auth token validation
- Each service is independently deployable and horizontally scalable