Saltar al contenido principal
POST
/
api
/
v1
/
br
/
loan-accounts
/
{id}
/
prepayment-quote
Crear una cotización de prepago
curl --request POST \
  --url https://lender.sandbox.lerian.net/api/v1/br/loan-accounts/{id}/prepayment-quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "<string>",
  "quoteType": "partial",
  "businessDate": "<string>"
}
'
import requests

url = "https://lender.sandbox.lerian.net/api/v1/br/loan-accounts/{id}/prepayment-quote"

payload = {
"amount": "<string>",
"quoteType": "partial",
"businessDate": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<string>', quoteType: 'partial', businessDate: '<string>'})
};

fetch('https://lender.sandbox.lerian.net/api/v1/br/loan-accounts/{id}/prepayment-quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://lender.sandbox.lerian.net/api/v1/br/loan-accounts/{id}/prepayment-quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '<string>',
'quoteType' => 'partial',
'businessDate' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://lender.sandbox.lerian.net/api/v1/br/loan-accounts/{id}/prepayment-quote"

payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"quoteType\": \"partial\",\n \"businessDate\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://lender.sandbox.lerian.net/api/v1/br/loan-accounts/{id}/prepayment-quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"quoteType\": \"partial\",\n \"businessDate\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://lender.sandbox.lerian.net/api/v1/br/loan-accounts/{id}/prepayment-quote")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"quoteType\": \"partial\",\n \"businessDate\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "chargeRebate": "<string>",
  "consumerProtectionRegime": "<string>",
  "createdAt": "<string>",
  "expiresAt": "<string>",
  "grossAmount": "<string>",
  "id": "<string>",
  "interestRebate": "<string>",
  "iofReconciliation": "<string>",
  "jurisdictionCode": "<string>",
  "loanAccountId": "<string>",
  "netSettlementAmount": "<string>",
  "principalOutstanding": "<string>",
  "profileVersion": "<string>",
  "quoteType": "<string>",
  "rebateMandatory": true,
  "acceptedAt": "<string>",
  "acceptedTransactionId": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Parámetros de ruta

id
string<uuid>
requerido

Loan account identifier.

Cuerpo

application/json
amount
string
requerido

Prepayment amount in major currency units (e.g. "100.00").

Ejemplo:

"42000.00"

quoteType
enum<string>
requerido

Discriminator: partial principal prepayment.

Opciones disponibles:
partial
businessDate
string

Optional valuation date (RFC3339 or YYYY-MM-DD); defaults to now (UTC).

Ejemplo:

"2026-06-14"

Respuesta

Created

chargeRebate
string
requerido

Rebate of unaccrued charges and fees credited on prepayment, as a decimal string, scale 2.

Ejemplo:

"120.00"

consumerProtectionRegime
string
requerido

Consumer-protection regime label applied to the prepayment terms.

createdAt
string
requerido

RFC3339 UTC timestamp when the quote was created.

Ejemplo:

"2026-06-14T12:00:00Z"

expiresAt
string
requerido

RFC3339 UTC timestamp after which the quote is no longer valid.

Ejemplo:

"2026-06-14T12:00:00Z"

grossAmount
string
requerido

Retired settlement principal being paid off (equals the outstanding principal for a full settlement), as a decimal string, scale 2.

Ejemplo:

"42000.00"

id
string
requerido

Unique identifier (UUID) of the prepayment quote.

Ejemplo:

"550e8400-e29b-41d4-a716-446655440000"

interestRebate
string
requerido

Mandatory interest rebate (juros nao incorridos) credited on prepayment, as a decimal string, scale 2.

Ejemplo:

"1250.75"

iofReconciliation
string
requerido

IOF adjustment as a decimal string, scale 2. Defined-principal loans report zero because IOF is not refunded on early payoff.

Ejemplo:

"0.00"

jurisdictionCode
string
requerido

ISO jurisdiction code governing the quote (e.g. "BR").

Ejemplo:

"BR"

loanAccountId
string
requerido

UUID of the loan account the quote was generated for.

Ejemplo:

"550e8400-e29b-41d4-a716-446655440001"

netSettlementAmount
string
requerido

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.

Ejemplo:

"41880.00"

principalOutstanding
string
requerido

Outstanding principal at quote time as a decimal string in major currency units, scale 2.

Ejemplo:

"42000.00"

profileVersion
string
requerido

Jurisdiction profile version used to compute the quote.

Ejemplo:

"1.0.0"

quoteType
string
requerido

Quote variant: partial (principal prepayment) or full_settlement.

Ejemplo:

"partial"

rebateMandatory
boolean
requerido

True when regulation mandates applying the interest rebate to this quote.

acceptedAt
string

RFC3339 UTC timestamp when the quote was accepted; empty while still pending.

Ejemplo:

"2026-06-14T12:00:00Z"

acceptedTransactionId
string

Identifier of the settlement transaction that accepted the quote; empty while still pending.

Ejemplo:

"550e8400-e29b-41d4-a716-446655440002"