Pular para o conteúdo principal
POST
/
v1
/
qrcodes
/
static
Criar QR code estatico
curl --request POST \
  --url https://plugin-pix-direct.api.lerian.net/v1/qrcodes/static \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "12345678901",
  "amount": 100,
  "recipientName": "João da Silva",
  "accountId": "019c96a0-0a98-7287-9a31-786e0809c769",
  "txId": "TXN123456789",
  "description": "Payment for services"
}
'
import requests

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

payload = {
"key": "12345678901",
"amount": 100,
"recipientName": "João da Silva",
"accountId": "019c96a0-0a98-7287-9a31-786e0809c769",
"txId": "TXN123456789",
"description": "Payment for services"
}
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({
key: '12345678901',
amount: 100,
recipientName: 'João da Silva',
accountId: '019c96a0-0a98-7287-9a31-786e0809c769',
txId: 'TXN123456789',
description: 'Payment for services'
})
};

fetch('https://plugin-pix-direct.api.lerian.net/v1/qrcodes/static', 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/static",
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([
'key' => '12345678901',
'amount' => 100,
'recipientName' => 'João da Silva',
'accountId' => '019c96a0-0a98-7287-9a31-786e0809c769',
'txId' => 'TXN123456789',
'description' => 'Payment for services'
]),
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/static"

payload := strings.NewReader("{\n \"key\": \"12345678901\",\n \"amount\": 100,\n \"recipientName\": \"João da Silva\",\n \"accountId\": \"019c96a0-0a98-7287-9a31-786e0809c769\",\n \"txId\": \"TXN123456789\",\n \"description\": \"Payment for services\"\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/static")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"12345678901\",\n \"amount\": 100,\n \"recipientName\": \"João da Silva\",\n \"accountId\": \"019c96a0-0a98-7287-9a31-786e0809c769\",\n \"txId\": \"TXN123456789\",\n \"description\": \"Payment for services\"\n}")
.asString();
require 'uri'
require 'net/http'

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

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 \"key\": \"12345678901\",\n \"amount\": 100,\n \"recipientName\": \"João da Silva\",\n \"accountId\": \"019c96a0-0a98-7287-9a31-786e0809c769\",\n \"txId\": \"TXN123456789\",\n \"description\": \"Payment for services\"\n}"

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

Autorizações

Authorization
string
header
obrigatório

Autenticacao por token JWT Bearer. Obtenha o token no endpoint /v1/login/oauth/access_token usando credenciais do cliente (clientId e clientSecret).

Inclua o token no header Authorization: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

O token expira apos 3600 segundos (1 hora).

Corpo

application/json
key
string
obrigatório

Chave PIX do destinatario.

Exemplo:

"12345678901"

amount
number<double>
obrigatório

Valor fixo para o QR code estatico.

Exemplo:

100

recipientName
string
obrigatório

Nome do destinatario (beneficiario).

Exemplo:

"João da Silva"

accountId
string<uuid>
obrigatório

Identificador da conta do destinatario.

Exemplo:

"019c96a0-0a98-7287-9a31-786e0809c769"

txId
string
obrigatório

Identificador unico da transacao (endToEndId).

Exemplo:

"TXN123456789"

description
string
obrigatório

Descricao do pagamento.

Exemplo:

"Payment for services"

Resposta

QR code estatico criado com sucesso

qrCode
string
obrigatório

String do QR code PIX gerado.

Exemplo:

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