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

# Create prepayment quote

> Creates a time-limited, auditable prepayment quote with settlement and rebate breakdown.



## OpenAPI

````yaml en/openapi/v3-current/lender.yaml post /api/v1/br/loan-accounts/{id}/prepayment-quote
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: Code-first OpenAPI 3.1 surface for the Lender service.
  license:
    name: Lerian Studio General License
  title: Lender API
  version: 1.0.0
servers:
  - url: https://lender.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: >-
      Ledger accounting operations: journal entries and accrual postings for
      loan accounts.
    name: Accounting
  - description: >-
      Loan application intake and lifecycle: submission, decisioning, and
      status.
    name: LoanApplications
  - description: >-
      Loan product catalog: definition, versioning, and activation of lending
      products.
    name: LoanProducts
  - description: >-
      Loan account servicing operations: balances, schedules, and account-level
      actions.
    name: Loan Accounts
  - description: >-
      Servicing read operations: repayment schedules and servicing state for
      loan accounts.
    name: Servicings
  - description: >-
      Portfolio dashboard read operations: aggregated portfolio and performance
      views.
    name: Dashboard
  - description: >-
      Jurisdiction registry: supported jurisdiction profiles and their
      capabilities.
    name: Jurisdictions
  - description: >-
      Jurisdiction-specific loan application operations (Brazil origination
      surface).
    name: Loan Applications
  - description: >-
      Tax computation operations for jurisdiction-specific lending (e.g. Brazil
      IOF).
    name: Tax
  - description: >-
      Brazil consignado privado operations: contract origination (contratação
      ativa) and lifecycle.
    name: Consignado
paths:
  /api/v1/br/loan-accounts/{id}/prepayment-quote:
    post:
      tags:
        - Loan Accounts
      summary: Create prepayment quote
      description: >-
        Creates a time-limited, auditable prepayment quote with settlement and
        rebate breakdown.
      operationId: createPrepaymentQuote
      parameters:
        - description: Loan account identifier.
          in: path
          name: id
          required: true
          schema:
            description: Loan account identifier.
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              discriminator:
                mapping:
                  full_settlement:
                    $ref: '#/components/schemas/FullSettlementPrepaymentQuoteRequest'
                  partial:
                    $ref: '#/components/schemas/PartialPrepaymentQuoteRequest'
                propertyName: quoteType
              oneOf:
                - $ref: '#/components/schemas/PartialPrepaymentQuoteRequest'
                - $ref: '#/components/schemas/FullSettlementPrepaymentQuoteRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepaymentQuoteResponse'
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    FullSettlementPrepaymentQuoteRequest:
      additionalProperties: false
      properties:
        businessDate:
          description: >-
            Optional valuation date (RFC3339 or YYYY-MM-DD); defaults to now
            (UTC).
          examples:
            - '2026-06-14'
          type: string
        overridePdd:
          description: When true, overrides the PDD stage gate during quote generation.
          type: boolean
        quoteType:
          description: 'Discriminator: full settlement of the outstanding balance.'
          enum:
            - full_settlement
          type: string
      required:
        - quoteType
      type: object
    PartialPrepaymentQuoteRequest:
      additionalProperties: false
      properties:
        amount:
          description: Prepayment amount in major currency units (e.g. "100.00").
          examples:
            - '42000.00'
          type: string
        businessDate:
          description: >-
            Optional valuation date (RFC3339 or YYYY-MM-DD); defaults to now
            (UTC).
          examples:
            - '2026-06-14'
          type: string
        quoteType:
          description: 'Discriminator: partial principal prepayment.'
          enum:
            - partial
          type: string
      required:
        - quoteType
        - amount
      type: object
    PrepaymentQuoteResponse:
      additionalProperties: false
      properties:
        acceptedAt:
          description: >-
            RFC3339 UTC timestamp when the quote was accepted; empty while still
            pending.
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        acceptedTransactionId:
          description: >-
            Identifier of the settlement transaction that accepted the quote;
            empty while still pending.
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        chargeRebate:
          description: >-
            Rebate of unaccrued charges and fees credited on prepayment, as a
            decimal string, scale 2.
          examples:
            - '120.00'
          type: string
        consumerProtectionRegime:
          description: Consumer-protection regime label applied to the prepayment terms.
          type: string
        createdAt:
          description: RFC3339 UTC timestamp when the quote was created.
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        expiresAt:
          description: RFC3339 UTC timestamp after which the quote is no longer valid.
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        grossAmount:
          description: >-
            Retired settlement principal being paid off (equals the outstanding
            principal for a full settlement), as a decimal string, scale 2.
          examples:
            - '42000.00'
          type: string
        id:
          description: Unique identifier (UUID) of the prepayment quote.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        interestRebate:
          description: >-
            Mandatory interest rebate (juros nao incorridos) credited on
            prepayment, as a decimal string, scale 2.
          examples:
            - '1250.75'
          type: string
        iofReconciliation:
          description: >-
            IOF adjustment as a decimal string, scale 2. Defined-principal loans
            report zero because IOF is not refunded on early payoff.
          examples:
            - '0.00'
          type: string
        jurisdictionCode:
          description: ISO jurisdiction code governing the quote (e.g. "BR").
          examples:
            - BR
          type: string
        loanAccountId:
          description: UUID of the loan account the quote was generated for.
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        netSettlementAmount:
          description: >-
            Net cash payable to settle: gross settlement principal minus charge
            rebate plus any IOF due, as a decimal string, scale 2. Interest
            rebate is disclosure-only; defined-principal loans report zero IOF
            reconciliation because IOF is not refunded.
          examples:
            - '41880.00'
          type: string
        principalOutstanding:
          description: >-
            Outstanding principal at quote time as a decimal string in major
            currency units, scale 2.
          examples:
            - '42000.00'
          type: string
        profileVersion:
          description: Jurisdiction profile version used to compute the quote.
          examples:
            - 1.0.0
          type: string
        quoteType:
          description: 'Quote variant: partial (principal prepayment) or full_settlement.'
          examples:
            - partial
          type: string
        rebateMandatory:
          description: >-
            True when regulation mandates applying the interest rebate to this
            quote.
          type: boolean
      required:
        - id
        - loanAccountId
        - quoteType
        - principalOutstanding
        - interestRebate
        - chargeRebate
        - iofReconciliation
        - grossAmount
        - netSettlementAmount
        - rebateMandatory
        - expiresAt
        - profileVersion
        - jurisdictionCode
        - consumerProtectionRegime
        - createdAt
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````