{
  "type": "PAYMENT_FAILED",
  "code": 10001,
  "sub_type": "PAYMENT_INSUFFICIENT_FUNDS",
  "message": "Source account has insufficient funds."
}
{
  "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"
}

These types of errors occur after a resource has been created. The information regarding these errors are provided in the resource object’s error property.

Error Codes

A resource error’s code is unique across all resources. This code specifically indicates exactly what error occurred for what type of resource. Here is how the error codes are partitioned for each resource:

Code RangeResource
10XXXPayments
11XXXAccounts
12XXXEntities
14XXXPaymentReversals
16XXXAccountVerificationSessions
17XXXSensitive
18XXXPayoffs
19XXXEntityVerificationSessions
20XXXBalances
21XXXUpdates
23XXXCreditScores
{
  "type": "PAYMENT_FAILED",
  "code": 10001,
  "sub_type": "PAYMENT_INSUFFICIENT_FUNDS",
  "message": "Source account has insufficient funds."
}
{
  "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"
}