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": "Transaction successfully unblocked and completed"
}Unblock a Pix Transfer
Use this endpoint to unblock a transfer that is stuck in PROCESSING status. The plugin fetches the current status from BTG and triggers settlement if the transaction has already completed or failed on 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": "Transaction successfully unblocked and completed"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique identifier of the Midaz Ledger Account (UUID format).
Path Parameters
Unique identifier of the Pix transfer (UUID format).
Body
Opts into the not-found resolution path. When true and BTG returns HTTP 404 for the transfer's EndToEndID, the unblock flow reverts the Midaz hold (if any) and marks the cashout as FAILED with failedReason=BTG_NOT_FOUND instead of returning a provider error. Only applies to CASHOUT transfers in PENDING or PROCESSING status.
Was this page helpful?

