Skip to content
Developer guide

Errors

Standard HTTP status codes plus a typed JSON envelope.

1 / 3

Error envelope

Every error response has the same shape: the error.code field is the source of truth — the message may change, the codes won't. Quote the requestId when contacting support.

json
{
  "error": {
    "code": "card_declined",
    "type": "invalid_request_error",
    "message": "The card was declined by the issuer.",
    "param": "source.number",
    "decline_code": "insufficient_funds",
    "requestId": "req_3kf91… "
  }
}
Key2Pay Developer documentationAPI v1
Documentation
Dashboard