DisputelyDocs

Errors

Every error response has the same simple shape.

Every error response looks like this:

{
  "code": "invalid_refund_amount",
  "detail": "refundedAmount must be greater than 0 and at most disputeAmount.",
  "param": "refundedAmount",
  "request_id": "req_8mP4xV2qLnK7vQjF"
}
FieldNotes
codeStable, machine-readable. Switch on this — never on detail.
detailHuman-readable explanation. Wording may change; don't parse it.
paramOptional. The field or query param that failed validation.
request_idAlways present. Include it when contacting support — it pins your exact request in our logs.

request_id is also returned as the X-Request-Id header on every response, success or failure.

Status codes

StatusWhen
200Success.
400Request malformed or failed validation.
401Missing or invalid API key.
403Valid key, but missing the required permission.
404Not found or not yours — we don't distinguish, to prevent ID guessing.
409Conflict — e.g. resolving an already-declined alert, or an idempotency key reuse mismatch.
422Well-formed but rejected — e.g. resolving past the respondBy window.
500Disputely bug. Retry with the same Idempotency-Key.
502Card network issue. Retry with backoff and the same Idempotency-Key.

Common codes

codeStatusMeaning
missing_credentials401No Authorization header.
invalid_credentials401Key not recognized or revoked.
ip_not_allowed401Request IP is outside the key's allowlist.
insufficient_scope403Key lacks the required permission.
alert_not_found404Alert doesn't exist or isn't yours.
account_not_found404accountId param doesn't match your account.
invalid_request400Body or query params failed validation — check param.
invalid_refund_amount400Refund is ≤ 0 or exceeds disputeAmount.
currency_mismatch400refundedCurrency ≠ disputeCurrency.
invalid_cursor400Pagination cursor malformed or expired. Restart from page 1.
alert_not_actionable409RDR alert, or already declined.
idempotency_conflict409Same Idempotency-Key, different body. Pick a new key.
cannot_resolve_after_window422Past the alert's respondBy deadline.
provider_unavailable502Card network timed out. Retry with the same key.
provider_rejected502Card network rejected the action — see detail.
internal_error500Disputely-side. Retry with the same key.

New codes may be added over time — make sure unknown codes fall through to a sensible default branch in your handler.

On this page