Skip to main content
GET
/
v1
/
recurrences
/
payer
/
authorizations
/
{id}
Get a Pix Automático Authorization
curl --request GET \
  --url https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Account-Id: <x-account-id>'
import requests

url = "https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}"

headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {'X-Account-Id': '<x-account-id>', Authorization: 'Bearer <token>'}
};

fetch('https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Account-Id: <x-account-id>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-Account-Id", "<x-account-id>")
req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorizations/{id}")

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

request = Net::HTTP::Get.new(url)
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "accountId": "019cf6ef-e418-7ced-80c0-7b9816faa798",
  "amount": {
    "fixed": "29.90",
    "max": "500.00",
    "min": "10.00"
  },
  "approvedAt": "2023-11-07T05:31:56Z",
  "authorizationRequestId": "019cf6ef-e418-7ced-80c0-7b9816faa798",
  "cancellationReason": "Customer reported unauthorized charge",
  "cancellationReasonKind": "FRAUD",
  "cancelledAt": "2023-11-07T05:31:56Z",
  "cancelledByOperatorId": "op-9",
  "createdAt": "2023-11-07T05:31:56Z",
  "destination": {
    "account": "123456",
    "accountType": "CACC",
    "bank": "30306294",
    "branch": "0001",
    "document": "12345678000199",
    "key": "contato@streaming.co",
    "name": "Streaming Co",
    "personType": "LEGAL_PERSON"
  },
  "expiredAt": "2023-11-07T05:31:56Z",
  "externalAuthorizationId": "AUT-2026-04-001",
  "id": "019cf6ef-e418-7ced-80c0-7b9816faa798",
  "nextChargeAmount": "29.90",
  "nextChargeAt": "2023-11-07T05:31:56Z",
  "periodicity": {
    "customDays": 30,
    "type": "MONTHLY"
  },
  "receiverMaxAmount": "500.00",
  "retryPolicy": "RETRY_3X_7D",
  "status": "AUTHORIZED",
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
"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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Account-Id
string
required

Unique identifier of the Midaz Ledger Account (UUID format).

Path Parameters

id
string
required

Authorization ID (UUID format)

Response

OK

accountId
string
Example:

"019cf6ef-e418-7ced-80c0-7b9816faa798"

amount
object
approvedAt
string<date-time>
authorizationRequestId
string
Example:

"019cf6ef-e418-7ced-80c0-7b9816faa798"

cancelReason
enum<string>
Available options:
PAYER,
FRAUD,
EXPIRED,
RECEIVER
cancellationReason
string

CancellationReason is the free-text justification recorded at cancel time (required for FRAUD). Nil when absent.

Example:

"Customer reported unauthorized charge"

cancellationReasonKind
enum<string>

CancellationReasonKind is the structured cancel reason (PAYER, FRAUD, EXPIRED, RECEIVER). Nil when the authorization has not been cancelled.

Available options:
PAYER,
FRAUD,
EXPIRED,
RECEIVER
Example:

"FRAUD"

cancelledAt
string<date-time>
cancelledByOperatorId
string

CancelledByOperatorID is the operator subject that performed a FRAUD cancellation. Nil for payer/system-initiated cancellations.

Example:

"op-9"

createdAt
string<date-time>
destination
object
expiredAt
string<date-time>
externalAuthorizationId
string
Example:

"AUT-2026-04-001"

id
string
Example:

"019cf6ef-e418-7ced-80c0-7b9816faa798"

nextChargeAmount
string
Example:

"29.90"

nextChargeAt
string<date-time>
periodicity
object
receiverMaxAmount
string
Example:

"500.00"

retryPolicy
string
Example:

"RETRY_3X_7D"

status
enum<string>
Available options:
AUTHORIZED,
CANCELLED,
EXPIRED
Example:

"AUTHORIZED"

updatedAt
string<date-time>