Skip to main content
POST
/
v1
/
pix-automatico
/
events
/
authorization-cancellation-status
Receive a Pix Automático authorization cancellation status event
curl --request POST \
  --url https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/events/authorization-cancellation-status \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-DataHoraEvento: <x-datahoraevento>' \
  --header 'X-NomeEvento: <x-nomeevento>' \
  --data '
{
  "cpfCnpjSolCancelamento": "<string>",
  "dtHrSituacao": "<string>",
  "idCancelamento": "<string>",
  "idRecorrencia": "<string>",
  "motivoCancelamento": 123,
  "tpPessoaSol": 123,
  "codigoErro": "<string>",
  "descCodigoErro": "<string>",
  "dtHrCancelamento": "<string>",
  "stCancelamento": 123
}
'
import requests

url = "https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/events/authorization-cancellation-status"

payload = {
"cpfCnpjSolCancelamento": "<string>",
"dtHrSituacao": "<string>",
"idCancelamento": "<string>",
"idRecorrencia": "<string>",
"motivoCancelamento": 123,
"tpPessoaSol": 123,
"codigoErro": "<string>",
"descCodigoErro": "<string>",
"dtHrCancelamento": "<string>",
"stCancelamento": 123
}
headers = {
"X-DataHoraEvento": "<x-datahoraevento>",
"X-NomeEvento": "<x-nomeevento>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'X-DataHoraEvento': '<x-datahoraevento>',
'X-NomeEvento': '<x-nomeevento>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cpfCnpjSolCancelamento: '<string>',
dtHrSituacao: '<string>',
idCancelamento: '<string>',
idRecorrencia: '<string>',
motivoCancelamento: 123,
tpPessoaSol: 123,
codigoErro: '<string>',
descCodigoErro: '<string>',
dtHrCancelamento: '<string>',
stCancelamento: 123
})
};

fetch('https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/events/authorization-cancellation-status', 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://plugin-pix-direct.api.lerian.net/v1/pix-automatico/events/authorization-cancellation-status",
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([
'cpfCnpjSolCancelamento' => '<string>',
'dtHrSituacao' => '<string>',
'idCancelamento' => '<string>',
'idRecorrencia' => '<string>',
'motivoCancelamento' => 123,
'tpPessoaSol' => 123,
'codigoErro' => '<string>',
'descCodigoErro' => '<string>',
'dtHrCancelamento' => '<string>',
'stCancelamento' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-DataHoraEvento: <x-datahoraevento>",
"X-NomeEvento: <x-nomeevento>"
],
]);

$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://plugin-pix-direct.api.lerian.net/v1/pix-automatico/events/authorization-cancellation-status"

payload := strings.NewReader("{\n \"cpfCnpjSolCancelamento\": \"<string>\",\n \"dtHrSituacao\": \"<string>\",\n \"idCancelamento\": \"<string>\",\n \"idRecorrencia\": \"<string>\",\n \"motivoCancelamento\": 123,\n \"tpPessoaSol\": 123,\n \"codigoErro\": \"<string>\",\n \"descCodigoErro\": \"<string>\",\n \"dtHrCancelamento\": \"<string>\",\n \"stCancelamento\": 123\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-DataHoraEvento", "<x-datahoraevento>")
req.Header.Add("X-NomeEvento", "<x-nomeevento>")
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://plugin-pix-direct.api.lerian.net/v1/pix-automatico/events/authorization-cancellation-status")
.header("X-DataHoraEvento", "<x-datahoraevento>")
.header("X-NomeEvento", "<x-nomeevento>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cpfCnpjSolCancelamento\": \"<string>\",\n \"dtHrSituacao\": \"<string>\",\n \"idCancelamento\": \"<string>\",\n \"idRecorrencia\": \"<string>\",\n \"motivoCancelamento\": 123,\n \"tpPessoaSol\": 123,\n \"codigoErro\": \"<string>\",\n \"descCodigoErro\": \"<string>\",\n \"dtHrCancelamento\": \"<string>\",\n \"stCancelamento\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/events/authorization-cancellation-status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-DataHoraEvento"] = '<x-datahoraevento>'
request["X-NomeEvento"] = '<x-nomeevento>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cpfCnpjSolCancelamento\": \"<string>\",\n \"dtHrSituacao\": \"<string>\",\n \"idCancelamento\": \"<string>\",\n \"idRecorrencia\": \"<string>\",\n \"motivoCancelamento\": 123,\n \"tpPessoaSol\": 123,\n \"codigoErro\": \"<string>\",\n \"descCodigoErro\": \"<string>\",\n \"dtHrCancelamento\": \"<string>\",\n \"stCancelamento\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "code": "<string>",
  "detail": "<string>",
  "errors": [
    {
      "location": "<string>",
      "message": "<string>",
      "value": "<unknown>"
    }
  ],
  "instance": "<string>",
  "status": 123,
  "title": "<string>",
  "type": "about:blank"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Obtain token from /v1/login/oauth/access_token endpoint using client credentials (clientId and clientSecret).

Include token in Authorization header: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Token expires after 3600 seconds (1 hour).

Headers

Authorization
string

Bearer access token (the financial-ingress gate; the handler fails closed with Pix-0082 when absent).

X-DataHoraEvento
string
required

Event registration instant (UTC: aaaa-mm-ddTHH:mm:ss.sssZ). Mandatory per

X-NomeEvento
string
required

Event name. Mandatory per; informational passthrough.

Body

application/json
cpfCnpjSolCancelamento
string
required

Requester CPF/CNPJ (a v5.5.0 string).

dtHrSituacao
string
required

Situation-query timestamp (UTC).

idCancelamento
string
required

Unique cancellation id (29-char, IC...).

idRecorrencia
string
required

Unique recurrence id (29-char, RR...).

motivoCancelamento
integer<int64>
required

Cancellation reason (0..10).

tpPessoaSol
integer<int64>
required

Requester person type (0=PF, 1=PJ).

codigoErro
string

Upstream error code (on a rejected cancellation).

descCodigoErro
string

Upstream error description.

dtHrCancelamento
string

Cancellation request timestamp (UTC).

recebedor
object
stCancelamento
integer<int64>

Cancellation status (0=Aceito, 1=Rejeitado); OPTIONAL, absent => no-op.

Response

No Content