Skip to main content
POST
/
v1
/
qrcodes
/
dynamic
Create dynamic QR code
curl --request POST \
  --url https://plugin-pix-direct.api.lerian.net/v1/qrcodes/dynamic \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "IMMEDIATE",
  "key": "12345678901",
  "amount": 50,
  "recipientName": "João da Silva",
  "payer": {
    "document": "98765432100",
    "validate": true,
    "name": "Maria Santos"
  },
  "dueDate": "2024-12-31",
  "expirationTime": 3600,
  "city": "São Paulo",
  "zipCode": "01234567",
  "recipientConciliationId": "CONC123456789",
  "partnerId": "019c96a0-0c0c-7221-8cf3-13313fb60081",
  "description": [
    {
      "name": "Invoice",
      "value": "INV-001"
    }
  ]
}
'
import requests

url = "https://plugin-pix-direct.api.lerian.net/v1/qrcodes/dynamic"

payload = {
"type": "IMMEDIATE",
"key": "12345678901",
"amount": 50,
"recipientName": "João da Silva",
"payer": {
"document": "98765432100",
"validate": True,
"name": "Maria Santos"
},
"dueDate": "2024-12-31",
"expirationTime": 3600,
"city": "São Paulo",
"zipCode": "01234567",
"recipientConciliationId": "CONC123456789",
"partnerId": "019c96a0-0c0c-7221-8cf3-13313fb60081",
"description": [
{
"name": "Invoice",
"value": "INV-001"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'IMMEDIATE',
key: '12345678901',
amount: 50,
recipientName: 'João da Silva',
payer: {document: '98765432100', validate: true, name: 'Maria Santos'},
dueDate: '2024-12-31',
expirationTime: 3600,
city: 'São Paulo',
zipCode: '01234567',
recipientConciliationId: 'CONC123456789',
partnerId: '019c96a0-0c0c-7221-8cf3-13313fb60081',
description: [{name: 'Invoice', value: 'INV-001'}]
})
};

fetch('https://plugin-pix-direct.api.lerian.net/v1/qrcodes/dynamic', 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-direct.api.lerian.net/v1/qrcodes/dynamic",
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([
'type' => 'IMMEDIATE',
'key' => '12345678901',
'amount' => 50,
'recipientName' => 'João da Silva',
'payer' => [
'document' => '98765432100',
'validate' => true,
'name' => 'Maria Santos'
],
'dueDate' => '2024-12-31',
'expirationTime' => 3600,
'city' => 'São Paulo',
'zipCode' => '01234567',
'recipientConciliationId' => 'CONC123456789',
'partnerId' => '019c96a0-0c0c-7221-8cf3-13313fb60081',
'description' => [
[
'name' => 'Invoice',
'value' => 'INV-001'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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-direct.api.lerian.net/v1/qrcodes/dynamic"

payload := strings.NewReader("{\n \"type\": \"IMMEDIATE\",\n \"key\": \"12345678901\",\n \"amount\": 50,\n \"recipientName\": \"João da Silva\",\n \"payer\": {\n \"document\": \"98765432100\",\n \"validate\": true,\n \"name\": \"Maria Santos\"\n },\n \"dueDate\": \"2024-12-31\",\n \"expirationTime\": 3600,\n \"city\": \"São Paulo\",\n \"zipCode\": \"01234567\",\n \"recipientConciliationId\": \"CONC123456789\",\n \"partnerId\": \"019c96a0-0c0c-7221-8cf3-13313fb60081\",\n \"description\": [\n {\n \"name\": \"Invoice\",\n \"value\": \"INV-001\"\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

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-direct.api.lerian.net/v1/qrcodes/dynamic")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"IMMEDIATE\",\n \"key\": \"12345678901\",\n \"amount\": 50,\n \"recipientName\": \"João da Silva\",\n \"payer\": {\n \"document\": \"98765432100\",\n \"validate\": true,\n \"name\": \"Maria Santos\"\n },\n \"dueDate\": \"2024-12-31\",\n \"expirationTime\": 3600,\n \"city\": \"São Paulo\",\n \"zipCode\": \"01234567\",\n \"recipientConciliationId\": \"CONC123456789\",\n \"partnerId\": \"019c96a0-0c0c-7221-8cf3-13313fb60081\",\n \"description\": [\n {\n \"name\": \"Invoice\",\n \"value\": \"INV-001\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://plugin-pix-direct.api.lerian.net/v1/qrcodes/dynamic")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"IMMEDIATE\",\n \"key\": \"12345678901\",\n \"amount\": 50,\n \"recipientName\": \"João da Silva\",\n \"payer\": {\n \"document\": \"98765432100\",\n \"validate\": true,\n \"name\": \"Maria Santos\"\n },\n \"dueDate\": \"2024-12-31\",\n \"expirationTime\": 3600,\n \"city\": \"São Paulo\",\n \"zipCode\": \"01234567\",\n \"recipientConciliationId\": \"CONC123456789\",\n \"partnerId\": \"019c96a0-0c0c-7221-8cf3-13313fb60081\",\n \"description\": [\n {\n \"name\": \"Invoice\",\n \"value\": \"INV-001\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "qrCode": "00020101021226850014br.gov.bcb.pix2563qrcode.example.com.br/v2/cobv/9d36b84fc70b478fb95c12729b90ca255204000053039865802BR5913Merchant Name6009Sao Paulo62070503***63042C43"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Obtain token from /v1/login/oauth/access_token endpoint using client credentials (clientId and clientSecret).

Include token in Authorization header: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Token expires after 3600 seconds (1 hour).

Body

application/json
type
enum<string>
required

Specifies the QR Code type. For IMMEDIATE, this indicates a single-use QR Code generated for instant Pix payments with a predefined amount and expiration time.

Available options:
IMMEDIATE
Example:

"IMMEDIATE"

key
string
required

Pix key of the recipient.

Example:

"12345678901"

amount
number<double>
required

Amount for the dynamic QR code.

Example:

50

recipientName
string
required

Name of the recipient (payee).

Example:

"João da Silva"

payer
object
required

Payer information.

dueDate
string<date>
required

Due date for the payment (YYYY-MM-DD).

Example:

"2024-12-31"

expirationTime
integer
required

Expiration time in seconds after which the QR code becomes invalid.

Example:

3600

city
string
required

City of the recipient.

Example:

"São Paulo"

zipCode
string
required

ZIP code of the recipient (8 digits).

Example:

"01234567"

recipientConciliationId
string
required

Identifier for conciliation by the recipient.

Example:

"CONC123456789"

partnerId
string<uuid>
required

Identifier for the partner system.

Example:

"019c96a0-0c0c-7221-8cf3-13313fb60081"

description
object[]
required

List of descriptions for the payment.

Response

Dynamic QR code created successfully

qrCode
string
required

Generated Pix QR code string.

Example:

"00020101021226850014br.gov.bcb.pix2563qrcode.example.com.br/v2/cobv/9d36b84fc70b478fb95c12729b90ca255204000053039865802BR5913Merchant Name6009Sao Paulo62070503***63042C43"