cURL con datos ficticios
curl --request GET \
--url https://api.example.com/cob-hub/v1/collections/immediate \
--header 'Authorization: Bearer demo-access-token' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc'import requests
url = "https://api.example.com/cob-hub/v1/collections/immediate"
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/cob-hub/v1/collections/immediate', 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/cob-hub/v1/collections/immediate",
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/cob-hub/v1/collections/immediate"
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/cob-hub/v1/collections/immediate")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cob-hub/v1/collections/immediate")
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{
"items": [
{
"accountId": "0196a7b2-3e5f-7061-ac12-34567890abcd",
"additionalInfo": [
{
"key": "orderId",
"value": "12345"
}
],
"amount": "100.50",
"createdAt": "2026-05-06T10:30:00Z",
"currency": "BRL",
"debtor": {
"document": "39053344705",
"name": "João da Silva"
},
"description": "Pagamento do pedido 12345",
"emvPayload": "00020101021226500014br.gov.bcb.pix2528pix.example.com/qr/v2/abc1235204000053039865802BR5910Loja Teste6007Goiania62070503***63041206",
"expirationSeconds": 3600,
"expiresAt": "2026-05-06T11:30:00Z",
"externalId": "0196a7b2-4f60-7172-bd23-4567890abcde",
"id": "0196a7b2-1c3d-7e4f-8a90-1234567890ab",
"keyType": "EVP",
"keyValue": "123e4567-e12b-12d1-a456-426655440000",
"locationUrl": "https://pix.example.com/qr/v2/abc123",
"merchantCity": "Goiania",
"merchantDocument": "39053344705",
"merchantName": "Loja Teste",
"organizationId": "0196a7b2-2d4e-7f50-9b01-234567890abc",
"status": "ACTIVE",
"txId": "TX1234567890123456789012345",
"type": "IMMEDIATE",
"updatedAt": "2026-05-06T10:30:00Z"
}
],
"limit": 20,
"page": 1,
"total": 1
}{
"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"
}
}Listar cobros inmediatos u obtener uno por txId
Devuelve un contenedor de lista paginada de cobros inmediatos. Cuando se proporciona el parámetro de consulta txId, el endpoint cambia a una búsqueda por txId y devuelve una única entidad de cobro sin contenedor; los dos formatos de respuesta 200 están documentados como oneOf.
GET
/
collections
/
immediate
cURL con datos ficticios
curl --request GET \
--url https://api.example.com/cob-hub/v1/collections/immediate \
--header 'Authorization: Bearer demo-access-token' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc'import requests
url = "https://api.example.com/cob-hub/v1/collections/immediate"
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/cob-hub/v1/collections/immediate', 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/cob-hub/v1/collections/immediate",
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/cob-hub/v1/collections/immediate"
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/cob-hub/v1/collections/immediate")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cob-hub/v1/collections/immediate")
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{
"items": [
{
"accountId": "0196a7b2-3e5f-7061-ac12-34567890abcd",
"additionalInfo": [
{
"key": "orderId",
"value": "12345"
}
],
"amount": "100.50",
"createdAt": "2026-05-06T10:30:00Z",
"currency": "BRL",
"debtor": {
"document": "39053344705",
"name": "João da Silva"
},
"description": "Pagamento do pedido 12345",
"emvPayload": "00020101021226500014br.gov.bcb.pix2528pix.example.com/qr/v2/abc1235204000053039865802BR5910Loja Teste6007Goiania62070503***63041206",
"expirationSeconds": 3600,
"expiresAt": "2026-05-06T11:30:00Z",
"externalId": "0196a7b2-4f60-7172-bd23-4567890abcde",
"id": "0196a7b2-1c3d-7e4f-8a90-1234567890ab",
"keyType": "EVP",
"keyValue": "123e4567-e12b-12d1-a456-426655440000",
"locationUrl": "https://pix.example.com/qr/v2/abc123",
"merchantCity": "Goiania",
"merchantDocument": "39053344705",
"merchantName": "Loja Teste",
"organizationId": "0196a7b2-2d4e-7f50-9b01-234567890abc",
"status": "ACTIVE",
"txId": "TX1234567890123456789012345",
"type": "IMMEDIATE",
"updatedAt": "2026-05-06T10:30:00Z"
}
],
"limit": 20,
"page": 1,
"total": 1
}{
"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"
}
}Autorizaciones
JWT bearer token issued by the identity provider.
Encabezados
UUID de la cuenta asociada a la operación.
Ejemplo:
"019606a1-3b4c-7d8e-9f01-234567890abc"
Parámetros de consulta
BCB transaction ID — routes to by-txId lookup
Ejemplo:
"T1234567890123456789012345A"
Page number (1-based, default 1)
Ejemplo:
"1"
Rows per page (default 20, max 100)
Ejemplo:
"20"
Filter by status
Ejemplo:
"ACTIVE"
Filter by Pix key value (exact match)
¿Esta página le ayudó?

