Skip to main content
GET
/
v1
/
med
/
refunds
/
{idSolDevolucao}
Get a MED refund request
curl --request GET \
  --url https://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao}', 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://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao}")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "breached": true,
  "dtHrCriacao": "<string>",
  "dtHrUltModificacao": "<string>",
  "endToEndId": "<string>",
  "idSolDevolucao": "<string>",
  "ispbContestado": "<string>",
  "ispbSolicitante": "<string>",
  "motivo": 123,
  "motivoDescription": "<string>",
  "status": 123,
  "statusDescription": "<string>",
  "valorDevolucaoCents": 123,
  "analysisDeadline": "<string>",
  "detalhes": "<string>",
  "detalhesAnalise": "<string>",
  "endToEndIdDevolucao": "<string>",
  "idRecValores": "<string>",
  "idRelatoInfracao": "<string>",
  "motivoRejeicao": 123,
  "motivoRejeicaoDescription": "<string>",
  "resultadoAnalise": 123,
  "resultadoAnaliseDescription": "<string>",
  "valorDevolvidoCents": 123
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Obtain token from /v1/login/oauth/access_token endpoint using client credentials (clientId and clientSecret).

Include token in Authorization header: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Token expires after 3600 seconds (1 hour).

Path Parameters

idSolDevolucao
string
required

The refund-request GUID.

Response

OK

breached
boolean
required

True when the analysis deadline has been reached or passed (computed at read time); false when no deadline is set.

dtHrCriacao
string
required

Upstream creation timestamp (RFC 3339 UTC).

dtHrUltModificacao
string
required

Upstream last-modification timestamp (RFC 3339 UTC) — the poll watermark.

endToEndId
string
required

EndToEndId of the contested payment or devolucao.

idSolDevolucao
string
required

Refund-request GUID (the natural key).

ispbContestado
string
required

ISPB of the contested PSP.

ispbSolicitante
string
required

ISPB of the requesting PSP.

motivo
integer<int64>
required

Refund motivo code (0=Falha Operacional, 1=Fraude, 3=Pix Automático).

motivoDescription
string
required

Human-readable refund motivo label.

status
integer<int64>
required

stSolDevolucao lifecycle code (0=Aberta, 1=Cancelada, 2=Analisada).

statusDescription
string
required

Human-readable stSolDevolucao label.

valorDevolucaoCents
integer<int64>
required

Requested refund amount, in centavos.

analysisDeadline
string

Contestado-side analysis deadline; null for filer-side and terminal requests.

detalhes
string

Free-text detail.

detalhesAnalise
string

Analysis detail.

endToEndIdDevolucao
string

pacs.004/pacs.008 devolucao reference, recorded at analysis.

idRecValores
string

Value-recovery GUID, when from a recovery.

idRelatoInfracao
string

Linked infraction GUID, when fraud.

motivoRejeicao
integer<int64>

Rejection reason (0,1,3,4); present only when the analysis rejected the request.

motivoRejeicaoDescription
string

Human-readable rejection-reason label.

resultadoAnalise
integer<int64>

Refund analysis result (0=Aceita Totalmente, 1=Aceita Parcialmente, 2=Rejeitada); null until analysed.

resultadoAnaliseDescription
string

Human-readable refund analysis-result label.

valorDevolvidoCents
integer<int64>

Amount actually refunded, in centavos; null when absent.