The Error object
The body of every failed call.
Parse errors[]: each entry has a stable code, a type that tells you how to react, a human message and, when there is one, the field at fault. The older keys (detail, error, message, code) stay in the body for integrations written before errors[] existed. See the Errors guide.
Attributes
environmentstringThe environment of the key that made the call: sandbox for fxp_test_ keys, live for fxp_live_ keys. Present in every JSON body.
One of sandbox, live.
successbooleanAlways false for an error.
errorsarray of objectThe errors, most important first. Parse this array; the other keys are the older shapes of the same error and stay for existing integrations.
ShowHide 7 attributes
codestringStable, machine-readable code in snake_case. Branch on this, never on the message.
typestringThe family of the error: tells you how to react.
One of authentication_error, permission_error, validation_error, not_found, conflict, payment_error, rate_limit_error, supplier_error, internal_error.
titlestringA short label of the error.
messagestringA sentence for a human: what is wrong and how to fix it. Wording can change; the code does not.
fieldstringnullableThe request field the error is about, when there is one.
detailsobjectnullableStructured extras of the error (for example available and required for an insufficient balance).
documentation_urlstringThe documentation of this error code.
metaobjectThe id of the request and the HTTP status, repeated for clients that only read the body.
ShowHide 2 attributes
request_idstringThe id of the request.
statusintegerThe HTTP status code.
request_idstringThe id of the request, also in the X-Request-Id header. Quote it when you write to support.
detailobjectdeprecatedLegacy name, still accepted. Use errors instead.
The older error body (a string, an object with error and message, or a list of validation errors).
errorobjectdeprecatedLegacy name, still accepted. Use errors[].code instead.
The older error code or text.
messagestringdeprecatedLegacy name, still accepted. Use errors[].message instead.
The older error message.
codestringdeprecatedLegacy name, still accepted. Use errors[].code instead.
The older error code.