Pular para o conteúdo principal
POST
/
api
/
v1
/
loan-accounts
/
{id}
/
transactions
/
{transactionId}
/
reverse
Reverter transação da conta de empréstimo
curl --request POST \
  --url https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/transactions/{transactionId}/reverse \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "effectiveDate": "<string>",
  "profileVersion": "<string>",
  "reason": "<string>",
  "jurisdictionCode": "<string>"
}
'
import requests

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

payload = {
    "effectiveDate": "<string>",
    "profileVersion": "<string>",
    "reason": "<string>",
    "jurisdictionCode": "<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({
    effectiveDate: '<string>',
    profileVersion: '<string>',
    reason: '<string>',
    jurisdictionCode: '<string>'
  })
};

fetch('https://lender.sandbox.lerian.net/api/v1/loan-accounts/{id}/transactions/{transactionId}/reverse', 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}/transactions/{transactionId}/reverse",
  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([
    'effectiveDate' => '<string>',
    'profileVersion' => '<string>',
    'reason' => '<string>',
    'jurisdictionCode' => '<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}/transactions/{transactionId}/reverse"

	payload := strings.NewReader("{\n  \"effectiveDate\": \"<string>\",\n  \"profileVersion\": \"<string>\",\n  \"reason\": \"<string>\",\n  \"jurisdictionCode\": \"<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}/transactions/{transactionId}/reverse")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"effectiveDate\": \"<string>\",\n  \"profileVersion\": \"<string>\",\n  \"reason\": \"<string>\",\n  \"jurisdictionCode\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

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

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

response = http.request(request)
puts response.read_body
{
  "amount": "<string>",
  "effectiveDate": "<string>",
  "loanAccountId": "<string>",
  "originalTransactionId": "<string>",
  "profileVersion": "<string>",
  "reason": "<string>",
  "transactionId": "<string>",
  "jurisdictionCode": "<string>",
  "requestId": "<string>"
}
{
  "code": "<string>",
  "detail": "<string>",
  "errors": [
    {
      "location": "<string>",
      "message": "<string>",
      "value": "<unknown>"
    }
  ],
  "instance": "<string>",
  "status": 123,
  "title": "<string>",
  "type": "about:blank"
}

Autorizações

Authorization
string
header
obrigatório

JWT bearer token issued by the identity provider.

Cabeçalhos

X-Request-ID
string

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

Exemplo:

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

X-Idempotency
string

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

Exemplo:

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

Parâmetros de caminho

id
string<uuid>
obrigatório

Loan account identifier (UUID).

Exemplo:

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

transactionId
string<uuid>
obrigatório

Original repayment transaction identifier (UUID).

Exemplo:

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

Corpo

application/json
effectiveDate
string
obrigatório

YYYY-MM-DD effective date of the reversal.

Exemplo:

"2026-06-14"

profileVersion
string
obrigatório

Product profile version applied to the reversal.

Minimum string length: 1
Exemplo:

"1.0.0"

reason
string
obrigatório

Operator-supplied reversal reason.

Minimum string length: 1
jurisdictionCode
string

Optional jurisdiction code.

Exemplo:

"BR"

Resposta

OK

amount
string
obrigatório

Reversed amount (2 d.p. string).

Exemplo:

"125.00"

effectiveDate
string
obrigatório

ISO-8601 effective date of the reversal.

Exemplo:

"2026-06-14"

loanAccountId
string
obrigatório

Loan account UUID.

Exemplo:

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

originalTransactionId
string
obrigatório

Reversed original transaction UUID.

Exemplo:

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

profileVersion
string
obrigatório

Product profile version applied to the reversal.

Exemplo:

"1.0.0"

reason
string
obrigatório

Operator-supplied reversal reason.

transactionId
string
obrigatório

Compensating reversal transaction UUID.

Exemplo:

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

jurisdictionCode
string

Jurisdiction code applied to the reversal.

Exemplo:

"BR"

requestId
string

Idempotency request ID echoed from the request.

Exemplo:

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