Validate BR Code
curl --request POST \
--url https://spi.sandbox.lerian.net/api/v1/brcode/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"raw": "00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://spi.sandbox.lerian.net/api/v1/brcode/validate"
payload := strings.NewReader("{\n \"raw\": \"00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD\"\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
raw: '00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD'
})
};
fetch('https://spi.sandbox.lerian.net/api/v1/brcode/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://spi.sandbox.lerian.net/api/v1/brcode/validate"
payload = { "raw": "00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"valid": true,
"code": "BRC-EMV-0009",
"message": "CRC checksum does not match payload"
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Validate BR Code
Validates a raw BR Code payload and returns stable EMV validation codes.
POST
/
api
/
v1
/
brcode
/
validate
Validate BR Code
curl --request POST \
--url https://spi.sandbox.lerian.net/api/v1/brcode/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"raw": "00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://spi.sandbox.lerian.net/api/v1/brcode/validate"
payload := strings.NewReader("{\n \"raw\": \"00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD\"\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))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
raw: '00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD'
})
};
fetch('https://spi.sandbox.lerian.net/api/v1/brcode/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://spi.sandbox.lerian.net/api/v1/brcode/validate"
payload = { "raw": "00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"valid": true,
"code": "BRC-EMV-0009",
"message": "CRC checksum does not match payload"
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"correlationId": "req-7a3f9c2e",
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
JWT bearer token issued by the identity provider.
Body
application/json
Raw EMV BR Code copy-paste string to validate without returning decoded data. Same Lerian-own 512-character accept ceiling as the decode surface.
Required string length:
1 - 512Example:
"00020126580014br.gov.bcb.pix0136550e8400-e29b-41d4-a716-44665544000052040000530398654041.005802BR5913Lerian Studio6009Sao Paulo62070503***6304ABCD"
Response
OK
True when the raw payload passed EMV structural and CRC validation; false otherwise.
Example:
true
EMV validation error code when invalid (empty when valid).
Example:
"BRC-EMV-0009"
Human-readable validation failure reason when invalid (empty when valid).
Example:
"CRC checksum does not match payload"
Was this page helpful?

