> ## Documentation Index
> Fetch the complete documentation index at: https://docs.finosu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Loan Servicing

> Cancel loan servicing and all associated scheduled payments and communications. Sets the loan's servicing status to NOT_SERVICING and cancels all pending scheduled payments, calls, emails, and SMS.

## Overview

This endpoint cancels servicing for a specific loan, stopping all automated communications and scheduled payments. Use this when a loan should no longer be actively serviced by the platform.

## What Gets Cancelled

When you call this endpoint, the following actions are taken:

* **Loan Status**: Sets the loan's servicing status to `NOT_SERVICING`
* **Stop Reason**: Records the reason for stopping servicing (defaults to `API_REQUEST`)
* **Scheduled Payments**: Cancels all pending scheduled payments for the loan
* **Scheduled Calls**: Cancels all pending scheduled calls
* **Scheduled Emails**: Cancels all pending scheduled emails
* **Scheduled SMS**: Cancels all pending scheduled SMS messages
* **Call Schedules**: Cancels all active loan call schedules
* **Email Schedules**: Cancels all active loan email schedules
* **SMS Schedules**: Cancels all active loan SMS schedules

## Use Cases

* Customer has paid off their loan in full
* Loan has been sold to another servicer
* Customer filed for bankruptcy
* Fraud has been detected on the account
* Customer is deceased
* Customer is in the military (SCRA protection)
* Loan was created by mistake and needs to be removed from servicing

## Stop Servicing Reasons

You can optionally provide a reason for stopping servicing. Valid values are:

| Reason                           | Description                            |
| -------------------------------- | -------------------------------------- |
| `API_REQUEST`                    | Default reason when cancelled via API  |
| `PAID_OFF`                       | Loan has been paid in full             |
| `BANKRUPTCY`                     | Customer filed for bankruptcy          |
| `FRAUD_CLAIM`                    | Fraud detected on the account          |
| `MILITARY`                       | Customer is protected under SCRA       |
| `DECEASED`                       | Customer is deceased                   |
| `INCARCERATED`                   | Customer is incarcerated               |
| `DEBT_MANAGEMENT_COMPANY`        | Account transferred to debt management |
| `NO_LOGIN_2M`                    | No customer login for 2 months         |
| `NO_PAYMENT_OR_PLAN_3M`          | No payment or plan for 3 months        |
| `NO_PLAN_PAYMENT_2M`             | No plan payment for 2 months           |
| `NO_PAYMENT_OR_PLAN_4M`          | No payment or plan for 4 months        |
| `SOLD_OFF`                       | Loan sold to another servicer          |
| `MISTAKE`                        | Loan was created in error              |
| `NO_VALID_COMMUNICATION_CHANNEL` | No valid way to contact customer       |
| `DEBT_DISPUTE`                   | Customer is disputing the debt         |
| `COMPLAINT_TRIGGER`              | Triggered by customer complaint        |
| `HISTORICAL_INELIGIBLE`          | Historically ineligible for servicing  |
| `DUPLICATE`                      | Duplicate loan record                  |
| `REFUSES_TO_PAY`                 | Customer refuses to pay                |
| `LMS_CLOSED`                     | Loan closed from external LMS sync     |

## Request Body

The request body is optional. If not provided, the reason defaults to `API_REQUEST`.

```json theme={null}
{
  "reason": "PAID_OFF"
}
```

## Response

The response includes counts of all cancelled items:

```json theme={null}
{
  "id": "LOAN-12345",
  "servicingStatus": "NOT_SERVICING",
  "stopServicingReason": "PAID_OFF",
  "cancelledScheduledPayments": 3,
  "cancelledCallSchedules": 1,
  "cancelledEmailSchedules": 1,
  "cancelledSmsSchedules": 1,
  "cancelledCalls": 5,
  "cancelledEmails": 2,
  "cancelledSms": 3
}
```

## Error Responses

| Status Code | Description             |
| ----------- | ----------------------- |
| 400         | Invalid reason provided |
| 404         | Loan not found          |
| 500         | Internal server error   |


## OpenAPI

````yaml POST /loans/{id}/cancel-servicing
openapi: 3.1.0
info:
  title: Finosu API
  description: Finosu API
  license:
    name: MIT
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
paths:
  /loans/{id}/cancel-servicing:
    post:
      description: >-
        Cancel loan servicing and all associated scheduled payments and
        communications. Sets the loan's servicing status to NOT_SERVICING and
        cancels all pending scheduled payments, calls, emails, and SMS.
      parameters:
        - name: id
          in: path
          description: External reference ID of the loan to cancel servicing for
          required: true
          schema:
            type: string
      requestBody:
        description: >-
          Optional reason for stopping servicing. Defaults to API_REQUEST if not
          specified.
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelLoanServicingRequest'
      responses:
        '200':
          description: Loan servicing cancelled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelLoanServicingResponse'
        '400':
          description: Invalid reason provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Loan not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CancelLoanServicingRequest:
      type: object
      properties:
        reason:
          type: string
          description: >-
            Reason for stopping servicing. Defaults to API_REQUEST if not
            specified.
          enum:
            - PAID_OFF
            - BANKRUPTCY
            - FRAUD_CLAIM
            - MILITARY
            - DECEASED
            - INCARCERATED
            - DEBT_MANAGEMENT_COMPANY
            - NO_LOGIN_2M
            - NO_PAYMENT_OR_PLAN_3M
            - NO_PLAN_PAYMENT_2M
            - NO_PAYMENT_OR_PLAN_4M
            - SOLD_OFF
            - MISTAKE
            - NO_VALID_COMMUNICATION_CHANNEL
            - DEBT_DISPUTE
            - COMPLAINT_TRIGGER
            - HISTORICAL_INELIGIBLE
            - DUPLICATE
            - REFUSES_TO_PAY
            - LMS_CLOSED
            - API_REQUEST
          example: PAID_OFF
    CancelLoanServicingResponse:
      type: object
      required:
        - id
        - servicingStatus
        - stopServicingReason
        - cancelledScheduledPayments
        - cancelledCallSchedules
        - cancelledEmailSchedules
        - cancelledSmsSchedules
        - cancelledCalls
        - cancelledEmails
        - cancelledSms
      properties:
        id:
          type: string
          description: Loan external reference ID
        servicingStatus:
          type: string
          description: New servicing status (NOT_SERVICING)
          example: NOT_SERVICING
        stopServicingReason:
          type: string
          description: Reason for stopping servicing
          example: PAID_OFF
        cancelledScheduledPayments:
          type: integer
          description: Number of scheduled payments cancelled
          example: 3
        cancelledCallSchedules:
          description: Number of call schedules cancelled
          type: integer
          example: 1
        cancelledEmailSchedules:
          description: Number of email schedules cancelled
          type: integer
          example: 1
        cancelledSmsSchedules:
          type: integer
          description: Number of SMS schedules cancelled
          example: 1
        cancelledCalls:
          type: integer
          description: Number of scheduled calls cancelled
          example: 5
        cancelledEmails:
          description: Number of scheduled emails cancelled
          type: integer
          example: 2
        cancelledSms:
          type: integer
          description: Number of scheduled SMS cancelled
          example: 3
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````