Overview
This is an overview of all possible errors in the Method API.
Errors may occur either when a request is made (HTTP errors), or when a process fails after a specific resource
(entity
, account
, payment
, etc.) is has been created – (Resource errors).
Error object
All errors are represented as a JSON object with the following properties:
Name | Type | Description |
---|---|---|
code | integer | A numerical code of the error. |
type | string | A broad description of the error. |
sub_type | string | The specific error type. |
message | string | A human-readable message providing more details about the error. |
HTTP error codes
For HTTP errors, code
refers to an HTTP response status code.
2XX
: indicates success4XX
: indicates an invalid request, or developer-related issues. (e.g. a required parameter is missing from the request body.)5XX
: indicates Method-related issues
Example HTTP error
{
"error": {
"type": "INVALID_REQUEST",
"code": 400,
"sub_type": "INVALID_AMOUNT",
"message": "Invalid amount received. The minimum amount for a payment is 100 cents ($1.00)."
}
}
Resource error codes
10XXX
: indicates that an error is related to a payment resource.11XXX
: indicates that an error is related to an account resource.12XXX
: indicates that an error is related to an entity resource.13XXX
: indicates that an error is related to an account verification resource.14XXX
: indicates that an error is related to a payment reversal resource.
Example resource error (payment resource)
{
"id": "pmt_rPrDPEwyCVUcm",
"reversal_id": null,
"source_trace_id": null,
"destination_trace_id": null,
"source": "acc_JMJZT6r7iHi8e",
"destination": "acc_AXthnzpBnxxWP",
"amount": 5000,
"description": "Loan Pmt",
"status": "failed",
"error": {
"type": "PAYMENT_FAILED",
"code": 10001,
"sub_type": "PAYMENT_INSUFFICIENT_FUNDS",
"message": "Source account has insufficient funds."
},
"metadata": null,
"estimated_completion_date": "2020-12-11",
"source_settlement_date": "2020-12-09",
"destination_settlement_date": "2020-12-11",
"fee": null,
"created_at": "2020-12-09T00:42:31.209Z",
"updated_at": "2020-12-09T00:43:30.996Z"
}