cURL com dados fictícios
curl --request GET \
--url https://api.example.com/spi/v1/refunds/01960718-a213-2435-6078-901234567123 \
--header 'Authorization: Bearer demo-access-token' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc'import requests
url = "https://api.example.com/spi/v1/refunds/{id}"
headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Account-Id': '<x-account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.example.com/spi/v1/refunds/{id}', 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/spi/v1/refunds/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/spi/v1/refunds/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Account-Id", "<x-account-id>")
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.get("https://api.example.com/spi/v1/refunds/{id}")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/spi/v1/refunds/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"accountId": "019606a0-1a2b-7c3d-8e4f-567890123abc",
"amount": "100.00",
"createdAt": "2026-05-06T10:45:00Z",
"description": "Estorno solicitado pelo pagador",
"id": "019606b1-3b4c-7d8e-9f01-234567890dee",
"ledger": {
"destinationOperationId": "019606a5-7f80-7182-3c4d-56789012cdf1",
"revert": {
"destinationOperationId": "019606a5-7f80-7182-3c4d-56789012cdf1",
"sourceOperationId": "019606a5-7f80-7182-3c4d-56789012cdf0",
"transactionId": "019606a5-7f80-7182-3c4d-56789012cdef"
},
"sourceOperationId": "019606a5-7f80-7182-3c4d-56789012cdf0",
"transactionId": "019606a5-7f80-7182-3c4d-56789012cdef"
},
"metadata": {
"field": "field-example"
},
"originalEndToEndId": "E12345678202605061030abcdef12345",
"reasonCode": "MD06",
"returnEndToEndId": "D12345678202605061045fedcba54321",
"status": "COMPLETED",
"type": "OUTBOUND",
"updatedAt": "2026-05-06T10:45:30Z"
}{
"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"
}
}Consultar uma devolução Pix por ID
Retorna uma única devolução com escopo restrito à conta chamadora.
GET
/
refunds
/
{id}
cURL com dados fictícios
curl --request GET \
--url https://api.example.com/spi/v1/refunds/01960718-a213-2435-6078-901234567123 \
--header 'Authorization: Bearer demo-access-token' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc'import requests
url = "https://api.example.com/spi/v1/refunds/{id}"
headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Account-Id': '<x-account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.example.com/spi/v1/refunds/{id}', 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/spi/v1/refunds/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/spi/v1/refunds/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Account-Id", "<x-account-id>")
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.get("https://api.example.com/spi/v1/refunds/{id}")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/spi/v1/refunds/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"accountId": "019606a0-1a2b-7c3d-8e4f-567890123abc",
"amount": "100.00",
"createdAt": "2026-05-06T10:45:00Z",
"description": "Estorno solicitado pelo pagador",
"id": "019606b1-3b4c-7d8e-9f01-234567890dee",
"ledger": {
"destinationOperationId": "019606a5-7f80-7182-3c4d-56789012cdf1",
"revert": {
"destinationOperationId": "019606a5-7f80-7182-3c4d-56789012cdf1",
"sourceOperationId": "019606a5-7f80-7182-3c4d-56789012cdf0",
"transactionId": "019606a5-7f80-7182-3c4d-56789012cdef"
},
"sourceOperationId": "019606a5-7f80-7182-3c4d-56789012cdf0",
"transactionId": "019606a5-7f80-7182-3c4d-56789012cdef"
},
"metadata": {
"field": "field-example"
},
"originalEndToEndId": "E12345678202605061030abcdef12345",
"reasonCode": "MD06",
"returnEndToEndId": "D12345678202605061045fedcba54321",
"status": "COMPLETED",
"type": "OUTBOUND",
"updatedAt": "2026-05-06T10:45:30Z"
}{
"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"
}
}Autorizações
JWT bearer token issued by the identity provider.
Cabeçalhos
UUID da conta associada à operação.
Exemplo:
"019606a1-3b4c-7d8e-9f01-234567890abc"
Parâmetros de caminho
Refund UUID
Exemplo:
"0196080a-1234-7890-abcd-ef0123456789"
Resposta
OK
Exemplo:
"100.00"
Exemplo:
"2026-05-06T10:45:00Z"
Exemplo:
"019606b1-3b4c-7d8e-9f01-234567890dee"
Exemplo:
"E12345678202605061030abcdef12345"
Exemplo:
"MD06"
Exemplo:
"COMPLETED"
Exemplo:
"OUTBOUND"
Exemplo:
"2026-05-06T10:45:30Z"
Exemplo:
"019606a0-1a2b-7c3d-8e4f-567890123abc"
Exemplo:
"Estorno solicitado pelo pagador"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Exemplo:
"D12345678202605061045fedcba54321"
Esta página foi útil?

