Consultar Transação
curl --request GET \
--url https://gateway.astronpay.co/transaction/v2/{transactionId}/find \
--header 'api_key: <api-key>' \
--header 'api_secret: <api-key>'import requests
url = "https://gateway.astronpay.co/transaction/v2/{transactionId}/find"
headers = {
"api_key": "<api-key>",
"api_secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>', api_secret: '<api-key>'}};
fetch('https://gateway.astronpay.co/transaction/v2/{transactionId}/find', 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/v2/{transactionId}/find",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://gateway.astronpay.co/transaction/v2/{transactionId}/find"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("api_secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway.astronpay.co/transaction/v2/{transactionId}/find")
.header("api_key", "<api-key>")
.header("api_secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.astronpay.co/transaction/v2/{transactionId}/find")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
request["api_secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"transaction": {
"transaction_id": "001d9bf0-d736-4882-8ed0-e332bb118009",
"external_id": "G50403083329447uMFsSb",
"status": "PROCESSED",
"typeTransaction": "OUT",
"total": "579.06",
"created_at": "2025-04-03T11:33:31.104Z",
"updated_at": "2025-04-03T11:33:36.244Z",
"e2e_id": "E05491616202504031133322540c3ea4",
"error_message": "<string>",
"payment_code": "00020101021226820014br.gov.bcb.pix2560qrcode.pagsm.com.br/pix/44c5e891-9afc-4c7f-9954-5fbdc69600eb5204000053039865802BR59043XIP6013BELOHORIZONTE61083401102162070503***63047DE4",
"payer": {
"name": "3X INSTITUICAO DE PAGAMENTO LTDA",
"document": "36.010.822/0001-09",
"bankCode": "400",
"bankName": "COOP CREDITAG",
"bankIspb": "5491616"
},
"receiver": {
"name": "GABRIEL DIBACHTI INACIO DA SILVA",
"document": "022.***.***-40",
"bankCode": "077",
"bankName": "BANCO INTER",
"bankIspb": "00416968"
}
}
}Transações
Buscar Transação
Consulta os detalhes de uma transação específica
GET
/
transaction
/
v2
/
{transactionId}
/
find
Consultar Transação
curl --request GET \
--url https://gateway.astronpay.co/transaction/v2/{transactionId}/find \
--header 'api_key: <api-key>' \
--header 'api_secret: <api-key>'import requests
url = "https://gateway.astronpay.co/transaction/v2/{transactionId}/find"
headers = {
"api_key": "<api-key>",
"api_secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>', api_secret: '<api-key>'}};
fetch('https://gateway.astronpay.co/transaction/v2/{transactionId}/find', 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/v2/{transactionId}/find",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://gateway.astronpay.co/transaction/v2/{transactionId}/find"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("api_secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway.astronpay.co/transaction/v2/{transactionId}/find")
.header("api_key", "<api-key>")
.header("api_secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.astronpay.co/transaction/v2/{transactionId}/find")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
request["api_secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"transaction": {
"transaction_id": "001d9bf0-d736-4882-8ed0-e332bb118009",
"external_id": "G50403083329447uMFsSb",
"status": "PROCESSED",
"typeTransaction": "OUT",
"total": "579.06",
"created_at": "2025-04-03T11:33:31.104Z",
"updated_at": "2025-04-03T11:33:36.244Z",
"e2e_id": "E05491616202504031133322540c3ea4",
"error_message": "<string>",
"payment_code": "00020101021226820014br.gov.bcb.pix2560qrcode.pagsm.com.br/pix/44c5e891-9afc-4c7f-9954-5fbdc69600eb5204000053039865802BR59043XIP6013BELOHORIZONTE61083401102162070503***63047DE4",
"payer": {
"name": "3X INSTITUICAO DE PAGAMENTO LTDA",
"document": "36.010.822/0001-09",
"bankCode": "400",
"bankName": "COOP CREDITAG",
"bankIspb": "5491616"
},
"receiver": {
"name": "GABRIEL DIBACHTI INACIO DA SILVA",
"document": "022.***.***-40",
"bankCode": "077",
"bankName": "BANCO INTER",
"bankIspb": "00416968"
}
}
}⌘I
