Cancel a Pix Automático Authorization
curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--header 'X-Idempotency: <x-idempotency>' \
--data '
{
"reasonKind": "PAYER",
"cancelledBy": "agent-4417",
"evidenceReference": "FRAUD-CASE-2026-0042",
"reasonText": "Customer reported unauthorized charge"
}
'import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel"
payload = {
"reasonKind": "PAYER",
"cancelledBy": "agent-4417",
"evidenceReference": "FRAUD-CASE-2026-0042",
"reasonText": "Customer reported unauthorized charge"
}
headers = {
"X-Account-Id": "<x-account-id>",
"X-Idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Account-Id': '<x-account-id>',
'X-Idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
reasonKind: 'PAYER',
cancelledBy: 'agent-4417',
evidenceReference: 'FRAUD-CASE-2026-0042',
reasonText: 'Customer reported unauthorized charge'
})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel', 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-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel",
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([
'reasonKind' => 'PAYER',
'cancelledBy' => 'agent-4417',
'evidenceReference' => 'FRAUD-CASE-2026-0042',
'reasonText' => 'Customer reported unauthorized charge'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Account-Id: <x-account-id>",
"X-Idempotency: <x-idempotency>"
],
]);
$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-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel"
payload := strings.NewReader("{\n \"reasonKind\": \"PAYER\",\n \"cancelledBy\": \"agent-4417\",\n \"evidenceReference\": \"FRAUD-CASE-2026-0042\",\n \"reasonText\": \"Customer reported unauthorized charge\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Account-Id", "<x-account-id>")
req.Header.Add("X-Idempotency", "<x-idempotency>")
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-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel")
.header("X-Account-Id", "<x-account-id>")
.header("X-Idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reasonKind\": \"PAYER\",\n \"cancelledBy\": \"agent-4417\",\n \"evidenceReference\": \"FRAUD-CASE-2026-0042\",\n \"reasonText\": \"Customer reported unauthorized charge\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["X-Idempotency"] = '<x-idempotency>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reasonKind\": \"PAYER\",\n \"cancelledBy\": \"agent-4417\",\n \"evidenceReference\": \"FRAUD-CASE-2026-0042\",\n \"reasonText\": \"Customer reported unauthorized charge\"\n}"
response = http.request(request)
puts response.read_body{
"authorization": {
"cancellationReasonKind": "PAYER",
"cancelledAt": "2026-05-05T22:30:00Z",
"effectiveFrom": "2026-05-06",
"id": "019cf6ef-e418-7ced-80c0-7b9816faa798",
"status": "CANCELLED"
}
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}Cancel a Pix Automático Authorization
Cancel an active authorization. reasonKind=PAYER cancels the caller’s own mandate; reasonKind=FRAUD records the caller as the operator and requires reasonText. The BACEN-effective date is D+1 (D+2 after 22:00 BRT) for PAYER and immediate for FRAUD. X-Idempotency is required; a repeat call replays the same response with X-Idempotency-Replayed: true.
POST
/
v1
/
recurrences
/
payer
/
authorizations
/
{id}
/
cancel
Cancel a Pix Automático Authorization
curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--header 'X-Idempotency: <x-idempotency>' \
--data '
{
"reasonKind": "PAYER",
"cancelledBy": "agent-4417",
"evidenceReference": "FRAUD-CASE-2026-0042",
"reasonText": "Customer reported unauthorized charge"
}
'import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel"
payload = {
"reasonKind": "PAYER",
"cancelledBy": "agent-4417",
"evidenceReference": "FRAUD-CASE-2026-0042",
"reasonText": "Customer reported unauthorized charge"
}
headers = {
"X-Account-Id": "<x-account-id>",
"X-Idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Account-Id': '<x-account-id>',
'X-Idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
reasonKind: 'PAYER',
cancelledBy: 'agent-4417',
evidenceReference: 'FRAUD-CASE-2026-0042',
reasonText: 'Customer reported unauthorized charge'
})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel', 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-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel",
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([
'reasonKind' => 'PAYER',
'cancelledBy' => 'agent-4417',
'evidenceReference' => 'FRAUD-CASE-2026-0042',
'reasonText' => 'Customer reported unauthorized charge'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Account-Id: <x-account-id>",
"X-Idempotency: <x-idempotency>"
],
]);
$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-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel"
payload := strings.NewReader("{\n \"reasonKind\": \"PAYER\",\n \"cancelledBy\": \"agent-4417\",\n \"evidenceReference\": \"FRAUD-CASE-2026-0042\",\n \"reasonText\": \"Customer reported unauthorized charge\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Account-Id", "<x-account-id>")
req.Header.Add("X-Idempotency", "<x-idempotency>")
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-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel")
.header("X-Account-Id", "<x-account-id>")
.header("X-Idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reasonKind\": \"PAYER\",\n \"cancelledBy\": \"agent-4417\",\n \"evidenceReference\": \"FRAUD-CASE-2026-0042\",\n \"reasonText\": \"Customer reported unauthorized charge\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["X-Idempotency"] = '<x-idempotency>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reasonKind\": \"PAYER\",\n \"cancelledBy\": \"agent-4417\",\n \"evidenceReference\": \"FRAUD-CASE-2026-0042\",\n \"reasonText\": \"Customer reported unauthorized charge\"\n}"
response = http.request(request)
puts response.read_body{
"authorization": {
"cancellationReasonKind": "PAYER",
"cancelledAt": "2026-05-05T22:30:00Z",
"effectiveFrom": "2026-05-06",
"id": "019cf6ef-e418-7ced-80c0-7b9816faa798",
"status": "CANCELLED"
}
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique identifier of the Midaz Ledger Account (UUID format).
Idempotency key
Path Parameters
Authorization ID (UUID format)
Body
application/json
Available options:
PAYER, FRAUD Example:
"PAYER"
Maximum string length:
255Example:
"agent-4417"
Maximum string length:
200Example:
"FRAUD-CASE-2026-0042"
Maximum string length:
500Example:
"Customer reported unauthorized charge"
Response
OK
Show child attributes
Show child attributes
Was this page helpful?
⌘I

