Decidir sobre una solicitud de autorización de Pix Automático
curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorization-requests/{id}/decision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--header 'X-Idempotency: <x-idempotency>' \
--data '
{
"decision": "ACCEPTED",
"receiverMaxAmount": "500.00"
}
'import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorization-requests/{id}/decision"
payload = {
"decision": "ACCEPTED",
"receiverMaxAmount": "500.00"
}
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({decision: 'ACCEPTED', receiverMaxAmount: '500.00'})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorization-requests/{id}/decision', 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/authorization-requests/{id}/decision",
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([
'decision' => 'ACCEPTED',
'receiverMaxAmount' => '500.00'
]),
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/authorization-requests/{id}/decision"
payload := strings.NewReader("{\n \"decision\": \"ACCEPTED\",\n \"receiverMaxAmount\": \"500.00\"\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/authorization-requests/{id}/decision")
.header("X-Account-Id", "<x-account-id>")
.header("X-Idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decision\": \"ACCEPTED\",\n \"receiverMaxAmount\": \"500.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorization-requests/{id}/decision")
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 \"decision\": \"ACCEPTED\",\n \"receiverMaxAmount\": \"500.00\"\n}"
response = http.request(request)
puts response.read_body{
"authorizationRequest": {
"acceptedMaxAmount": "500.00",
"accountId": "019cf6ef-e418-7ced-80c0-7b9816faa798",
"amount": {
"fixed": "29.90",
"max": "500.00",
"min": "10.00"
},
"approvingAt": "2023-11-07T05:31:56Z",
"cancellationCode": "ACCL",
"cancellationRequester": "PSP_PAYEE",
"cancelledAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"description": "Streaming subscription",
"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",
"externalRequestId": "RREC-2026-04-001",
"firstChargeId": "019cf6ef-e418-7ced-80c0-7b9816faa798",
"id": "019cf6ef-e418-7ced-80c0-7b9816faa798",
"journey": "J1",
"payeeRejectionCode": "MD20",
"payeeRejectionDescription": "<string>",
"periodicity": {
"customDays": 30,
"type": "MONTHLY"
},
"rejectedAt": "2023-11-07T05:31:56Z",
"replyFailedAt": "2023-11-07T05:31:56Z",
"replyFailureReason": "<string>",
"retryPolicy": "RETRY_3X_7D",
"status": "PENDING",
"updatedAt": "2023-11-07T05:31:56Z",
"validUntil": "2026-06-30T23:59:59Z"
}
}{
"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>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}Decidir sobre una solicitud de autorización de Pix Automático
Acepta o rechaza una solicitud de autorización pendiente. La decisión se confirma con BTG de forma síncrona antes de cualquier cambio de estado local, por lo que la respuesta refleja el resultado final. X-Idempotency es obligatorio.
POST
/
v1
/
recurrences
/
payer
/
authorization-requests
/
{id}
/
decision
Decidir sobre una solicitud de autorización de Pix Automático
curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorization-requests/{id}/decision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--header 'X-Idempotency: <x-idempotency>' \
--data '
{
"decision": "ACCEPTED",
"receiverMaxAmount": "500.00"
}
'import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorization-requests/{id}/decision"
payload = {
"decision": "ACCEPTED",
"receiverMaxAmount": "500.00"
}
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({decision: 'ACCEPTED', receiverMaxAmount: '500.00'})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorization-requests/{id}/decision', 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/authorization-requests/{id}/decision",
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([
'decision' => 'ACCEPTED',
'receiverMaxAmount' => '500.00'
]),
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/authorization-requests/{id}/decision"
payload := strings.NewReader("{\n \"decision\": \"ACCEPTED\",\n \"receiverMaxAmount\": \"500.00\"\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/authorization-requests/{id}/decision")
.header("X-Account-Id", "<x-account-id>")
.header("X-Idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decision\": \"ACCEPTED\",\n \"receiverMaxAmount\": \"500.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/authorization-requests/{id}/decision")
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 \"decision\": \"ACCEPTED\",\n \"receiverMaxAmount\": \"500.00\"\n}"
response = http.request(request)
puts response.read_body{
"authorizationRequest": {
"acceptedMaxAmount": "500.00",
"accountId": "019cf6ef-e418-7ced-80c0-7b9816faa798",
"amount": {
"fixed": "29.90",
"max": "500.00",
"min": "10.00"
},
"approvingAt": "2023-11-07T05:31:56Z",
"cancellationCode": "ACCL",
"cancellationRequester": "PSP_PAYEE",
"cancelledAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"description": "Streaming subscription",
"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",
"externalRequestId": "RREC-2026-04-001",
"firstChargeId": "019cf6ef-e418-7ced-80c0-7b9816faa798",
"id": "019cf6ef-e418-7ced-80c0-7b9816faa798",
"journey": "J1",
"payeeRejectionCode": "MD20",
"payeeRejectionDescription": "<string>",
"periodicity": {
"customDays": 30,
"type": "MONTHLY"
},
"rejectedAt": "2023-11-07T05:31:56Z",
"replyFailedAt": "2023-11-07T05:31:56Z",
"replyFailureReason": "<string>",
"retryPolicy": "RETRY_3X_7D",
"status": "PENDING",
"updatedAt": "2023-11-07T05:31:56Z",
"validUntil": "2026-06-30T23:59:59Z"
}
}{
"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>"
}{
"code": "<string>",
"title": "<string>",
"message": "<string>"
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Encabezados
Identificador único de la cuenta del Ledger de Midaz (formato UUID).
Clave de idempotencia
Parámetros de ruta
ID de la solicitud de autorización (formato UUID)
Cuerpo
application/json
Respuesta
OK
Show child attributes
Show child attributes
¿Esta página le ayudó?
Obtener una solicitud de autorización de Pix Automático
Anterior
Listar autorizaciones de Pix Automático
Siguiente
⌘I

