curl --request POST \
--url https://api.example.com/v1/pix-automatico/authorizations/inbound/cancellation/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cpfCnpjSolCancelamento": "77379362038",
"dtInicialRecorrencia": "2024-01-10",
"idCancelamento": "IC0435879820240605bcdb1fhn43a",
"idRecorrencia": "RR0435879820240920njua7shf40o",
"motivoCancelamento": 6,
"nrContrato": "1234567890ABC",
"pagador": {
"cpfCnpj": "11111111111",
"ispb": "99999004",
"nrConta": "12345678",
"tpPessoa": 0,
"codMunIbge": 3550308,
"nrAgencia": "1234"
},
"recebedor": {
"cnpj": "61695227000193",
"ispb": "04358798",
"nome": "Enel"
},
"tpFrequencia": 4,
"tpPessoaSol": 0,
"descContrato": "Conta de energia",
"dtFinalRecorrencia": "2026-01-10",
"dtHrCancelamento": "2024-09-23T10:10:06.101Z",
"dtHrCriacaoRecorrencia": "2024-09-20T09:25:49.025Z",
"valor": 550
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/pix-automatico/authorizations/inbound/cancellation/validate"
payload := strings.NewReader("{\n \"cpfCnpjSolCancelamento\": \"77379362038\",\n \"dtInicialRecorrencia\": \"2024-01-10\",\n \"idCancelamento\": \"IC0435879820240605bcdb1fhn43a\",\n \"idRecorrencia\": \"RR0435879820240920njua7shf40o\",\n \"motivoCancelamento\": 6,\n \"nrContrato\": \"1234567890ABC\",\n \"pagador\": {\n \"cpfCnpj\": \"11111111111\",\n \"ispb\": \"99999004\",\n \"nrConta\": \"12345678\",\n \"tpPessoa\": 0,\n \"codMunIbge\": 3550308,\n \"nrAgencia\": \"1234\"\n },\n \"recebedor\": {\n \"cnpj\": \"61695227000193\",\n \"ispb\": \"04358798\",\n \"nome\": \"Enel\"\n },\n \"tpFrequencia\": 4,\n \"tpPessoaSol\": 0,\n \"descContrato\": \"Conta de energia\",\n \"dtFinalRecorrencia\": \"2026-01-10\",\n \"dtHrCancelamento\": \"2024-09-23T10:10:06.101Z\",\n \"dtHrCriacaoRecorrencia\": \"2024-09-20T09:25:49.025Z\",\n \"valor\": 550\n}")
req, _ := http.NewRequest("POST", 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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cpfCnpjSolCancelamento: '77379362038',
dtInicialRecorrencia: '2024-01-10',
idCancelamento: 'IC0435879820240605bcdb1fhn43a',
idRecorrencia: 'RR0435879820240920njua7shf40o',
motivoCancelamento: 6,
nrContrato: '1234567890ABC',
pagador: {
cpfCnpj: '11111111111',
ispb: '99999004',
nrConta: '12345678',
tpPessoa: 0,
codMunIbge: 3550308,
nrAgencia: '1234'
},
recebedor: {cnpj: '61695227000193', ispb: '04358798', nome: 'Enel'},
tpFrequencia: 4,
tpPessoaSol: 0,
descContrato: 'Conta de energia',
dtFinalRecorrencia: '2026-01-10',
dtHrCancelamento: '2024-09-23T10:10:06.101Z',
dtHrCriacaoRecorrencia: '2024-09-20T09:25:49.025Z',
valor: 550
})
};
fetch('https://api.example.com/v1/pix-automatico/authorizations/inbound/cancellation/validate', 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/authorizations/inbound/cancellation/validate"
payload = {
"cpfCnpjSolCancelamento": "77379362038",
"dtInicialRecorrencia": "2024-01-10",
"idCancelamento": "IC0435879820240605bcdb1fhn43a",
"idRecorrencia": "RR0435879820240920njua7shf40o",
"motivoCancelamento": 6,
"nrContrato": "1234567890ABC",
"pagador": {
"cpfCnpj": "11111111111",
"ispb": "99999004",
"nrConta": "12345678",
"tpPessoa": 0,
"codMunIbge": 3550308,
"nrAgencia": "1234"
},
"recebedor": {
"cnpj": "61695227000193",
"ispb": "04358798",
"nome": "Enel"
},
"tpFrequencia": 4,
"tpPessoaSol": 0,
"descContrato": "Conta de energia",
"dtFinalRecorrencia": "2026-01-10",
"dtHrCancelamento": "2024-09-23T10:10:06.101Z",
"dtHrCriacaoRecorrencia": "2024-09-20T09:25:49.025Z",
"valor": 550
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"dtHrValidacao": "2024-09-20T14:12:05.025Z",
"resultado": 1,
"motivoRejeicao": "AP03"
}{
"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"
}
}Validate an inbound PIX Automatico cancellation
Validates an inbound recurring-payment cancellation request pushed by JDPI (section 5.2.2, the plugin is the server). The cancellation is valid iff a live authorization exists and the FSM permits a transition to Cancelled from its current status; the result is returned inline (200).
curl --request POST \
--url https://api.example.com/v1/pix-automatico/authorizations/inbound/cancellation/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cpfCnpjSolCancelamento": "77379362038",
"dtInicialRecorrencia": "2024-01-10",
"idCancelamento": "IC0435879820240605bcdb1fhn43a",
"idRecorrencia": "RR0435879820240920njua7shf40o",
"motivoCancelamento": 6,
"nrContrato": "1234567890ABC",
"pagador": {
"cpfCnpj": "11111111111",
"ispb": "99999004",
"nrConta": "12345678",
"tpPessoa": 0,
"codMunIbge": 3550308,
"nrAgencia": "1234"
},
"recebedor": {
"cnpj": "61695227000193",
"ispb": "04358798",
"nome": "Enel"
},
"tpFrequencia": 4,
"tpPessoaSol": 0,
"descContrato": "Conta de energia",
"dtFinalRecorrencia": "2026-01-10",
"dtHrCancelamento": "2024-09-23T10:10:06.101Z",
"dtHrCriacaoRecorrencia": "2024-09-20T09:25:49.025Z",
"valor": 550
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/pix-automatico/authorizations/inbound/cancellation/validate"
payload := strings.NewReader("{\n \"cpfCnpjSolCancelamento\": \"77379362038\",\n \"dtInicialRecorrencia\": \"2024-01-10\",\n \"idCancelamento\": \"IC0435879820240605bcdb1fhn43a\",\n \"idRecorrencia\": \"RR0435879820240920njua7shf40o\",\n \"motivoCancelamento\": 6,\n \"nrContrato\": \"1234567890ABC\",\n \"pagador\": {\n \"cpfCnpj\": \"11111111111\",\n \"ispb\": \"99999004\",\n \"nrConta\": \"12345678\",\n \"tpPessoa\": 0,\n \"codMunIbge\": 3550308,\n \"nrAgencia\": \"1234\"\n },\n \"recebedor\": {\n \"cnpj\": \"61695227000193\",\n \"ispb\": \"04358798\",\n \"nome\": \"Enel\"\n },\n \"tpFrequencia\": 4,\n \"tpPessoaSol\": 0,\n \"descContrato\": \"Conta de energia\",\n \"dtFinalRecorrencia\": \"2026-01-10\",\n \"dtHrCancelamento\": \"2024-09-23T10:10:06.101Z\",\n \"dtHrCriacaoRecorrencia\": \"2024-09-20T09:25:49.025Z\",\n \"valor\": 550\n}")
req, _ := http.NewRequest("POST", 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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cpfCnpjSolCancelamento: '77379362038',
dtInicialRecorrencia: '2024-01-10',
idCancelamento: 'IC0435879820240605bcdb1fhn43a',
idRecorrencia: 'RR0435879820240920njua7shf40o',
motivoCancelamento: 6,
nrContrato: '1234567890ABC',
pagador: {
cpfCnpj: '11111111111',
ispb: '99999004',
nrConta: '12345678',
tpPessoa: 0,
codMunIbge: 3550308,
nrAgencia: '1234'
},
recebedor: {cnpj: '61695227000193', ispb: '04358798', nome: 'Enel'},
tpFrequencia: 4,
tpPessoaSol: 0,
descContrato: 'Conta de energia',
dtFinalRecorrencia: '2026-01-10',
dtHrCancelamento: '2024-09-23T10:10:06.101Z',
dtHrCriacaoRecorrencia: '2024-09-20T09:25:49.025Z',
valor: 550
})
};
fetch('https://api.example.com/v1/pix-automatico/authorizations/inbound/cancellation/validate', 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/authorizations/inbound/cancellation/validate"
payload = {
"cpfCnpjSolCancelamento": "77379362038",
"dtInicialRecorrencia": "2024-01-10",
"idCancelamento": "IC0435879820240605bcdb1fhn43a",
"idRecorrencia": "RR0435879820240920njua7shf40o",
"motivoCancelamento": 6,
"nrContrato": "1234567890ABC",
"pagador": {
"cpfCnpj": "11111111111",
"ispb": "99999004",
"nrConta": "12345678",
"tpPessoa": 0,
"codMunIbge": 3550308,
"nrAgencia": "1234"
},
"recebedor": {
"cnpj": "61695227000193",
"ispb": "04358798",
"nome": "Enel"
},
"tpFrequencia": 4,
"tpPessoaSol": 0,
"descContrato": "Conta de energia",
"dtFinalRecorrencia": "2026-01-10",
"dtHrCancelamento": "2024-09-23T10:10:06.101Z",
"dtHrCriacaoRecorrencia": "2024-09-20T09:25:49.025Z",
"valor": 550
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"dtHrValidacao": "2024-09-20T14:12:05.025Z",
"resultado": 1,
"motivoRejeicao": "AP03"
}{
"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.
Corpo
Requester CPF/CNPJ (a v5.5.0 string).
"77379362038"
First payment date (aaaa-mm-dd).
"2024-01-10"
Unique cancellation id (29-char, IC...).
"IC0435879820240605bcdb1fhn43a"
Unique recurrence id (29-char, RR...).
"RR0435879820240920njua7shf40o"
Cancellation reason (0..10).
6
Contract/order identifier (35-char).
"1234567890ABC"
The recurrence pagador.
Show child attributes
Show child attributes
The recurrence recebedor.
Show child attributes
Show child attributes
Recurrence periodicity (0..4).
4
Requester person type (0=PF, 1=PJ).
0
Free-text contract description (35-char).
"Conta de energia"
The devedor, sent only when it differs from the payer.
Show child attributes
Show child attributes
Last payment date (aaaa-mm-dd).
"2026-01-10"
Cancellation timestamp (UTC).
"2024-09-23T10:10:06.101Z"
Recurrence creation timestamp (UTC).
"2024-09-20T09:25:49.025Z"
Fixed payment amount in reais (a JSON number).
550
Esta página foi útil?

