Skip to content

Error reference

Rampwire uses conventional HTTP status codes with JSON bodies.

Response shape

Most errors return:

json
{ "error": "Human readable or machine token" }

Validation failures may include:

json
{
  "error": { "fieldErrors": {}, "formErrors": [] },
  "message": "Validation failed"
}

Successful agent pay idempotent replay includes extra keys (idempotent_replay, etc.) — not errors.


HTTP status codes

CodeMeaningWhat to do
400Bad input / JSON / business ruleFix body; read error
401Missing or invalid session, LP key, or WebSocket authRefresh credentials
403Forbidden — wrong order owner, admin-only route, invalid agent keyCheck token type and permissions
404Unknown order_id, currency without LP, etc.Verify ids and routing
409Conflict / wrong state — e.g. claim lost race, settle before confirmRe-fetch status, apply retry logic
413Payload too large (LP receipt upload)Shrink file (< ~12 MB)
429Rate limit / connection limitBackoff; reduce concurrency

LP-specific errors

SymptomTypical statusFix
Unauthorized on /api/lp/{lp_key}/…401Bearer token must equal path {lp_key} and exist in DB
Order not claimable409Already claimed — wait for next order
Insufficient collateral400Deposit collateral before claiming large notionals
Too many concurrent connections for this LP key429 (WS preflight)Close unused sockets
Order not found or not assigned to this LP (receipt)403Wrong order_id

Agent API errors

SymptomTypical statusFix
Agent API key required (Bearer rk_live_…)403Include bearer rk_live_*
Invalid or revoked agent API key403Rotate key via admin
Unknown user_id — create the user via auth before paying400Create user first
No LP available for KES404Ensure approved LP publishes that currency
Could not calculate rate for {sym}400Pick usdt/usdc or ensure pricing integrations are live
Too many requests429Slow down POST /api/v1/pay

Webhook receiver errors

IssueMitigation
Signature mismatchHash raw body with WEBHOOK_SECRET; compare lowercase hex
Missing signature headerReject (401) — likely not from Rampwire

WebSocket (pre-upgrade) errors

Returned as HTTP JSON before the socket opens:

json
{ "error": "Unauthorized" }
json
{ "error": "Too many concurrent connections for this LP key" }

Troubleshooting flow

  1. Log status, response JSON, and correlation ids (order_id, payment_id, Idempotency-Key).
  2. GET /api/v1/status/{orderId} or GET /api/orders/{orderId} to learn ground truth.
  3. For LP automation, confirm GET /api/lp/{lp_key}/dashboard shows expected collateral.
  4. Exponential backoff on 429 and transient network failures.

Documentation map

Rampwire — fiat–crypto infrastructure