cURL with fictitious data
curl --request POST \
--url https://api.example.com/dict-hub/v1/dict/refunds/01960718-a213-2435-6078-901234567123/blocks/close \
--header 'Authorization: Bearer demo-access-token' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: pix-demo-20260903-000001' \
--header 'X-Correlation-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--data '{
"endToEndId": "D12345678202601011210abcdef01234",
"explanation": "devolucao conciliada manualmente apos falha do settle"
}'import requests
url = "https://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close"
payload = {
"endToEndId": "D12345678202601011210abcdef01234",
"explanation": "devolucao conciliada manualmente apos falha do settle"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
endToEndId: 'D12345678202601011210abcdef01234',
explanation: 'devolucao conciliada manualmente apos falha do settle'
})
};
fetch('https://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close', 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://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close",
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([
'endToEndId' => 'D12345678202601011210abcdef01234',
'explanation' => 'devolucao conciliada manualmente apos falha do settle'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close"
payload := strings.NewReader("{\n \"endToEndId\": \"D12345678202601011210abcdef01234\",\n \"explanation\": \"devolucao conciliada manualmente apos falha do settle\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endToEndId\": \"D12345678202601011210abcdef01234\",\n \"explanation\": \"devolucao conciliada manualmente apos falha do settle\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endToEndId\": \"D12345678202601011210abcdef01234\",\n \"explanation\": \"devolucao conciliada manualmente apos falha do settle\"\n}"
response = http.request(request)
puts response.read_body{
"alreadySettled": "200.00",
"blocks": [
{
"amount": "600.00",
"failureReason": {
"code": "PIX-0652",
"lockId": "c1a6d3b2-0f4e-5d8b-9032-2b3c4d5e6f70",
"message": "falha no Midaz ao liberar o bloqueio"
},
"lockId": "b0f5c2a1-9e3d-4c7a-8f21-1a2b3c4d5e6f",
"settledAmount": "600.00",
"spiBlockId": "7c9a1b2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"status": "SETTLED"
}
],
"blocksStatus": "SETTLED",
"endToEndId": "D12345678202601011210abcdef01234",
"originalAmount": "1000.00",
"refundId": "018f8c1d-1234-7abc-9def-000000000010",
"settledAmount": "800.00",
"surplusAmount": "200.00"
}{
"code": "PIX-0030",
"title": "Idempotency Key Required",
"message": "The Idempotency-Key header is required for this operation and must be within the accepted length."
}{
"code": "PIX-0031",
"title": "Idempotency Key Conflict",
"message": "The Idempotency-Key was already used with a different request."
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Close refund blocks after a manual devolution
Closes the refund’s pending infraction blocks after the requesting participant completes the devolution outside the automatic flow. The operation requires the external payment End-to-End ID and verifies its amount before marking the blocks as settled. The refund remains OPEN until the infraction report is concluded.
POST
/
dict
/
refunds
/
{id}
/
blocks
/
close
cURL with fictitious data
curl --request POST \
--url https://api.example.com/dict-hub/v1/dict/refunds/01960718-a213-2435-6078-901234567123/blocks/close \
--header 'Authorization: Bearer demo-access-token' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: pix-demo-20260903-000001' \
--header 'X-Correlation-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--data '{
"endToEndId": "D12345678202601011210abcdef01234",
"explanation": "devolucao conciliada manualmente apos falha do settle"
}'import requests
url = "https://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close"
payload = {
"endToEndId": "D12345678202601011210abcdef01234",
"explanation": "devolucao conciliada manualmente apos falha do settle"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
endToEndId: 'D12345678202601011210abcdef01234',
explanation: 'devolucao conciliada manualmente apos falha do settle'
})
};
fetch('https://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close', 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://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close",
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([
'endToEndId' => 'D12345678202601011210abcdef01234',
'explanation' => 'devolucao conciliada manualmente apos falha do settle'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close"
payload := strings.NewReader("{\n \"endToEndId\": \"D12345678202601011210abcdef01234\",\n \"explanation\": \"devolucao conciliada manualmente apos falha do settle\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endToEndId\": \"D12345678202601011210abcdef01234\",\n \"explanation\": \"devolucao conciliada manualmente apos falha do settle\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dict-hub/v1/dict/refunds/{id}/blocks/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endToEndId\": \"D12345678202601011210abcdef01234\",\n \"explanation\": \"devolucao conciliada manualmente apos falha do settle\"\n}"
response = http.request(request)
puts response.read_body{
"alreadySettled": "200.00",
"blocks": [
{
"amount": "600.00",
"failureReason": {
"code": "PIX-0652",
"lockId": "c1a6d3b2-0f4e-5d8b-9032-2b3c4d5e6f70",
"message": "falha no Midaz ao liberar o bloqueio"
},
"lockId": "b0f5c2a1-9e3d-4c7a-8f21-1a2b3c4d5e6f",
"settledAmount": "600.00",
"spiBlockId": "7c9a1b2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"status": "SETTLED"
}
],
"blocksStatus": "SETTLED",
"endToEndId": "D12345678202601011210abcdef01234",
"originalAmount": "1000.00",
"refundId": "018f8c1d-1234-7abc-9def-000000000010",
"settledAmount": "800.00",
"surplusAmount": "200.00"
}{
"code": "PIX-0030",
"title": "Idempotency Key Required",
"message": "The Idempotency-Key header is required for this operation and must be within the accepted length."
}{
"code": "PIX-0031",
"title": "Idempotency Key Conflict",
"message": "The Idempotency-Key was already used with a different request."
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
JWT bearer token issued by the identity provider.
Headers
Client-generated key used to retry exactly the same request safely.
Required string length:
1 - 64Best-effort business correlation id (observability only; never fabricated).
Path Parameters
Refund internal ID (UUID format)
Example:
"018f8c1d-1234-7abc-9def-000000000010"
Body
application/json
Response
OK
Example:
"200.00"
Show child attributes
Show child attributes
Available options:
SETTLED Example:
"SETTLED"
Example:
"D12345678202601011210abcdef01234"
Example:
"1000.00"
Example:
"018f8c1d-1234-7abc-9def-000000000010"
Example:
"800.00"
Example:
"200.00"
Was this page helpful?

