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>"
}Pay and Confirm a Scanned Pix Automático Recurrence
BACEN journey J3: as a single atomic operation, process the pre-created immediate-charge cashout (initiationId) and confirm the scanned recurrence (idRec). Returns 200 when the cashout settles immediately (the authorization request is APPROVING); returns 202 when the cashout is still processing (the authorization request stays INITIATED until the settlement webhook drives it). The payer account is the authenticated X-Account-Id; the debit amount is taken from the referenced initiation and is never client-supplied. X-Idempotency is required.
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>"
}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
Body
Amount is the debit amount in BRL (format 0.00). Required. Format and positivity — and, for QR_CODE initiations, the QR fixed-amount match — are validated when the payment is processed.
"29.90"
64"RR0000000000000000001"
"550e8400-e29b-41d4-a716-446655440010"
Description is the optional transfer remittance (≤140 characters; no HTML). Content rules are enforced when the payment is processed.
"Payment for services"
"500.00"
Was this page helpful?

