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 y confirmar una recurrencia de Pix Automático escaneada
Jornada J3 de BACEN: en una única operación atómica, procesa el cashout de cobro inmediato pre-creado (initiationId) y confirma la recurrencia escaneada (idRec). Devuelve 200 cuando el cashout se liquida de inmediato (la solicitud de autorización queda en APPROVING); devuelve 202 cuando el cashout aún se está procesando (la solicitud de autorización permanece en INITIATED hasta que el webhook de liquidación la haga avanzar). La cuenta del pagador es el X-Account-Id autenticado; el monto del débito se toma de la iniciación referenciada y nunca lo proporciona el cliente. X-Idempotency es obligatorio.
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>"
}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
Cuerpo
Amount es el monto del débito en BRL (formato 0.00). Obligatorio. El formato y que sea positivo (y, para iniciaciones QR_CODE, la coincidencia con el monto fijo del QR) se validan cuando se procesa el pago.
"29.90"
64"RR0000000000000000001"
"550e8400-e29b-41d4-a716-446655440010"
Description es la remesa de transferencia opcional (≤140 caracteres; sin HTML). Las reglas de contenido se aplican cuando se procesa el pago.
"Payment for services"
"500.00"
¿Esta página le ayudó?

