curl --request POST \
--url https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/preview-repayment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "125.00",
"effectiveDate": "2026-06-14",
"transactionDate": "2026-06-14"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/preview-repayment"
payload := strings.NewReader("{\n \"amount\": \"125.00\",\n \"effectiveDate\": \"2026-06-14\",\n \"transactionDate\": \"2026-06-14\"\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '125.00', effectiveDate: '2026-06-14', transactionDate: '2026-06-14'})
};
fetch('https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/preview-repayment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/preview-repayment"
payload = {
"amount": "125.00",
"effectiveDate": "2026-06-14",
"transactionDate": "2026-06-14"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"allocations": [
{
"dueDate": "2026-06-14",
"feesAmount": "3.50",
"fullyPaid": true,
"installmentNumber": 3,
"interestAmount": "20.00",
"penaltiesAmount": "1.50",
"principalAmount": "100.00",
"totalAmount": "125.00"
}
],
"appliedAmount": "125.00",
"backdated": true,
"effectiveDate": "2026-06-14",
"loanAccountId": "550e8400-e29b-41d4-a716-446655440000",
"overpaymentAmount": "0.00"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Preview repayment allocation
Returns a deterministic repayment allocation preview without recording a transaction. Not idempotency-gated. A malformed UUID yields 422 (schema error). A malformed amount string yields 422.
curl --request POST \
--url https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/preview-repayment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "125.00",
"effectiveDate": "2026-06-14",
"transactionDate": "2026-06-14"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/preview-repayment"
payload := strings.NewReader("{\n \"amount\": \"125.00\",\n \"effectiveDate\": \"2026-06-14\",\n \"transactionDate\": \"2026-06-14\"\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '125.00', effectiveDate: '2026-06-14', transactionDate: '2026-06-14'})
};
fetch('https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/preview-repayment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/preview-repayment"
payload = {
"amount": "125.00",
"effectiveDate": "2026-06-14",
"transactionDate": "2026-06-14"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"allocations": [
{
"dueDate": "2026-06-14",
"feesAmount": "3.50",
"fullyPaid": true,
"installmentNumber": 3,
"interestAmount": "20.00",
"penaltiesAmount": "1.50",
"principalAmount": "100.00",
"totalAmount": "125.00"
}
],
"appliedAmount": "125.00",
"backdated": true,
"effectiveDate": "2026-06-14",
"loanAccountId": "550e8400-e29b-41d4-a716-446655440000",
"overpaymentAmount": "0.00"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Autorizaciones
JWT bearer token issued by the identity provider.
Parámetros de ruta
Loan account identifier (UUID).
"550e8400-e29b-41d4-a716-446655440000"
Cuerpo
Repayment amount in major currency units (e.g. "125.00"). Must be positive with at most 2 fractional digits.
"125.00"
ISO-8601 or YYYY-MM-DD effective date.
"2026-06-14"
ISO-8601 or YYYY-MM-DD transaction date (fallback when effectiveDate is absent).
"2026-06-14"
Respuesta
OK
Per-installment allocation breakdown.
Show child attributes
Show child attributes
Amount applied to the loan (2 d.p. string).
"125.00"
True if the repayment effective date is before the business date.
ISO-8601 effective date applied to this preview.
"2026-06-14"
Loan account UUID.
"550e8400-e29b-41d4-a716-446655440000"
Excess amount above total outstanding (2 d.p. string).
"0.00"
¿Esta página le ayudó?

