Errors

Muamla uses conventional HTTP status codes. Every error response has the same JSON shape.

json
{
  "error": {
    "code": "invalid_amount",
    "message": "amount must be an integer ≥ 100 (smallest MRU unit)."
  }
}

Status codes

HTTPMeaning
200 / 201Success.
400Validation error — check the message.
401Missing, malformed, or invalid API key / credentials.
403The key type isn't allowed (e.g. a publishable key on a secret-only endpoint).
404The resource doesn't exist.
409Conflict (e.g. the invoice has expired).
500Unexpected server error — safe to retry.
501Not implemented yet (e.g. live bank verification).
503Service not configured (database unavailable).

Error codes

CodeHTTPWhen
unauthorized401No / invalid / revoked API key.
forbidden403Secret key required for this endpoint.
invalid_amount400amount missing or below 100.
invalid_description400description missing.
invalid_phone400phone missing when submitting a payment.
not_found404Invoice not found.
invoice_expired409Payment attempted after expired_at.
not_implemented501Live bank verification not enabled yet.
internal_error500Unexpected error — retry with backoff.

Retries

Retry on 500 and network/timeout errors with exponential backoff. Do not retry 400/401/403/404 — fix the request instead.