Consultar Ordem Onchain
curl --request GET \
--url https://api.example.com/api/v1/onchain/order/{id}import requests
url = "https://api.example.com/api/v1/onchain/order/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/onchain/order/{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://api.example.com/api/v1/onchain/order/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/onchain/order/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/onchain/order/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/onchain/order/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"order": {
"network": "<string>",
"value": 123,
"cryptoValue": 123,
"address": "<string>",
"asset": "<string>",
"status": "<string>",
"metadata": {
"orderId": "<string>",
"tokenAddress": "<string>",
"network": "<string>",
"walletIndex": 123
},
"paymentLinkId": "<string>",
"createdAt": "<string>"
}
}Onchain
Consultar Ordem Onchain
Obtenha detalhes de uma ordem blockchain específica
GET
/
api
/
v1
/
onchain
/
order
/
{id}
Consultar Ordem Onchain
curl --request GET \
--url https://api.example.com/api/v1/onchain/order/{id}import requests
url = "https://api.example.com/api/v1/onchain/order/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/onchain/order/{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://api.example.com/api/v1/onchain/order/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/onchain/order/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/onchain/order/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/onchain/order/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"order": {
"network": "<string>",
"value": 123,
"cryptoValue": 123,
"address": "<string>",
"asset": "<string>",
"status": "<string>",
"metadata": {
"orderId": "<string>",
"tokenAddress": "<string>",
"network": "<string>",
"walletIndex": 123
},
"paymentLinkId": "<string>",
"createdAt": "<string>"
}
}Consultar detalhes da ordem
Este endpoint retorna informações detalhadas sobre uma ordem blockchain específica usando seu ID de link de pagamento.Parâmetros de caminho
Exemplo de requisição
curl -X GET "https://server.cryptouse.com.br/api/v1/onchain/order/0b664ca9-40a4-4692-80e7-f94392bbb4bf" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer seu_token_aqui"
Resposta
Show Propriedades
Show Propriedades
Status atual do pagamentoValores possíveis:
PENDING, COMPLETED, REFUNDED, PARTIAL_ORDER, FAILEDExemplo de resposta
{
"order": {
"network": "bsc",
"value": 100,
"cryptoValue": 0.179,
"address": "0xdC1bEaD90005669BbFc310624E3B22B2CeeE3D94",
"asset": "USDT",
"status": "PENDING",
"metadata": {
"orderId": "29fdcad5-836f-463f-b770-180bcd80da40",
"tokenAddress": "0x55d398326f99059ff775485246999027b3197955",
"network": "bsc",
"walletIndex": 1100429915
},
"paymentLinkId": "0b664ca9-40a4-4692-80e7-f94392bbb4bf",
"createdAt": "2025-07-30T17:30:54.387Z"
}
}
{
"success": false,
"error": "Order not found"
}
Redes e Assets Suportados
Redes Blockchain
| Rede | Descrição |
|---|---|
eth | Ethereum Mainnet |
bsc | Binance Smart Chain |
polygon | Polygon (Matic) |
Assets de Criptomoeda
| Asset | Descrição |
|---|---|
USDT | Tether USD |
USDC | USD Coin |
DAI | Dai Stablecoin |
BUSD | Binance USD |
Status da ordem
| Status | Descrição |
|---|---|
PENDING | A ordem foi criada mas ainda não recebeu pagamento |
COMPLETED | O pagamento foi recebido e confirmado |
REFUNDED | A ordem foi reembolsada |
PARTIAL_ORDER | Foi recebido um pagamento parcial |
FAILED | A ordem falhou por algum motivo |
Notas
- As ordens completadas não podem ser modificadas
- Ordens com status
PENDINGexpiram após 24 horas - Para ordens com status
PARTIAL_ORDER, verifique o campostatuspara determinar se há pagamentos parciais
