curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/qr/pay-and-confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--header 'X-Idempotency: <x-idempotency>' \
--data '
{
"amount": "29.90",
"idRec": "RR0000000000000000001",
"initiationId": "550e8400-e29b-41d4-a716-446655440010",
"description": "Payment for services",
"receiverMaxAmount": "500.00"
}
'import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/qr/pay-and-confirm"
payload = {
"amount": "29.90",
"idRec": "RR0000000000000000001",
"initiationId": "550e8400-e29b-41d4-a716-446655440010",
"description": "Payment for services",
"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({
amount: '29.90',
idRec: 'RR0000000000000000001',
initiationId: '550e8400-e29b-41d4-a716-446655440010',
description: 'Payment for services',
receiverMaxAmount: '500.00'
})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/qr/pay-and-confirm', 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/qr/pay-and-confirm",
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([
'amount' => '29.90',
'idRec' => 'RR0000000000000000001',
'initiationId' => '550e8400-e29b-41d4-a716-446655440010',
'description' => 'Payment for services',
'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/qr/pay-and-confirm"
payload := strings.NewReader("{\n \"amount\": \"29.90\",\n \"idRec\": \"RR0000000000000000001\",\n \"initiationId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"description\": \"Payment for services\",\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/qr/pay-and-confirm")
.header("X-Account-Id", "<x-account-id>")
.header("X-Idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"29.90\",\n \"idRec\": \"RR0000000000000000001\",\n \"initiationId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"description\": \"Payment for services\",\n \"receiverMaxAmount\": \"500.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/qr/pay-and-confirm")
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 \"amount\": \"29.90\",\n \"idRec\": \"RR0000000000000000001\",\n \"initiationId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"description\": \"Payment for services\",\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"
},
"cashoutId": "550e8400-e29b-41d4-a716-446655440010",
"cashoutStatus": "PROCESSING"
}{
"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"
},
"cashoutId": "550e8400-e29b-41d4-a716-446655440010",
"cashoutStatus": "PROCESSING"
}{
"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>"
}Pagar e confirmar uma recorrência do Pix Automático lida por QR Code
Jornada J3 do BACEN: em uma única operação atômica, processa o cashout de cobrança imediata pré-criado (initiationId) e confirma a recorrência lida (idRec). Retorna 200 quando o cashout é liquidado imediatamente (a solicitação de autorização fica em APPROVING); retorna 202 quando o cashout ainda está em processamento (a solicitação de autorização permanece em INITIATED até que o webhook de liquidação a avance). A conta do pagador é o X-Account-Id autenticado; o valor do débito é obtido da initiation referenciada e nunca é informado pelo cliente. X-Idempotency é obrigatório.
curl --request POST \
--url https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/qr/pay-and-confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--header 'X-Idempotency: <x-idempotency>' \
--data '
{
"amount": "29.90",
"idRec": "RR0000000000000000001",
"initiationId": "550e8400-e29b-41d4-a716-446655440010",
"description": "Payment for services",
"receiverMaxAmount": "500.00"
}
'import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/qr/pay-and-confirm"
payload = {
"amount": "29.90",
"idRec": "RR0000000000000000001",
"initiationId": "550e8400-e29b-41d4-a716-446655440010",
"description": "Payment for services",
"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({
amount: '29.90',
idRec: 'RR0000000000000000001',
initiationId: '550e8400-e29b-41d4-a716-446655440010',
description: 'Payment for services',
receiverMaxAmount: '500.00'
})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/qr/pay-and-confirm', 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/qr/pay-and-confirm",
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([
'amount' => '29.90',
'idRec' => 'RR0000000000000000001',
'initiationId' => '550e8400-e29b-41d4-a716-446655440010',
'description' => 'Payment for services',
'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/qr/pay-and-confirm"
payload := strings.NewReader("{\n \"amount\": \"29.90\",\n \"idRec\": \"RR0000000000000000001\",\n \"initiationId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"description\": \"Payment for services\",\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/qr/pay-and-confirm")
.header("X-Account-Id", "<x-account-id>")
.header("X-Idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"29.90\",\n \"idRec\": \"RR0000000000000000001\",\n \"initiationId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"description\": \"Payment for services\",\n \"receiverMaxAmount\": \"500.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://plugin-pix-indirect.api.lerian.net/v1/recurrences/payer/qr/pay-and-confirm")
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 \"amount\": \"29.90\",\n \"idRec\": \"RR0000000000000000001\",\n \"initiationId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"description\": \"Payment for services\",\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"
},
"cashoutId": "550e8400-e29b-41d4-a716-446655440010",
"cashoutStatus": "PROCESSING"
}{
"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"
},
"cashoutId": "550e8400-e29b-41d4-a716-446655440010",
"cashoutStatus": "PROCESSING"
}{
"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>"
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cabeçalhos
Identificador único da Conta do Ledger Midaz (formato UUID).
Chave de idempotência
Corpo
Amount é o valor do débito em BRL (formato 0.00). Obrigatório. O formato e a positividade — e, para initiations QR_CODE, a correspondência com o valor fixo do QR — são validados quando o pagamento é processado.
"29.90"
64"RR0000000000000000001"
"550e8400-e29b-41d4-a716-446655440010"
Description é a mensagem opcional da transferência (≤140 caracteres; sem HTML). As regras de conteúdo são aplicadas quando o pagamento é processado.
"Payment for services"
"500.00"
Esta página foi útil?

