---
title: "Simulate prepayment"
method: POST
path: "/v2/loans/{loanId}/prepayment/simulate"
tags: ["Prepayment"]
---

# Simulate prepayment

`POST /v2/loans/{loanId}/prepayment/simulate`

## Request

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

Simulate a prepayment for a loan using the prepayment engine.

The response includes the resulting balance breakdown, the new repayment
schedule, and a `simulation_id` that can later be used to register the
prepayment via `POST /v2/loans/{loanId}/prepayment/{simulationId}/register`.

This endpoint generates a [Lending prepayment creation](https://developers.pismo.io/events/docs/lending-lending-prepayment-v2-creation-1) event.

## Path parameters

- `loanId` string, uuid, required

## Headers

- `Idempotency-Key` string, uuid

## Request body

- PrepaymentSimulationV2Request
  - `amount_paid` number, double, required: Prepayment amount
  - `reduce_option` 'INSTALLMENT' | 'TERM', required: Defines the way that the outstanding loan amount is reduced.
  - `reference_date` string, date: Reference date used to compute the prepayment. When omitted, the Pismo platform sets the value to the current date. Format = YYYY-MM-DD.
  - `waive_fee` boolean: When omitted, the Pismo platform sets the value to `false`. Should the fees applied to this prepayment be waived?

## Response `201`

Prepayment simulated.

- PrepaymentSimulationV2Response
  - `amount_paid` number, double: Prepayment amount
  - `balance_breakdown` PrepaymentBalanceBreakdownV2: Detailed description of the outstanding balance settled by this prepayment, shown by component
    - `fee` number, double
    - `interest` number, double
    - `penalty` number, double
    - `principal` number, double
    - `tax` number, double
  - `created_at` string, date-time: Date and time the simulation was created. ISO 8601 with millisecond precision and offset. Format = YYYY-MM-DDThh:mm:ss.SSSZ.
  - `insurance_amount_paid` number, double: Insurance portion paid as part of the prepayment
  - `loan_id` string, uuid: ID of the loan the simulation was run against
  - `new_remaining_total` number, double: Total remaining loan amount after applying this prepayment
  - `new_repayment_schedule` PrepaymentRepaymentScheduleItemV2[]: List of resulting repayments in the schedule after applying this prepayment
    - `due_date` string, date: Installment due date. Format = YYYY-MM-DD.
    - `fee_amount` number, double
    - `installment_number` integer: Installment sequence number, starting at 1
    - `interest_amount` number, double
    - `principal_amount` number, double
    - `tax_amount` number, double
    - `total_amount` number, double
  - `penalty_amount_paid` number, double: Penalty portion paid as part of the prepayment
  - `reduce_option` 'INSTALLMENT' | 'TERM': Defines the way that the outstanding loan amount is reduced.
  - `simulation_id` string, uuid: Prepayment simulation ID
  - `tax_amount_paid` number, double: Tax portion paid as part of the prepayment

## Other responses

- `400`: A validation error occurred.
- `404`: Resource not found.
- `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)
