corridor-in-a-box

HTTP API

@corridor/service turns the engine library into a service (zero runtime deps, Node http).

POST /payments

Body is a PaymentIntent:

{
  "idempotencyKey": "demo-0001",
  "corridorId": "mx-example",
  "sender": { "id": "sender-1" },
  "recipient": { "id": "recipient-1" },
  "sourceAmount": { "asset": "USDC", "amount": "100.00" }
}

Status mapping: 200 completed · 409 idempotency conflict / quote issues · 403 KYC rejected · 422 invalid amount · 502/504 anchor/settlement · 401 missing API key · 429 rate limited.

Other endpoints

  • GET /payments/:key — current run state.
  • GET /healthz — liveness (public, unmetered).

Optional bearer API-key auth and an in-memory token-bucket rate limiter are configured on the service context.