Saltar al contenido principal
POST
/
api
/
v1
/
loan-accounts
/
{id}
/
repayments
Registrar reembolso
curl --request POST \
  --url https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/repayments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "<string>",
  "effectiveDate": "<string>",
  "transactionDate": "<string>"
}
'
import requests

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

payload = {
    "amount": "<string>",
    "effectiveDate": "<string>",
    "transactionDate": "<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>', effectiveDate: '<string>', transactionDate: '<string>'})
};

fetch('https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/repayments', 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/loan-accounts/{id}/repayments",
  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>',
    'effectiveDate' => '<string>',
    'transactionDate' => '<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/loan-accounts/{id}/repayments"

	payload := strings.NewReader("{\n  \"amount\": \"<string>\",\n  \"effectiveDate\": \"<string>\",\n  \"transactionDate\": \"<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/loan-accounts/{id}/repayments")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"amount\": \"<string>\",\n  \"effectiveDate\": \"<string>\",\n  \"transactionDate\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

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

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  \"effectiveDate\": \"<string>\",\n  \"transactionDate\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "allocations": [
    {
      "dueDate": "<string>",
      "feesAmount": "<string>",
      "fullyPaid": true,
      "installmentNumber": 123,
      "interestAmount": "<string>",
      "penaltiesAmount": "<string>",
      "principalAmount": "<string>",
      "totalAmount": "<string>"
    }
  ],
  "appliedAmount": "<string>",
  "backdated": true,
  "effectiveDate": "<string>",
  "loanAccountId": "<string>",
  "overpaymentAmount": "<string>",
  "transactionId": "<string>",
  "requestId": "<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.

Encabezados

X-Request-ID
string

Canonical idempotency request ID. Falls back to X-Idempotency when absent.

Ejemplo:

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

X-Idempotency
string

Fallback idempotency request ID used when X-Request-ID is absent.

Ejemplo:

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

Parámetros de ruta

id
string<uuid>
requerido

Loan account identifier (UUID).

Ejemplo:

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

Cuerpo

application/json
amount
string
requerido

Repayment amount in major currency units (e.g. "125.00"). Must be positive with at most 2 fractional digits.

Ejemplo:

"125.00"

effectiveDate
string

ISO-8601 or YYYY-MM-DD effective date.

Ejemplo:

"2026-06-14"

transactionDate
string

ISO-8601 or YYYY-MM-DD transaction date (fallback when effectiveDate is absent).

Ejemplo:

"2026-06-14"

Respuesta

Created

allocations
object[] | null
requerido

Per-installment allocation breakdown.

appliedAmount
string
requerido

Amount applied to the loan (2 d.p. string).

Ejemplo:

"125.00"

backdated
boolean
requerido

True if the repayment effective date is before the business date.

effectiveDate
string
requerido

ISO-8601 effective date applied to the repayment.

Ejemplo:

"2026-06-14"

loanAccountId
string
requerido

Loan account UUID.

Ejemplo:

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

overpaymentAmount
string
requerido

Excess amount above total outstanding (2 d.p. string).

Ejemplo:

"0.00"

transactionId
string
requerido

Recorded repayment transaction UUID.

Ejemplo:

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

requestId
string

Idempotency request ID echoed from the request.

Ejemplo:

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