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

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

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

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

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

fetch('https://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao}/effectuate', 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}/effectuate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/effectuate"

req, _ := http.NewRequest("POST", 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.post("https://plugin-pix-direct.api.lerian.net/v1/med/refunds/{idSolDevolucao}/effectuate")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

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

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

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

response = http.request(request)
puts response.read_body
{
  "effStatus": 123,
  "effStatusDescription": "<string>",
  "idOperacaoDebito": "<string>",
  "idReqJdPi": "<string>",
  "idSolDevolucao": "<string>"
}
{
"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 accepted refund-request GUID to effectuate.

Response

OK

effStatus
integer<int64>
required

Debit-effectuation status code (0=NotStarted, 1=DebitPending, 2=Settled, 3=Failed).

effStatusDescription
string
required

Human-readable eff_status label.

idOperacaoDebito
string
required

The Pending Midaz debit posting id (the reconcile commit/cancel reference).

idReqJdPi
string
required

The the upstream system /od request id (the debit-poll handle).

idSolDevolucao
string
required

The effectuated refund-request GUID.