---
title: "Cancel loan"
method: POST
path: "/v2/loans/{loanId}/cancel"
tags: ["Loans"]
---

# Cancel loan

`POST /v2/loans/{loanId}/cancel`

## Request

- Base URL: `https://sandbox.pismolabs.io/lending`
- URL: `https://sandbox.pismolabs.io/lending/v2/loans/{loanId}/cancel`
- Auth: HTTP bearer

Cancels a loan.

This endpoint generates a [Loan updated](https://developers.pismo.io/events/docs/lending-lending-loan-update-1) event.

## Path parameters

- `loanId` string, uuid, required

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- CancelLoanV2Request
  - `tracking_id` string, uuid, required: Tracking ID
  - `metadata` CancelLoanV2Metadata: Additional loan cancellation information **Note**: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to [Get started with Pismo APIs](ref:get-started-with-pismo-apis).
  - `processing_code` LoanCancellationProcessingCodes: Define processing codes for each operation during the loan cancellation.
    - `booking` string: Processing code
    - `penalty_waiver` string: Processing code
    - `repayment` string: Processing code
  - `refund_paid_repayments` boolean: Refund paid repayments upon loan cancellation?

## Response `202`

Cancellation accepted

- CancelLoanV2Response
  - `canceled_loan_id` string, required: Custom ID for the loan. Must consist of uppercase alphanumeric characters and underscores.
  - `reversal_authorization_id` number, required: Authorization ID
  - `reversal_tracking_id` string, uuid, required: Authorization tracking ID

## Other responses

- `400`: A validation error occurred.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/pismo/apis/lending.md) - [All operations](https://skmtc.dev/pismo/apis/lending/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/lending/revisions/a288022e3d8b?raw)
