curl --request POST \
--url https://api.example.com/cob-hub/v1/collections/duedate \
--header 'Authorization: Bearer demo-access-token' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: pix-demo-20260903-000001' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--data '{
"abatement": {
"modality": "PERCENTAGE",
"value": "5.00"
},
"additionalInfo": [
{
"key": "orderId",
"value": "12345"
}
],
"amount": "100.50",
"calendar": {
"dueDate": "2030-09-01",
"validityAfterDue": 30
},
"currency": "BRL",
"debtor": {
"document": "39053344705",
"name": "João da Silva"
},
"description": "Fatura de servicos",
"discount": {
"modality": "VALUE_PER_CALENDAR_DAY_ADVANCE",
"value": "3.00"
},
"fine": {
"modality": "FIXED_VALUE",
"value": "10.00"
},
"interest": {
"modality": "VALUE_CALENDAR_DAYS",
"value": "1.50"
},
"keyType": "EVP",
"keyValue": "123e4567-e12b-12d1-a456-426655440000",
"merchantCity": "Goiania",
"merchantName": "Loja Teste",
"txId": "TX1234567890123456789012345"
}'import requests
url = "https://api.example.com/cob-hub/v1/collections/duedate"
payload = {
"abatement": {
"modality": "PERCENTAGE",
"value": "5.00"
},
"additionalInfo": [
{
"key": "orderId",
"value": "12345"
}
],
"amount": "100.50",
"calendar": {
"dueDate": "2030-09-01",
"validityAfterDue": 30
},
"currency": "BRL",
"debtor": {
"document": "39053344705",
"name": "João da Silva"
},
"description": "Fatura de servicos",
"discount": {
"modality": "VALUE_PER_CALENDAR_DAY_ADVANCE",
"value": "3.00"
},
"fine": {
"modality": "FIXED_VALUE",
"value": "10.00"
},
"interest": {
"modality": "VALUE_CALENDAR_DAYS",
"value": "1.50"
},
"keyType": "EVP",
"keyValue": "123e4567-e12b-12d1-a456-426655440000",
"merchantCity": "Goiania",
"merchantName": "Loja Teste",
"txId": "TX1234567890123456789012345"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"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: {
'Idempotency-Key': '<idempotency-key>',
'X-Account-Id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
abatement: {modality: 'PERCENTAGE', value: '5.00'},
additionalInfo: [{key: 'orderId', value: '12345'}],
amount: '100.50',
calendar: {dueDate: '2030-09-01', validityAfterDue: 30},
currency: 'BRL',
debtor: {document: '39053344705', name: 'João da Silva'},
description: 'Fatura de servicos',
discount: {modality: 'VALUE_PER_CALENDAR_DAY_ADVANCE', value: '3.00'},
fine: {modality: 'FIXED_VALUE', value: '10.00'},
interest: {modality: 'VALUE_CALENDAR_DAYS', value: '1.50'},
keyType: 'EVP',
keyValue: '123e4567-e12b-12d1-a456-426655440000',
merchantCity: 'Goiania',
merchantName: 'Loja Teste',
txId: 'TX1234567890123456789012345'
})
};
fetch('https://api.example.com/cob-hub/v1/collections/duedate', 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/duedate",
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([
'abatement' => [
'modality' => 'PERCENTAGE',
'value' => '5.00'
],
'additionalInfo' => [
[
'key' => 'orderId',
'value' => '12345'
]
],
'amount' => '100.50',
'calendar' => [
'dueDate' => '2030-09-01',
'validityAfterDue' => 30
],
'currency' => 'BRL',
'debtor' => [
'document' => '39053344705',
'name' => 'João da Silva'
],
'description' => 'Fatura de servicos',
'discount' => [
'modality' => 'VALUE_PER_CALENDAR_DAY_ADVANCE',
'value' => '3.00'
],
'fine' => [
'modality' => 'FIXED_VALUE',
'value' => '10.00'
],
'interest' => [
'modality' => 'VALUE_CALENDAR_DAYS',
'value' => '1.50'
],
'keyType' => 'EVP',
'keyValue' => '123e4567-e12b-12d1-a456-426655440000',
'merchantCity' => 'Goiania',
'merchantName' => 'Loja Teste',
'txId' => 'TX1234567890123456789012345'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"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://api.example.com/cob-hub/v1/collections/duedate"
payload := strings.NewReader("{\n \"abatement\": {\n \"modality\": \"PERCENTAGE\",\n \"value\": \"5.00\"\n },\n \"additionalInfo\": [\n {\n \"key\": \"orderId\",\n \"value\": \"12345\"\n }\n ],\n \"amount\": \"100.50\",\n \"calendar\": {\n \"dueDate\": \"2030-09-01\",\n \"validityAfterDue\": 30\n },\n \"currency\": \"BRL\",\n \"debtor\": {\n \"document\": \"39053344705\",\n \"name\": \"João da Silva\"\n },\n \"description\": \"Fatura de servicos\",\n \"discount\": {\n \"modality\": \"VALUE_PER_CALENDAR_DAY_ADVANCE\",\n \"value\": \"3.00\"\n },\n \"fine\": {\n \"modality\": \"FIXED_VALUE\",\n \"value\": \"10.00\"\n },\n \"interest\": {\n \"modality\": \"VALUE_CALENDAR_DAYS\",\n \"value\": \"1.50\"\n },\n \"keyType\": \"EVP\",\n \"keyValue\": \"123e4567-e12b-12d1-a456-426655440000\",\n \"merchantCity\": \"Goiania\",\n \"merchantName\": \"Loja Teste\",\n \"txId\": \"TX1234567890123456789012345\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.example.com/cob-hub/v1/collections/duedate")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"abatement\": {\n \"modality\": \"PERCENTAGE\",\n \"value\": \"5.00\"\n },\n \"additionalInfo\": [\n {\n \"key\": \"orderId\",\n \"value\": \"12345\"\n }\n ],\n \"amount\": \"100.50\",\n \"calendar\": {\n \"dueDate\": \"2030-09-01\",\n \"validityAfterDue\": 30\n },\n \"currency\": \"BRL\",\n \"debtor\": {\n \"document\": \"39053344705\",\n \"name\": \"João da Silva\"\n },\n \"description\": \"Fatura de servicos\",\n \"discount\": {\n \"modality\": \"VALUE_PER_CALENDAR_DAY_ADVANCE\",\n \"value\": \"3.00\"\n },\n \"fine\": {\n \"modality\": \"FIXED_VALUE\",\n \"value\": \"10.00\"\n },\n \"interest\": {\n \"modality\": \"VALUE_CALENDAR_DAYS\",\n \"value\": \"1.50\"\n },\n \"keyType\": \"EVP\",\n \"keyValue\": \"123e4567-e12b-12d1-a456-426655440000\",\n \"merchantCity\": \"Goiania\",\n \"merchantName\": \"Loja Teste\",\n \"txId\": \"TX1234567890123456789012345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cob-hub/v1/collections/duedate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"abatement\": {\n \"modality\": \"PERCENTAGE\",\n \"value\": \"5.00\"\n },\n \"additionalInfo\": [\n {\n \"key\": \"orderId\",\n \"value\": \"12345\"\n }\n ],\n \"amount\": \"100.50\",\n \"calendar\": {\n \"dueDate\": \"2030-09-01\",\n \"validityAfterDue\": 30\n },\n \"currency\": \"BRL\",\n \"debtor\": {\n \"document\": \"39053344705\",\n \"name\": \"João da Silva\"\n },\n \"description\": \"Fatura de servicos\",\n \"discount\": {\n \"modality\": \"VALUE_PER_CALENDAR_DAY_ADVANCE\",\n \"value\": \"3.00\"\n },\n \"fine\": {\n \"modality\": \"FIXED_VALUE\",\n \"value\": \"10.00\"\n },\n \"interest\": {\n \"modality\": \"VALUE_CALENDAR_DAYS\",\n \"value\": \"1.50\"\n },\n \"keyType\": \"EVP\",\n \"keyValue\": \"123e4567-e12b-12d1-a456-426655440000\",\n \"merchantCity\": \"Goiania\",\n \"merchantName\": \"Loja Teste\",\n \"txId\": \"TX1234567890123456789012345\"\n}"
response = http.request(request)
puts response.read_body{
"abatement": {
"modality": "PERCENTAGE",
"value": "5.00"
},
"accountId": "019606a1-3b4c-7d8e-9f01-234567890abc",
"additionalInfo": [
{
"key": "orderId",
"value": "12345"
}
],
"amount": "100.50",
"calendar": {
"dueDate": "2030-09-01",
"validityAfterDue": 30
},
"createdAt": "2030-08-20T10:30:00Z",
"currency": "BRL",
"debtor": {
"document": "39053344705",
"name": "João da Silva"
},
"description": "Fatura de servicos",
"discount": {
"modality": "VALUE_PER_CALENDAR_DAY_ADVANCE",
"value": "3.00"
},
"emvPayload": "00020126360014br.gov.bcb.pix2562https://pix.example.com/qr/v2/cobv-abc1235204000053039865802BR5910Loja Teste6007Goiania62070503***63041D3F",
"expiresAt": "2030-10-01T23:59:59Z",
"externalId": "0196a7b2-4f60-7172-bd23-4567890abcde",
"fine": {
"modality": "FIXED_VALUE",
"value": "10.00"
},
"id": "0196a7b2-1c3d-7e4f-8a90-1234567890ab",
"interest": {
"modality": "VALUE_CALENDAR_DAYS",
"value": "1.50"
},
"isExpired": false,
"keyType": "EVP",
"keyValue": "123e4567-e12b-12d1-a456-426655440000",
"locationUrl": "https://pix.example.com/qr/v2/cobv-abc123",
"merchantCity": "Goiania",
"merchantDocument": "39053344705",
"merchantName": "Loja Teste",
"organizationId": "0196a7b2-2d4e-7f50-9b01-234567890abc",
"status": "ACTIVE",
"txId": "TX1234567890123456789012345",
"type": "DUE_DATE",
"updatedAt": "2030-08-20T10:30:00Z"
}{
"code": "PIX-0030",
"title": "Idempotency Key Required",
"message": "The Idempotency-Key header is required for this operation and must be within the accepted length."
}{
"type": "https://errors.lerian.studio/v1/PIX-0225",
"title": "Not Found",
"status": 404,
"detail": "The requested collection resource was not found at the provider.",
"code": "PIX-0225"
}{
"type": "https://errors.lerian.studio/v1/PIX-0012",
"title": "Conflict",
"status": 409,
"detail": "The entity already exists or conflicts with an existing resource.",
"code": "PIX-0012"
}{
"code": "PIX-0031",
"title": "Idempotency Key Conflict",
"message": "The Idempotency-Key was already used with a different request."
}{
"type": "https://errors.lerian.studio/v1/PIX-0000",
"title": "Internal Server Error",
"status": 500,
"detail": "The server encountered an unexpected error. Please try again later.",
"code": "PIX-0000"
}{
"type": "https://errors.lerian.studio/v1/PIX-0223",
"title": "Bad Gateway",
"status": 502,
"detail": "Provider adapter is unreachable.",
"code": "PIX-0223"
}{
"type": "https://errors.lerian.studio/v1/PIX-0054",
"title": "Gateway Timeout",
"status": 504,
"detail": "The request timed out. Please try again later.",
"code": "PIX-0054"
}{
"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"
}
}Criar uma cobrança Pix com vencimento (cobv)
Registra uma cobrança Pix dinâmica com vencimento conforme ao calendário definido pelo BCB e admite modificadores opcionais de valor (multa, juros, abatimento e desconto). A chave Pix é validada antes da criação. A cobrança inclui seu payload EMV, a URL de localização e o momento de expiração.
Reexecução: repetir a mesma requisição com o mesmo txId, no mesmo escopo de organização, conta e documento do estabelecimento comercial, retorna sem alterações a resposta 201 original e não cria outra cobrança. O uso de um txId existente com um corpo diferente retorna PIX-0012 com status 409.
curl --request POST \
--url https://api.example.com/cob-hub/v1/collections/duedate \
--header 'Authorization: Bearer demo-access-token' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: pix-demo-20260903-000001' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--data '{
"abatement": {
"modality": "PERCENTAGE",
"value": "5.00"
},
"additionalInfo": [
{
"key": "orderId",
"value": "12345"
}
],
"amount": "100.50",
"calendar": {
"dueDate": "2030-09-01",
"validityAfterDue": 30
},
"currency": "BRL",
"debtor": {
"document": "39053344705",
"name": "João da Silva"
},
"description": "Fatura de servicos",
"discount": {
"modality": "VALUE_PER_CALENDAR_DAY_ADVANCE",
"value": "3.00"
},
"fine": {
"modality": "FIXED_VALUE",
"value": "10.00"
},
"interest": {
"modality": "VALUE_CALENDAR_DAYS",
"value": "1.50"
},
"keyType": "EVP",
"keyValue": "123e4567-e12b-12d1-a456-426655440000",
"merchantCity": "Goiania",
"merchantName": "Loja Teste",
"txId": "TX1234567890123456789012345"
}'import requests
url = "https://api.example.com/cob-hub/v1/collections/duedate"
payload = {
"abatement": {
"modality": "PERCENTAGE",
"value": "5.00"
},
"additionalInfo": [
{
"key": "orderId",
"value": "12345"
}
],
"amount": "100.50",
"calendar": {
"dueDate": "2030-09-01",
"validityAfterDue": 30
},
"currency": "BRL",
"debtor": {
"document": "39053344705",
"name": "João da Silva"
},
"description": "Fatura de servicos",
"discount": {
"modality": "VALUE_PER_CALENDAR_DAY_ADVANCE",
"value": "3.00"
},
"fine": {
"modality": "FIXED_VALUE",
"value": "10.00"
},
"interest": {
"modality": "VALUE_CALENDAR_DAYS",
"value": "1.50"
},
"keyType": "EVP",
"keyValue": "123e4567-e12b-12d1-a456-426655440000",
"merchantCity": "Goiania",
"merchantName": "Loja Teste",
"txId": "TX1234567890123456789012345"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"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: {
'Idempotency-Key': '<idempotency-key>',
'X-Account-Id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
abatement: {modality: 'PERCENTAGE', value: '5.00'},
additionalInfo: [{key: 'orderId', value: '12345'}],
amount: '100.50',
calendar: {dueDate: '2030-09-01', validityAfterDue: 30},
currency: 'BRL',
debtor: {document: '39053344705', name: 'João da Silva'},
description: 'Fatura de servicos',
discount: {modality: 'VALUE_PER_CALENDAR_DAY_ADVANCE', value: '3.00'},
fine: {modality: 'FIXED_VALUE', value: '10.00'},
interest: {modality: 'VALUE_CALENDAR_DAYS', value: '1.50'},
keyType: 'EVP',
keyValue: '123e4567-e12b-12d1-a456-426655440000',
merchantCity: 'Goiania',
merchantName: 'Loja Teste',
txId: 'TX1234567890123456789012345'
})
};
fetch('https://api.example.com/cob-hub/v1/collections/duedate', 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/duedate",
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([
'abatement' => [
'modality' => 'PERCENTAGE',
'value' => '5.00'
],
'additionalInfo' => [
[
'key' => 'orderId',
'value' => '12345'
]
],
'amount' => '100.50',
'calendar' => [
'dueDate' => '2030-09-01',
'validityAfterDue' => 30
],
'currency' => 'BRL',
'debtor' => [
'document' => '39053344705',
'name' => 'João da Silva'
],
'description' => 'Fatura de servicos',
'discount' => [
'modality' => 'VALUE_PER_CALENDAR_DAY_ADVANCE',
'value' => '3.00'
],
'fine' => [
'modality' => 'FIXED_VALUE',
'value' => '10.00'
],
'interest' => [
'modality' => 'VALUE_CALENDAR_DAYS',
'value' => '1.50'
],
'keyType' => 'EVP',
'keyValue' => '123e4567-e12b-12d1-a456-426655440000',
'merchantCity' => 'Goiania',
'merchantName' => 'Loja Teste',
'txId' => 'TX1234567890123456789012345'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"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://api.example.com/cob-hub/v1/collections/duedate"
payload := strings.NewReader("{\n \"abatement\": {\n \"modality\": \"PERCENTAGE\",\n \"value\": \"5.00\"\n },\n \"additionalInfo\": [\n {\n \"key\": \"orderId\",\n \"value\": \"12345\"\n }\n ],\n \"amount\": \"100.50\",\n \"calendar\": {\n \"dueDate\": \"2030-09-01\",\n \"validityAfterDue\": 30\n },\n \"currency\": \"BRL\",\n \"debtor\": {\n \"document\": \"39053344705\",\n \"name\": \"João da Silva\"\n },\n \"description\": \"Fatura de servicos\",\n \"discount\": {\n \"modality\": \"VALUE_PER_CALENDAR_DAY_ADVANCE\",\n \"value\": \"3.00\"\n },\n \"fine\": {\n \"modality\": \"FIXED_VALUE\",\n \"value\": \"10.00\"\n },\n \"interest\": {\n \"modality\": \"VALUE_CALENDAR_DAYS\",\n \"value\": \"1.50\"\n },\n \"keyType\": \"EVP\",\n \"keyValue\": \"123e4567-e12b-12d1-a456-426655440000\",\n \"merchantCity\": \"Goiania\",\n \"merchantName\": \"Loja Teste\",\n \"txId\": \"TX1234567890123456789012345\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.example.com/cob-hub/v1/collections/duedate")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"abatement\": {\n \"modality\": \"PERCENTAGE\",\n \"value\": \"5.00\"\n },\n \"additionalInfo\": [\n {\n \"key\": \"orderId\",\n \"value\": \"12345\"\n }\n ],\n \"amount\": \"100.50\",\n \"calendar\": {\n \"dueDate\": \"2030-09-01\",\n \"validityAfterDue\": 30\n },\n \"currency\": \"BRL\",\n \"debtor\": {\n \"document\": \"39053344705\",\n \"name\": \"João da Silva\"\n },\n \"description\": \"Fatura de servicos\",\n \"discount\": {\n \"modality\": \"VALUE_PER_CALENDAR_DAY_ADVANCE\",\n \"value\": \"3.00\"\n },\n \"fine\": {\n \"modality\": \"FIXED_VALUE\",\n \"value\": \"10.00\"\n },\n \"interest\": {\n \"modality\": \"VALUE_CALENDAR_DAYS\",\n \"value\": \"1.50\"\n },\n \"keyType\": \"EVP\",\n \"keyValue\": \"123e4567-e12b-12d1-a456-426655440000\",\n \"merchantCity\": \"Goiania\",\n \"merchantName\": \"Loja Teste\",\n \"txId\": \"TX1234567890123456789012345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cob-hub/v1/collections/duedate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"abatement\": {\n \"modality\": \"PERCENTAGE\",\n \"value\": \"5.00\"\n },\n \"additionalInfo\": [\n {\n \"key\": \"orderId\",\n \"value\": \"12345\"\n }\n ],\n \"amount\": \"100.50\",\n \"calendar\": {\n \"dueDate\": \"2030-09-01\",\n \"validityAfterDue\": 30\n },\n \"currency\": \"BRL\",\n \"debtor\": {\n \"document\": \"39053344705\",\n \"name\": \"João da Silva\"\n },\n \"description\": \"Fatura de servicos\",\n \"discount\": {\n \"modality\": \"VALUE_PER_CALENDAR_DAY_ADVANCE\",\n \"value\": \"3.00\"\n },\n \"fine\": {\n \"modality\": \"FIXED_VALUE\",\n \"value\": \"10.00\"\n },\n \"interest\": {\n \"modality\": \"VALUE_CALENDAR_DAYS\",\n \"value\": \"1.50\"\n },\n \"keyType\": \"EVP\",\n \"keyValue\": \"123e4567-e12b-12d1-a456-426655440000\",\n \"merchantCity\": \"Goiania\",\n \"merchantName\": \"Loja Teste\",\n \"txId\": \"TX1234567890123456789012345\"\n}"
response = http.request(request)
puts response.read_body{
"abatement": {
"modality": "PERCENTAGE",
"value": "5.00"
},
"accountId": "019606a1-3b4c-7d8e-9f01-234567890abc",
"additionalInfo": [
{
"key": "orderId",
"value": "12345"
}
],
"amount": "100.50",
"calendar": {
"dueDate": "2030-09-01",
"validityAfterDue": 30
},
"createdAt": "2030-08-20T10:30:00Z",
"currency": "BRL",
"debtor": {
"document": "39053344705",
"name": "João da Silva"
},
"description": "Fatura de servicos",
"discount": {
"modality": "VALUE_PER_CALENDAR_DAY_ADVANCE",
"value": "3.00"
},
"emvPayload": "00020126360014br.gov.bcb.pix2562https://pix.example.com/qr/v2/cobv-abc1235204000053039865802BR5910Loja Teste6007Goiania62070503***63041D3F",
"expiresAt": "2030-10-01T23:59:59Z",
"externalId": "0196a7b2-4f60-7172-bd23-4567890abcde",
"fine": {
"modality": "FIXED_VALUE",
"value": "10.00"
},
"id": "0196a7b2-1c3d-7e4f-8a90-1234567890ab",
"interest": {
"modality": "VALUE_CALENDAR_DAYS",
"value": "1.50"
},
"isExpired": false,
"keyType": "EVP",
"keyValue": "123e4567-e12b-12d1-a456-426655440000",
"locationUrl": "https://pix.example.com/qr/v2/cobv-abc123",
"merchantCity": "Goiania",
"merchantDocument": "39053344705",
"merchantName": "Loja Teste",
"organizationId": "0196a7b2-2d4e-7f50-9b01-234567890abc",
"status": "ACTIVE",
"txId": "TX1234567890123456789012345",
"type": "DUE_DATE",
"updatedAt": "2030-08-20T10:30:00Z"
}{
"code": "PIX-0030",
"title": "Idempotency Key Required",
"message": "The Idempotency-Key header is required for this operation and must be within the accepted length."
}{
"type": "https://errors.lerian.studio/v1/PIX-0225",
"title": "Not Found",
"status": 404,
"detail": "The requested collection resource was not found at the provider.",
"code": "PIX-0225"
}{
"type": "https://errors.lerian.studio/v1/PIX-0012",
"title": "Conflict",
"status": 409,
"detail": "The entity already exists or conflicts with an existing resource.",
"code": "PIX-0012"
}{
"code": "PIX-0031",
"title": "Idempotency Key Conflict",
"message": "The Idempotency-Key was already used with a different request."
}{
"type": "https://errors.lerian.studio/v1/PIX-0000",
"title": "Internal Server Error",
"status": 500,
"detail": "The server encountered an unexpected error. Please try again later.",
"code": "PIX-0000"
}{
"type": "https://errors.lerian.studio/v1/PIX-0223",
"title": "Bad Gateway",
"status": 502,
"detail": "Provider adapter is unreachable.",
"code": "PIX-0223"
}{
"type": "https://errors.lerian.studio/v1/PIX-0054",
"title": "Gateway Timeout",
"status": 504,
"detail": "The request timed out. Please try again later.",
"code": "PIX-0054"
}{
"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
Chave criada pelo cliente para repetir com segurança exatamente a mesma requisição.
1 - 64UUID da conta associada à operação.
"019606a1-3b4c-7d8e-9f01-234567890abc"
Corpo
Collection amount in BRL
Due-date expiration calendar
Show child attributes
Show child attributes
Debtor block (mandatory for due-date collections)
Show child attributes
Show child attributes
Pix key type
"EVP"
Pix key value
"123e4567-e12b-12d1-a456-426655440000"
Merchant city
"Goiania"
Merchant name
"Loja Teste"
BCB transaction identifier
"TX1234567890123456789012345"
Optional abatement (abatimento) modifier
Show child attributes
Show child attributes
Free-form key/value metadata (max 50 entries)
Show child attributes
Show child attributes
Currency (BRL only)
"BRL"
Free-form description
"Fatura de servicos"
Optional discount (desconto) modifier
Show child attributes
Show child attributes
Optional fine (multa) modifier
Show child attributes
Show child attributes
Optional interest (juros) modifier
Show child attributes
Show child attributes
Resposta
Created
"0196a7b2-3e5f-7061-ac12-34567890abcd"
"100.50"
Show child attributes
Show child attributes
"2026-05-06T10:30:00Z"
BRL "BRL"
"00020126360014br.gov.bcb.pix2562https://pix.example.com/qr/v2/cobv-abc1235204000053039865802BR5910Loja Teste6007Goiania62070503***63041D3F"
"2026-05-06T11:30:00Z"
"0196a7b2-4f60-7172-bd23-4567890abcde"
"0196a7b2-1c3d-7e4f-8a90-1234567890ab"
false
CPF, CNPJ, PHONE, EMAIL, EVP "EVP"
"123e4567-e12b-12d1-a456-426655440000"
"https://pix.example.com/qr/v2/cobv-abc123"
"Goiania"
"39053344705"
"Loja Teste"
"0196a7b2-2d4e-7f50-9b01-234567890abc"
ACTIVE, COMPLETED, CANCELLED "ACTIVE"
"TX1234567890123456789012345"
IMMEDIATE, DUE_DATE "DUE_DATE"
"2026-05-06T10:30:00Z"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"2026-05-06T10:40:00Z"
"Customer requested cancellation"
Show child attributes
Show child attributes
"Fatura de servicos"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Esta página foi útil?

