Decodificar QR Code
curl --request POST \
--url https://gateway.astronpay.co/transaction/decode-qrcode \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--header 'api_secret: <api-key>' \
--data '
{
"emv": "<string>"
}
'import requests
url = "https://gateway.astronpay.co/transaction/decode-qrcode"
payload = { "emv": "<string>" }
headers = {
"api_key": "<api-key>",
"api_secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
api_key: '<api-key>',
api_secret: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({emv: '<string>'})
};
fetch('https://gateway.astronpay.co/transaction/decode-qrcode', 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://gateway.astronpay.co/transaction/decode-qrcode",
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([
'emv' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_key: <api-key>",
"api_secret: <api-key>"
],
]);
$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://gateway.astronpay.co/transaction/decode-qrcode"
payload := strings.NewReader("{\n \"emv\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("api_secret", "<api-key>")
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://gateway.astronpay.co/transaction/decode-qrcode")
.header("api_key", "<api-key>")
.header("api_secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"emv\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.astronpay.co/transaction/decode-qrcode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["api_secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emv\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"qrcode": {
"amount": 100,
"expiresAt": "2025-12-08T20:27:51.580Z",
"receiver": {
"name": "Blind Pay, Inc.",
"city": "Vila Velha",
"key": "f0f64d04-1e7d-4e4f-976f-48f4c7e0c225"
},
"txid": "d192067a12b2e43c38594b22af4128981",
"url": "brcode.starkinfra.com/v2/192067a12b2e43c38594b22af4128981"
}
}{
"status": "expired",
"message": "qrcode já expirado"
}Transações
Decode QR Code
Decodifica um QR Code EMV e retorna os dados se o QR estiver ativo
POST
/
transaction
/
decode-qrcode
Decodificar QR Code
curl --request POST \
--url https://gateway.astronpay.co/transaction/decode-qrcode \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--header 'api_secret: <api-key>' \
--data '
{
"emv": "<string>"
}
'import requests
url = "https://gateway.astronpay.co/transaction/decode-qrcode"
payload = { "emv": "<string>" }
headers = {
"api_key": "<api-key>",
"api_secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
api_key: '<api-key>',
api_secret: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({emv: '<string>'})
};
fetch('https://gateway.astronpay.co/transaction/decode-qrcode', 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://gateway.astronpay.co/transaction/decode-qrcode",
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([
'emv' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_key: <api-key>",
"api_secret: <api-key>"
],
]);
$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://gateway.astronpay.co/transaction/decode-qrcode"
payload := strings.NewReader("{\n \"emv\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("api_secret", "<api-key>")
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://gateway.astronpay.co/transaction/decode-qrcode")
.header("api_key", "<api-key>")
.header("api_secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"emv\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.astronpay.co/transaction/decode-qrcode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["api_secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emv\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"qrcode": {
"amount": 100,
"expiresAt": "2025-12-08T20:27:51.580Z",
"receiver": {
"name": "Blind Pay, Inc.",
"city": "Vila Velha",
"key": "f0f64d04-1e7d-4e4f-976f-48f4c7e0c225"
},
"txid": "d192067a12b2e43c38594b22af4128981",
"url": "brcode.starkinfra.com/v2/192067a12b2e43c38594b22af4128981"
}
}{
"status": "expired",
"message": "qrcode já expirado"
}Descrição
Decodifica um QR Code EMV e retorna os dados se o QR estiver ativo. Autenticação via ApiKey.Autenticação
api_keyno header
Corpo da requisição
{
"emv": "string do QR Code EMV"
}
Respostas
Sucesso (QR ativo)
{
"status": "success",
"qrcode": {
"amount": 100.0,
"expiresAt": "2025-12-08T20:27:51.580Z",
"receiver": {
"name": "Blind Pay, Inc.",
"city": "Vila Velha",
"key": "f0f64d04-1e7d-4e4f-976f-48f4c7e0c225"
},
"txid": "d192067a12b2e43c38594b22af4128981",
"url": "brcode.starkinfra.com/v2/192067a12b2e43c38594b22af4128981"
}
}
Expirado / inativo
{
"status": "expired",
"message": "qrcode já expirado"
}
⌘I
