Errors
Pier uses HTTP codes to indicate the status of an API request. Generally, 2xx indicates success, 4xx indicates something was wrong with the information provided, and 5xx indicates something went wrong on Pier's servers.
Attributes
error_typestring: The type of error, which can be one ofAPPLICATION_ERROR,BORROWER_ERROR,LOAN_AGREEMENT_ERROR,INVALID_REQUEST_ERROR, orAPI_ERROR.error_codestring: The specific error that occurred, which can be used programmatically.error_messagestring: A human-readable error message for developers. These can change and should generally not be used programmatically.error_detaillist of objects: In some cases, like a validation error, we'll return a list of objects with more information about the parameter that is invalid.
{
"error_type": "BORROWER_ERROR",
"error_code": "INVALID_INPUT",
"error_message": "A value provided in the body is incorrect. See error_detail for more",
"error_detail": [
{
"value": "12708921",
"msg": "EIN must be 9 digits",
"param": "ein",
"location": "body"
}
]
}Error Codes
| error_code | error_type | status | error_message |
|---|---|---|---|
| INTERNAL_SERVER_ERROR | API_ERROR | 500 | An unexpected error occurred |
| PRODUCT_NOT_SUPPORTED | API_ERROR | 403 | This product is not supported for your api keys |
| NON_ZERO_INTEREST_NOT_ENABLED | API_ERROR | 403 | Your account is not permitted to create loans with interest |
| ENDPOINT_NOT_ALLOWED_IN_PRODUCTION | API_ERROR | 403 | This endpoint is only allowed in the sandbox |
| DUPLICATE_EIN | BORROWER_ERROR | 400 | A borrower with that EIN already exists |
| DUPLICATE_SSN | BORROWER_ERROR | 400 | A borrower with that SSN already exists |
| UNABLE_TO_DELETE_BORROWER | BORROWER_ERROR | 400 | There was an error attempting to delete the borrower |
| UNSUPPORTED_STATE | BORROWER_ERROR | 400 | This state is not supported for your API keys |
| APPLICATION_NOT_FOUND | APPLICATION_ERROR | 404 | The application resource does not exist |
| APPLICATION_CANNOT_BE_CREATED | APPLICATION_ERROR | 400 | The application credit type can't be created for this type of borrower |
| APPLICATION_CANNOT_BE_APPROVED | APPLICATION_ERROR | 400 | The application's status must be pending in order to approve it |
| APPLICATION_CANNOT_BE_REJECTED | APPLICATION_ERROR | 400 | The application's status must be pending in order to reject it |
| APPLICATION_CANNOT_BE_EVALUATED | APPLICATION_ERROR | 400 | The application's status must be pending in order to evaluate it |
| BORROWER_NOT_FOUND | BORROWER_ERROR | 404 | The borrower resource does not exist |
| CUSTOMER_ALREADY_EXISTS | CUSTOMER_ERROR | 400 | A customer with this email already exists |
| CUSTOMER_NOT_FOUND | CUSTOMER_ERROR | 404 | The customer resource does not exist with this client id |
| INVALID_BORROWER_ID | BORROWER_ERROR | 400 | The borrower_id specified is invalid |
| INVALID_APPLICATION_ID | APPLICATION_ERROR | 400 | The application_id specified is invalid |
| LOAN_AGREEMENT_NOT_FOUND | LOAN_AGREEMENT_ERROR | 404 | The loan agreement resource does not exist |
| LOAN_AGREEMENT_ALREADY_EXISTS | LOAN_AGREEMENT_ERROR | 400 | A pending loan agreement for this application already exists |
| LOAN_AGREEMENT_CANNOT_BE_CREATED | LOAN_AGREEMENT_ERROR | 400 | Can only create loan agreements for approved applications |
| LOAN_AGREEMENT_CANNOT_BE_SIGNED | LOAN_AGREEMENT_ERROR | 400 | The loan agreement's status must be pending_signature in order to sign it |
| LOAN_AGREEMENT_CREATION_FAILED | LOAN_AGREEMENT_ERROR | 400 | The loan agreement could not be created. Please retry |
| STATE_NOT_SUPPORTED | APPLICATION_ERROR | 400 | The applicant's state or territory is not supported |
| UNSUPPORTED_OFFER_TERMS | APPLICATION_ERROR | 400 | The requested offer terms are not supported for this state |
| UNAUTHORIZED | INVALID_REQUEST_ERROR | 401 | The API key is invalid |
| FACILITY_ALREADY_EXISTS | FACILITY_ERROR | 400 | A facility already exists for this loan agreement |
| FACILITY_CANNOT_BE_CREATED | FACILITY_ERROR | 400 | The loan agreement must have a status of signed in order to create a facility |
| FACILITY_NOT_FOUND | FACILITY_ERROR | 404 | The facility resource does not exist |
| FACILITY_CANNOT_BE_CLOSED | FACILITY_ERROR | 400 | The facility is already closed |
| MISSING_REPAYMENT_BANK_DETAILS | PAYMENT_ERROR | 400 | Invalid or missing repayment bank account & routing info |
| PAYMENT_NOT_FOUND | PAYMENT_ERROR | 404 | The payment resource does not exist |
| UNABLE_TO_INITIATE_PAYMENT | PAYMENT_ERROR | 400 | Unable to initiate payment |
| PAYMENT_ALREADY_SUBMITTED | PAYMENT_ERROR | 400 | Payment with this id has already been submitted |
| OFFER_NOT_FOUND | LOAN_AGREEMENT_ERROR | 404 | The accepted offer id is invalid or does not exist |
| INVALID_WEBHOOK_URL | INVALID_REQUEST_ERROR | 400 | The webhook url is not a valid url |
| KYC_NOT_APPROVED | BORROWER_ERROR | 400 | The borrower's KYC status must be approved |
| BALANCE_REMAINING_LESS_THAN_PAYMENT | PAYMENT_ERROR | 400 | The remaining balance is less than the payment submitted |
| DISBURSEMENT_ACH_DISABLED | FACILITY_ERROR | 400 | Your account is not enabled for ACH disbursements |
| DISBURSEMENT_AMOUNT_EXCEEDS_FACILITY_AMOUNT | FACILITY_ERROR | 400 | The disbursement amount may not exceed the loan amount |
| DISBURSEMENT_NOT_FOUND | FACILITY_ERROR | 404 | The disbursement resource does not exist |
| LEDGERING_DISABLED | LEDGERING_ERROR | 400 | Your account is not enabled for ledgering |