- Cancel loan
The cancel loan endpoint will change the status of a loan to canceled, and trigger any cancellation-related logic, such as removing a loan from active monitoring and handling the accounting treatment for canceled loans.
An installment loan must be in originated or pending status to be canceled.
A line of credit loan can be canceled if it has no draws with active purchases.
Special permission is required to cancel active loans.
The metro2 details may optionally be sent with the accountStatusCode to indicate what should be reported to credit agencies.
If true, will clear all related loan, draws (if LOC), purchases (if LOC), transactions, and dynamic fees external IDs. This will emit a externalid.changed event for all impacted objects.
NOTE: If sync=true, there is a max limit of 1000 external IDs that can be cleared synchronously. If there are more than 1000, the request will fail with a HTTP 408 status code. You should instead set clearAllExternalIds=false and call the individual endpoints to clear external IDs.
Today, sync only controls the clearing of external IDs when cancelling a loan when clearAllExternalIds is true.
true - Clears the external IDs of the loan, draws, purchases, transactions, and dynamic fees up to the max limit of 1000. If there are more than 1000, the request will fail with a HTTP 408 status code.
false - will clear all external IDs asynchronously. This is not yet supported.
The cancellation reason:
technicalIssue - loan was created due to a technical issue.
wrongLoanTerms - loan was created with the wrong terms.
wrongBorrower - loan was created on the wrong borrower.
other - for any other reason requiring cancellation.
When set to true, the system will send loanCanceled notice to the borrower.
- oauth2
- bearerAuth
- apiKeyHeader
curl -i -X POST \
'https://sandboxapi.peach.finance/api/people/{personId}/loans/{loanId}/cancel?force=false&clearAllExternalIds=false&sync=true' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cancellationReason": "technicalIssue",
"metro2": {
"accountStatusCode": "13"
},
"sendCancellationNotice": false,
"caseId": "string"
}'