curl --request POST \
--url https://api.example.com/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 '
{
"idCancelamento": "IC0435879820240605bcdb1fhn43a",
"idRecorrencia": "RR0435879820240605njua7shf40o",
"stCancelamento": 0
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/pix-automatico/events/authorization-cancellation-status"
payload := strings.NewReader("{\n \"idCancelamento\": \"IC0435879820240605bcdb1fhn43a\",\n \"idRecorrencia\": \"RR0435879820240605njua7shf40o\",\n \"stCancelamento\": 0\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))
}const options = {
method: 'POST',
headers: {
'X-DataHoraEvento': '<x-datahoraevento>',
'X-NomeEvento': '<x-nomeevento>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
idCancelamento: 'IC0435879820240605bcdb1fhn43a',
idRecorrencia: 'RR0435879820240605njua7shf40o',
stCancelamento: 0
})
};
fetch('https://api.example.com/v1/pix-automatico/events/authorization-cancellation-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/pix-automatico/events/authorization-cancellation-status"
payload = {
"idCancelamento": "IC0435879820240605bcdb1fhn43a",
"idRecorrencia": "RR0435879820240605njua7shf40o",
"stCancelamento": 0
}
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){
"code": "<string>",
"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"
}
}{
"code": "<string>",
"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"
}
}{
"code": "<string>",
"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"
}
}{
"code": "<string>",
"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"
}
}Receive a PIX Automatico authorization cancellation status event
Receives the JDPI situacao-cancelamento-autorizacao-callback push event (section 6, body section 4.3.6): the plugin is the server. The pushed stCancelamento Aceito/Rejeitado outcome is projected onto the local authorization. Idempotent: a duplicate re-delivery is a clean 200 no-op. No response body.
curl --request POST \
--url https://api.example.com/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 '
{
"idCancelamento": "IC0435879820240605bcdb1fhn43a",
"idRecorrencia": "RR0435879820240605njua7shf40o",
"stCancelamento": 0
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/pix-automatico/events/authorization-cancellation-status"
payload := strings.NewReader("{\n \"idCancelamento\": \"IC0435879820240605bcdb1fhn43a\",\n \"idRecorrencia\": \"RR0435879820240605njua7shf40o\",\n \"stCancelamento\": 0\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))
}const options = {
method: 'POST',
headers: {
'X-DataHoraEvento': '<x-datahoraevento>',
'X-NomeEvento': '<x-nomeevento>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
idCancelamento: 'IC0435879820240605bcdb1fhn43a',
idRecorrencia: 'RR0435879820240605njua7shf40o',
stCancelamento: 0
})
};
fetch('https://api.example.com/v1/pix-automatico/events/authorization-cancellation-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/pix-automatico/events/authorization-cancellation-status"
payload = {
"idCancelamento": "IC0435879820240605bcdb1fhn43a",
"idRecorrencia": "RR0435879820240605njua7shf40o",
"stCancelamento": 0
}
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){
"code": "<string>",
"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"
}
}{
"code": "<string>",
"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"
}
}{
"code": "<string>",
"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"
}
}{
"code": "<string>",
"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
Bearer access token (the financial-ingress gate; the handler fails closed with PIX-0082 when absent).
"Bearer eyJ..."
Event registration instant (UTC: aaaa-mm-ddTHH:mm:ss.sssZ). Mandatory per §6.1.
"2024-06-05T10:10:05.025Z"
Event name (see §6.3.1 catalog). Mandatory per §6.1; informational passthrough.
"situacao-autorizacao-callback"
Corpo
Unique cancellation id (29-char, IC...).
"IC0435879820240605bcdb1fhn43a"
Unique recurrence id (29-char, RR...).
"RR0435879820240605njua7shf40o"
Cancellation status (0=Aceito, 1=Rejeitado); §4.3.6 OPTIONAL, absent => no-op.
0
Resposta
No Content
Esta página foi útil?

