curl --request PATCH \
--url https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chave": "<string>",
"devedor": {
"cep": "<string>",
"cidade": "<string>",
"cnpj": "12ABC34501DE35",
"cpf": "12345678901",
"email": "<string>",
"logradouro": "<string>",
"nome": "Fulano de Tal",
"uf": "<string>"
},
"infoAdicionais": [
{
"nome": "<string>",
"valor": "<string>"
}
],
"loc": {
"id": 123
},
"solicitacaoPagador": "<string>",
"status": "REMOVIDA_PELO_USUARIO_RECEBEDOR",
"valor": {
"original": "250.00"
}
}
'import requests
url = "https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}"
payload = {
"chave": "<string>",
"devedor": {
"cep": "<string>",
"cidade": "<string>",
"cnpj": "12ABC34501DE35",
"cpf": "12345678901",
"email": "<string>",
"logradouro": "<string>",
"nome": "Fulano de Tal",
"uf": "<string>"
},
"infoAdicionais": [
{
"nome": "<string>",
"valor": "<string>"
}
],
"loc": { "id": 123 },
"solicitacaoPagador": "<string>",
"status": "REMOVIDA_PELO_USUARIO_RECEBEDOR",
"valor": { "original": "250.00" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chave: '<string>',
devedor: {
cep: '<string>',
cidade: '<string>',
cnpj: '12ABC34501DE35',
cpf: '12345678901',
email: '<string>',
logradouro: '<string>',
nome: 'Fulano de Tal',
uf: '<string>'
},
infoAdicionais: [{nome: '<string>', valor: '<string>'}],
loc: {id: 123},
solicitacaoPagador: '<string>',
status: 'REMOVIDA_PELO_USUARIO_RECEBEDOR',
valor: {original: '250.00'}
})
};
fetch('https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}', 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://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'chave' => '<string>',
'devedor' => [
'cep' => '<string>',
'cidade' => '<string>',
'cnpj' => '12ABC34501DE35',
'cpf' => '12345678901',
'email' => '<string>',
'logradouro' => '<string>',
'nome' => 'Fulano de Tal',
'uf' => '<string>'
],
'infoAdicionais' => [
[
'nome' => '<string>',
'valor' => '<string>'
]
],
'loc' => [
'id' => 123
],
'solicitacaoPagador' => '<string>',
'status' => 'REMOVIDA_PELO_USUARIO_RECEBEDOR',
'valor' => [
'original' => '250.00'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}"
payload := strings.NewReader("{\n \"chave\": \"<string>\",\n \"devedor\": {\n \"cep\": \"<string>\",\n \"cidade\": \"<string>\",\n \"cnpj\": \"12ABC34501DE35\",\n \"cpf\": \"12345678901\",\n \"email\": \"<string>\",\n \"logradouro\": \"<string>\",\n \"nome\": \"Fulano de Tal\",\n \"uf\": \"<string>\"\n },\n \"infoAdicionais\": [\n {\n \"nome\": \"<string>\",\n \"valor\": \"<string>\"\n }\n ],\n \"loc\": {\n \"id\": 123\n },\n \"solicitacaoPagador\": \"<string>\",\n \"status\": \"REMOVIDA_PELO_USUARIO_RECEBEDOR\",\n \"valor\": {\n \"original\": \"250.00\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chave\": \"<string>\",\n \"devedor\": {\n \"cep\": \"<string>\",\n \"cidade\": \"<string>\",\n \"cnpj\": \"12ABC34501DE35\",\n \"cpf\": \"12345678901\",\n \"email\": \"<string>\",\n \"logradouro\": \"<string>\",\n \"nome\": \"Fulano de Tal\",\n \"uf\": \"<string>\"\n },\n \"infoAdicionais\": [\n {\n \"nome\": \"<string>\",\n \"valor\": \"<string>\"\n }\n ],\n \"loc\": {\n \"id\": 123\n },\n \"solicitacaoPagador\": \"<string>\",\n \"status\": \"REMOVIDA_PELO_USUARIO_RECEBEDOR\",\n \"valor\": {\n \"original\": \"250.00\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chave\": \"<string>\",\n \"devedor\": {\n \"cep\": \"<string>\",\n \"cidade\": \"<string>\",\n \"cnpj\": \"12ABC34501DE35\",\n \"cpf\": \"12345678901\",\n \"email\": \"<string>\",\n \"logradouro\": \"<string>\",\n \"nome\": \"Fulano de Tal\",\n \"uf\": \"<string>\"\n },\n \"infoAdicionais\": [\n {\n \"nome\": \"<string>\",\n \"valor\": \"<string>\"\n }\n ],\n \"loc\": {\n \"id\": 123\n },\n \"solicitacaoPagador\": \"<string>\",\n \"status\": \"REMOVIDA_PELO_USUARIO_RECEBEDOR\",\n \"valor\": {\n \"original\": \"250.00\"\n }\n}"
response = http.request(request)
puts response.read_body{
"calendario": {
"criacao": "<string>",
"dataDeVencimento": "<string>",
"validadeAposVencimento": 123
},
"chave": "<string>",
"devedor": {
"cep": "<string>",
"cidade": "<string>",
"cnpj": "12ABC34501DE35",
"cpf": "12345678901",
"email": "<string>",
"logradouro": "<string>",
"nome": "Fulano de Tal",
"uf": "<string>"
},
"loc": {
"criacao": "<string>",
"id": 123,
"tipoCob": "cob",
"location": "<string>"
},
"location": "<string>",
"pixCopiaECola": "<string>",
"recebedor": {
"cep": "<string>",
"cidade": "<string>",
"cnpj": "<string>",
"cpf": "<string>",
"logradouro": "<string>",
"nome": "<string>",
"nomeFantasia": "<string>",
"uf": "<string>"
},
"revisao": 123,
"status": "ATIVA",
"txid": "<string>",
"valor": {
"abatimento": {
"modalidade": 123,
"valorPerc": "<string>"
},
"desconto": {
"modalidade": 3,
"descontoDataFixa": [
{
"data": "2030-03-01",
"valorPerc": "<string>"
}
],
"valorPerc": "<string>"
},
"juros": {
"modalidade": 123,
"valorPerc": "<string>"
},
"multa": {
"modalidade": 123,
"valorPerc": "<string>"
},
"original": "250.00"
},
"infoAdicionais": [
{
"nome": "<string>",
"valor": "<string>"
}
],
"solicitacaoPagador": "<string>"
}{
"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"
}Revisar cobrança com vencimento
Revisa uma cobrança com vencimento. status=REMOVIDA_PELO_USUARIO_RECEBEDOR remove a cobrança. API Pix v2.9 PATCH /cobv/.
curl --request PATCH \
--url https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chave": "<string>",
"devedor": {
"cep": "<string>",
"cidade": "<string>",
"cnpj": "12ABC34501DE35",
"cpf": "12345678901",
"email": "<string>",
"logradouro": "<string>",
"nome": "Fulano de Tal",
"uf": "<string>"
},
"infoAdicionais": [
{
"nome": "<string>",
"valor": "<string>"
}
],
"loc": {
"id": 123
},
"solicitacaoPagador": "<string>",
"status": "REMOVIDA_PELO_USUARIO_RECEBEDOR",
"valor": {
"original": "250.00"
}
}
'import requests
url = "https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}"
payload = {
"chave": "<string>",
"devedor": {
"cep": "<string>",
"cidade": "<string>",
"cnpj": "12ABC34501DE35",
"cpf": "12345678901",
"email": "<string>",
"logradouro": "<string>",
"nome": "Fulano de Tal",
"uf": "<string>"
},
"infoAdicionais": [
{
"nome": "<string>",
"valor": "<string>"
}
],
"loc": { "id": 123 },
"solicitacaoPagador": "<string>",
"status": "REMOVIDA_PELO_USUARIO_RECEBEDOR",
"valor": { "original": "250.00" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chave: '<string>',
devedor: {
cep: '<string>',
cidade: '<string>',
cnpj: '12ABC34501DE35',
cpf: '12345678901',
email: '<string>',
logradouro: '<string>',
nome: 'Fulano de Tal',
uf: '<string>'
},
infoAdicionais: [{nome: '<string>', valor: '<string>'}],
loc: {id: 123},
solicitacaoPagador: '<string>',
status: 'REMOVIDA_PELO_USUARIO_RECEBEDOR',
valor: {original: '250.00'}
})
};
fetch('https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}', 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://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'chave' => '<string>',
'devedor' => [
'cep' => '<string>',
'cidade' => '<string>',
'cnpj' => '12ABC34501DE35',
'cpf' => '12345678901',
'email' => '<string>',
'logradouro' => '<string>',
'nome' => 'Fulano de Tal',
'uf' => '<string>'
],
'infoAdicionais' => [
[
'nome' => '<string>',
'valor' => '<string>'
]
],
'loc' => [
'id' => 123
],
'solicitacaoPagador' => '<string>',
'status' => 'REMOVIDA_PELO_USUARIO_RECEBEDOR',
'valor' => [
'original' => '250.00'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}"
payload := strings.NewReader("{\n \"chave\": \"<string>\",\n \"devedor\": {\n \"cep\": \"<string>\",\n \"cidade\": \"<string>\",\n \"cnpj\": \"12ABC34501DE35\",\n \"cpf\": \"12345678901\",\n \"email\": \"<string>\",\n \"logradouro\": \"<string>\",\n \"nome\": \"Fulano de Tal\",\n \"uf\": \"<string>\"\n },\n \"infoAdicionais\": [\n {\n \"nome\": \"<string>\",\n \"valor\": \"<string>\"\n }\n ],\n \"loc\": {\n \"id\": 123\n },\n \"solicitacaoPagador\": \"<string>\",\n \"status\": \"REMOVIDA_PELO_USUARIO_RECEBEDOR\",\n \"valor\": {\n \"original\": \"250.00\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chave\": \"<string>\",\n \"devedor\": {\n \"cep\": \"<string>\",\n \"cidade\": \"<string>\",\n \"cnpj\": \"12ABC34501DE35\",\n \"cpf\": \"12345678901\",\n \"email\": \"<string>\",\n \"logradouro\": \"<string>\",\n \"nome\": \"Fulano de Tal\",\n \"uf\": \"<string>\"\n },\n \"infoAdicionais\": [\n {\n \"nome\": \"<string>\",\n \"valor\": \"<string>\"\n }\n ],\n \"loc\": {\n \"id\": 123\n },\n \"solicitacaoPagador\": \"<string>\",\n \"status\": \"REMOVIDA_PELO_USUARIO_RECEBEDOR\",\n \"valor\": {\n \"original\": \"250.00\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spi.sandbox.lerian.net/api/v1/brcode/cobv/{txid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chave\": \"<string>\",\n \"devedor\": {\n \"cep\": \"<string>\",\n \"cidade\": \"<string>\",\n \"cnpj\": \"12ABC34501DE35\",\n \"cpf\": \"12345678901\",\n \"email\": \"<string>\",\n \"logradouro\": \"<string>\",\n \"nome\": \"Fulano de Tal\",\n \"uf\": \"<string>\"\n },\n \"infoAdicionais\": [\n {\n \"nome\": \"<string>\",\n \"valor\": \"<string>\"\n }\n ],\n \"loc\": {\n \"id\": 123\n },\n \"solicitacaoPagador\": \"<string>\",\n \"status\": \"REMOVIDA_PELO_USUARIO_RECEBEDOR\",\n \"valor\": {\n \"original\": \"250.00\"\n }\n}"
response = http.request(request)
puts response.read_body{
"calendario": {
"criacao": "<string>",
"dataDeVencimento": "<string>",
"validadeAposVencimento": 123
},
"chave": "<string>",
"devedor": {
"cep": "<string>",
"cidade": "<string>",
"cnpj": "12ABC34501DE35",
"cpf": "12345678901",
"email": "<string>",
"logradouro": "<string>",
"nome": "Fulano de Tal",
"uf": "<string>"
},
"loc": {
"criacao": "<string>",
"id": 123,
"tipoCob": "cob",
"location": "<string>"
},
"location": "<string>",
"pixCopiaECola": "<string>",
"recebedor": {
"cep": "<string>",
"cidade": "<string>",
"cnpj": "<string>",
"cpf": "<string>",
"logradouro": "<string>",
"nome": "<string>",
"nomeFantasia": "<string>",
"uf": "<string>"
},
"revisao": 123,
"status": "ATIVA",
"txid": "<string>",
"valor": {
"abatimento": {
"modalidade": 123,
"valorPerc": "<string>"
},
"desconto": {
"modalidade": 3,
"descontoDataFixa": [
{
"data": "2030-03-01",
"valorPerc": "<string>"
}
],
"valorPerc": "<string>"
},
"juros": {
"modalidade": 123,
"valorPerc": "<string>"
},
"multa": {
"modalidade": 123,
"valorPerc": "<string>"
},
"original": "250.00"
},
"infoAdicionais": [
{
"nome": "<string>",
"valor": "<string>"
}
],
"solicitacaoPagador": "<string>"
}{
"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"
}Autorizações
JWT bearer token issued by the identity provider.
Parâmetros de caminho
Identificador da transação [a-zA-Z0-9]{26,35}.
Corpo
Controle de tempo da cobrança.
Show child attributes
Show child attributes
Chave DICT do recebedor.
77Devedor da cobrança.
Show child attributes
Show child attributes
Informações adicionais (máx 50).
Show child attributes
Show child attributes
Referência de location.
Show child attributes
Show child attributes
Texto livre apresentado ao pagador.
140Único valor aceito: REMOVIDA_PELO_USUARIO_RECEBEDOR (remove a cobrança).
REMOVIDA_PELO_USUARIO_RECEBEDOR Valores monetários da cobrança.
Show child attributes
Show child attributes
Resposta
OK
Show child attributes
Show child attributes
Chave DICT do recebedor.
77Show child attributes
Show child attributes
Show child attributes
Show child attributes
Localização do payload.
77Pix Copia e Cola (BR Code) correspondente à cobrança.
512Show child attributes
Show child attributes
Revisão da cobrança (inicia em 0).
Status do registro da cobrança.
ATIVA, CONCLUIDA, REMOVIDA_PELO_USUARIO_RECEBEDOR, REMOVIDA_PELO_PSP Identificador da transação.
[a-zA-Z0-9]{26,35}Show child attributes
Show child attributes
Show child attributes
Show child attributes
140Esta página foi útil?

