Lista ordens do merchant
curl --request GET \
--url https://api.astronpay.co/api/v1/orders \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://api.astronpay.co/api/v1/orders"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://api.astronpay.co/api/v1/orders', 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://api.astronpay.co/api/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-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://api.astronpay.co/api/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-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://api.astronpay.co/api/v1/orders")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronpay.co/api/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"receiverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chain": "solana",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"receiverName": "<string>",
"merchantName": "<string>",
"amountBrl": 1000,
"amountCrypto": 199.5,
"targetToken": "USDC",
"sourceToken": "USDC",
"destinationWallet": "4k5dSo1EnderecoSolana...",
"depositAddress": "7xMnSo2EnderecoDeposito...",
"paymentReference": "<string>",
"exchangeRate": 5.01,
"feePercentage": 2.5,
"netAmountBrl": 975,
"amountUsdc": 194.61,
"amountToken": 194.61,
"platformFeePercentage": 1.5,
"platformFeeAmountBrl": 15,
"merchantFeePercentage": 1,
"merchantFeeAmountBrl": 10,
"pixPaymentCode": "00020126...",
"pixKey": "<string>",
"recipientName": "<string>",
"failureReason": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"transactions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"status": "<string>",
"amount": 199.5,
"currency": "USDC",
"createdAt": "2023-11-07T05:31:56Z",
"chain": "solana",
"txHash": "<string>"
}
]
}
],
"total": 42,
"page": 1,
"limit": 20
}Orders
Lista ordens
GET
/
orders
Lista ordens do merchant
curl --request GET \
--url https://api.astronpay.co/api/v1/orders \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://api.astronpay.co/api/v1/orders"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://api.astronpay.co/api/v1/orders', 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://api.astronpay.co/api/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-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://api.astronpay.co/api/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-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://api.astronpay.co/api/v1/orders")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronpay.co/api/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"receiverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chain": "solana",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"receiverName": "<string>",
"merchantName": "<string>",
"amountBrl": 1000,
"amountCrypto": 199.5,
"targetToken": "USDC",
"sourceToken": "USDC",
"destinationWallet": "4k5dSo1EnderecoSolana...",
"depositAddress": "7xMnSo2EnderecoDeposito...",
"paymentReference": "<string>",
"exchangeRate": 5.01,
"feePercentage": 2.5,
"netAmountBrl": 975,
"amountUsdc": 194.61,
"amountToken": 194.61,
"platformFeePercentage": 1.5,
"platformFeeAmountBrl": 15,
"merchantFeePercentage": 1,
"merchantFeeAmountBrl": 10,
"pixPaymentCode": "00020126...",
"pixKey": "<string>",
"recipientName": "<string>",
"failureReason": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"transactions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"status": "<string>",
"amount": 199.5,
"currency": "USDC",
"createdAt": "2023-11-07T05:31:56Z",
"chain": "solana",
"txHash": "<string>"
}
]
}
],
"total": 42,
"page": 1,
"limit": 20
}Authorizations
apiKey & apiSecretbearerAuth
Query Parameters
Número de registros por página (máx 100).
Required range:
x <= 100Available options:
PAYIN, PAYOUT Available options:
PENDING, AWAITING_PAYMENT, PAYMENT_RECEIVED, SWAPPING, TRANSFERRING, AWAITING_DEPOSIT, DEPOSIT_RECEIVED, PIX_SENDING, PIX_SENT_UNCONFIRMED, COMPLETED, FAILED, EXPIRED, REFUNDING, REFUNDED ⌘I
