Saltar al contenido principal
GET
/
api
/
v1
/
brcode
/
{id}
Obtener payload de BR Code
curl --request GET \
  --url https://spi.sandbox.lerian.net/api/v1/brcode/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://spi.sandbox.lerian.net/api/v1/brcode/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://spi.sandbox.lerian.net/api/v1/brcode/{id}', 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://spi.sandbox.lerian.net/api/v1/brcode/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://spi.sandbox.lerian.net/api/v1/brcode/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://spi.sandbox.lerian.net/api/v1/brcode/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spi.sandbox.lerian.net/api/v1/brcode/{id}")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "createdAt": "<string>",
  "id": "<string>",
  "kind": "<string>",
  "merchantCity": "<string>",
  "merchantName": "<string>",
  "pixKey": "<string>",
  "status": "<string>",
  "updatedAt": "<string>",
  "amount": "<string>",
  "copyPaste": "<string>",
  "payloadUrl": "<string>",
  "qrPngBase64": "<string>",
  "qrPngContentType": "<string>",
  "raw": "<string>",
  "txId": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Parámetros de ruta

id
string
requerido

Payload UUID

Respuesta

OK

createdAt
string
requerido

Creation timestamp in RFC3339 UTC.

Ejemplo:

"2025-03-07T14:30:00Z"

id
string
requerido

Server-assigned payload identifier (UUID).

Ejemplo:

"550e8400-e29b-41d4-a716-446655440000"

kind
string
requerido

BR Code kind: STATIC (reusable) or DYNAMIC (single-use).

Ejemplo:

"STATIC"

merchantCity
string
requerido

Merchant city from the EMV payload (EMV field 60).

Ejemplo:

"São Paulo"

merchantName
string
requerido

Merchant legal/trade name from the EMV payload (EMV field 59).

Ejemplo:

"Lerian Studio"

pixKey
string
requerido

Pix key identifying the receiver (CPF/CNPJ, phone, email, or random EVP key).

Ejemplo:

"12345678901"

status
string
requerido

Lifecycle status of the payload (e.g. ACTIVE).

Ejemplo:

"ACTIVE"

updatedAt
string
requerido

Last-update timestamp in RFC3339 UTC.

Ejemplo:

"2025-03-07T14:30:00Z"

amount
string

Transaction amount in BRL as a decimal string, scale 2 (empty when the amount is open).

Ejemplo:

"100.00"

copyPaste
string

Pix copy-and-paste string (the raw EMV payload); empty when unavailable.

Ejemplo:

"00020126580014br.gov.bcb.pix..."

payloadUrl
string

Resolvable payload location URL for dynamic codes (empty for static codes).

Ejemplo:

"https://pix.example.com/qr/v2/550e8400"

qrPngBase64
string

QR code image rendered from the raw payload, base64-encoded PNG (only populated on generation responses).

Ejemplo:

"iVBORw0KGgoAAAANSUhEUgAA..."

qrPngContentType
string

MIME content type of qrPngBase64 (image/png) when an image is present.

Ejemplo:

"image/png"

raw
string

Raw EMV BR Code string; same value as copyPaste, retained for compatibility.

Ejemplo:

"00020126580014br.gov.bcb.pix..."

txId
string

Merchant transaction identifier (EMV field 62.05); empty when not present.

Ejemplo:

"txid-abc-123"