Desbloquear un reembolso Pix
curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--data '
{
"allowNotFoundUnblock": false
}
'import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock"
payload = { "allowNotFoundUnblock": False }
headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Account-Id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({allowNotFoundUnblock: false})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock', 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-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock",
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([
'allowNotFoundUnblock' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Account-Id: <x-account-id>"
],
]);
$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://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock"
payload := strings.NewReader("{\n \"allowNotFoundUnblock\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Account-Id", "<x-account-id>")
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://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowNotFoundUnblock\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowNotFoundUnblock\": false\n}"
response = http.request(request)
puts response.read_body{
"refund": {
"id": "019c96a0-0c53-7a8d-8e29-67971d96d0e3",
"originalEndToEndId": "E123456789BR1234567890123456789",
"returnEndToEndId": "D123456789BR1234567890123456789",
"amount": "100.00",
"status": "COMPLETED",
"type": "CASHOUT",
"description": "Customer reported unauthorized transaction",
"accountId": "01989f9e-6508-79f8-9540-835be49fbd0d",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"ledger": {
"transactionId": "550e8400-e29b-41d4-a716-446655440011",
"sourceOperationId": "550e8400-e29b-41d4-a716-446655440012",
"destinationOperationId": "550e8400-e29b-41d4-a716-446655440013",
"revert": {
"transactionId": "550e8400-e29b-41d4-a716-446655440014",
"sourceOperationId": "550e8400-e29b-41d4-a716-446655440015",
"destinationOperationId": "550e8400-e29b-41d4-a716-446655440016"
}
},
"metadata": {}
},
"btgStatus": "CONFIRMED",
"message": "Reversal successfully unblocked."
}Desbloquear un reembolso Pix
Usa este endpoint para desbloquear un reembolso atascado en estado PROCESSING. El plugin obtiene el estado de la reversión en BTG y activa la liquidación si la reversión ya se completó o falló en BTG.
POST
/
v1
/
refunds
/
{refund_id}
/
unblock
Desbloquear un reembolso Pix
curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--data '
{
"allowNotFoundUnblock": false
}
'import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock"
payload = { "allowNotFoundUnblock": False }
headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Account-Id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({allowNotFoundUnblock: false})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock', 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-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock",
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([
'allowNotFoundUnblock' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Account-Id: <x-account-id>"
],
]);
$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://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock"
payload := strings.NewReader("{\n \"allowNotFoundUnblock\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Account-Id", "<x-account-id>")
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://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowNotFoundUnblock\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowNotFoundUnblock\": false\n}"
response = http.request(request)
puts response.read_body{
"refund": {
"id": "019c96a0-0c53-7a8d-8e29-67971d96d0e3",
"originalEndToEndId": "E123456789BR1234567890123456789",
"returnEndToEndId": "D123456789BR1234567890123456789",
"amount": "100.00",
"status": "COMPLETED",
"type": "CASHOUT",
"description": "Customer reported unauthorized transaction",
"accountId": "01989f9e-6508-79f8-9540-835be49fbd0d",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"ledger": {
"transactionId": "550e8400-e29b-41d4-a716-446655440011",
"sourceOperationId": "550e8400-e29b-41d4-a716-446655440012",
"destinationOperationId": "550e8400-e29b-41d4-a716-446655440013",
"revert": {
"transactionId": "550e8400-e29b-41d4-a716-446655440014",
"sourceOperationId": "550e8400-e29b-41d4-a716-446655440015",
"destinationOperationId": "550e8400-e29b-41d4-a716-446655440016"
}
},
"metadata": {}
},
"btgStatus": "CONFIRMED",
"message": "Reversal successfully unblocked."
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Encabezados
Identificador único de la cuenta del Ledger de Midaz (formato UUID).
Parámetros de ruta
Identificador único de la solicitud de devolución (formato UUID).
Cuerpo
application/json
Habilita la vía de resolución de no encontrado para devoluciones CASHOUT. Cuando es true y BTG reporta la reversión como ausente (404), la devolución se resuelve como FAILED (con reversión idempotente de Midaz y webhook al cliente) en lugar de devolver un error del proveedor.
¿Esta página le ayudó?
⌘I

