curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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{
"transfer": {
"id": "019c96a0-0c21-71f9-a487-66a1258278a1",
"endToEndId": "E123456789BR1234567890123456789",
"amount": "100.00",
"status": "COMPLETED",
"type": "CASHOUT",
"description": "Pix Cashout Transfer",
"source": {
"key": "john.doe@example.com",
"account": {
"branch": "0001",
"number": "123456789",
"participant": "12345678",
"type": "CACC"
},
"owner": {
"document": "12345678901",
"name": "John Doe",
"tradeName": "John's Business",
"type": "NATURAL_PERSON"
}
},
"destination": {
"key": "john.doe@example.com",
"account": {
"branch": "0001",
"number": "123456789",
"participant": "12345678",
"type": "CACC"
},
"owner": {
"document": "12345678901",
"name": "John Doe",
"tradeName": "John's Business",
"type": "NATURAL_PERSON"
}
},
"paymentType": "IMMEDIATE",
"initiationType": "KEY",
"urgency": "HIGH",
"purpose": "TRANSFER",
"accountId": "01989f9e-6508-79f8-9540-835be49fbd0d",
"aliasId": "01989f9e-6508-79f8-9540-835be49fbd0e",
"initiatedAt": "2024-01-15T10:30:00Z",
"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": {},
"feeCharge": {
"applied": true,
"calculationType": "segment",
"totalAmount": "2.50",
"netAmount": "97.50",
"fees": [
{
"feeLabel": "PIX_FEE",
"amount": "1.50",
"creditAccount": "01989f9e-6508-79f8-9540-835be49fbd0d",
"calculationType": "PERCENTAGE",
"calculationValue": "1.5"
}
]
}
},
"btgStatus": "CONFIRMED",
"message": "Transação desbloqueada e concluída com sucesso"
}Desbloquear uma Transferência Pix
Use este endpoint para desbloquear uma transferência presa no status PROCESSING. O plugin obtém o status atual do BTG e dispara a liquidação se a transação já tiver sido concluída ou falhado no BTG.
curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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/transfers/{transfer_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{
"transfer": {
"id": "019c96a0-0c21-71f9-a487-66a1258278a1",
"endToEndId": "E123456789BR1234567890123456789",
"amount": "100.00",
"status": "COMPLETED",
"type": "CASHOUT",
"description": "Pix Cashout Transfer",
"source": {
"key": "john.doe@example.com",
"account": {
"branch": "0001",
"number": "123456789",
"participant": "12345678",
"type": "CACC"
},
"owner": {
"document": "12345678901",
"name": "John Doe",
"tradeName": "John's Business",
"type": "NATURAL_PERSON"
}
},
"destination": {
"key": "john.doe@example.com",
"account": {
"branch": "0001",
"number": "123456789",
"participant": "12345678",
"type": "CACC"
},
"owner": {
"document": "12345678901",
"name": "John Doe",
"tradeName": "John's Business",
"type": "NATURAL_PERSON"
}
},
"paymentType": "IMMEDIATE",
"initiationType": "KEY",
"urgency": "HIGH",
"purpose": "TRANSFER",
"accountId": "01989f9e-6508-79f8-9540-835be49fbd0d",
"aliasId": "01989f9e-6508-79f8-9540-835be49fbd0e",
"initiatedAt": "2024-01-15T10:30:00Z",
"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": {},
"feeCharge": {
"applied": true,
"calculationType": "segment",
"totalAmount": "2.50",
"netAmount": "97.50",
"fees": [
{
"feeLabel": "PIX_FEE",
"amount": "1.50",
"creditAccount": "01989f9e-6508-79f8-9540-835be49fbd0d",
"calculationType": "PERCENTAGE",
"calculationValue": "1.5"
}
]
}
},
"btgStatus": "CONFIRMED",
"message": "Transação desbloqueada e concluída com sucesso"
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cabeçalhos
Identificador único da Conta do Ledger Midaz (formato UUID).
Parâmetros de caminho
Identificador único da transferência Pix (formato UUID).
Corpo
Habilita o caminho de resolução não-encontrado. Quando true e o BTG retorna HTTP 404 para o EndToEndID da transferência, o fluxo de desbloqueio reverte o bloqueio (hold) no Midaz (se houver) e marca o cashout como FAILED com failedReason=BTG_NOT_FOUND, em vez de retornar um erro do provedor. Aplica-se apenas a transferências CASHOUT no status PENDING ou PROCESSING.
Resposta
Desbloqueio da transferência processado com sucesso.
Esta página foi útil?

