Get order status by Gateway ID
curl --request GET \
--url https://api.paycrest.io/v2/orders/{chain_id}/{id}import requests
url = "https://api.paycrest.io/v2/orders/{chain_id}/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.paycrest.io/v2/orders/{chain_id}/{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.paycrest.io/v2/orders/{chain_id}/{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.paycrest.io/v2/orders/{chain_id}/{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.paycrest.io/v2/orders/{chain_id}/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paycrest.io/v2/orders/{chain_id}/{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{
"status": "success",
"message": "Operation successful",
"data": {
"orderId": "<string>",
"amount": "<string>",
"amountInUsd": "<string>",
"token": "<string>",
"settlePercent": "<string>",
"status": "<string>",
"txHash": "<string>",
"settlements": [
{
"splitOrderId": "<string>",
"amount": "<string>",
"rate": "<string>",
"orderPercent": "<string>"
}
],
"txReceipts": [
{
"status": "<string>",
"txHash": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"updatedAt": "2023-11-07T05:31:56Z"
}
}General
Get Order Status by Gateway ID
Retrieve the status of an order by its onchain Gateway ID and chain ID. Use this for smart contract integrations.
GET
/
orders
/
{chain_id}
/
{id}
Get order status by Gateway ID
curl --request GET \
--url https://api.paycrest.io/v2/orders/{chain_id}/{id}import requests
url = "https://api.paycrest.io/v2/orders/{chain_id}/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.paycrest.io/v2/orders/{chain_id}/{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.paycrest.io/v2/orders/{chain_id}/{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.paycrest.io/v2/orders/{chain_id}/{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.paycrest.io/v2/orders/{chain_id}/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paycrest.io/v2/orders/{chain_id}/{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{
"status": "success",
"message": "Operation successful",
"data": {
"orderId": "<string>",
"amount": "<string>",
"amountInUsd": "<string>",
"token": "<string>",
"settlePercent": "<string>",
"status": "<string>",
"txHash": "<string>",
"settlements": [
{
"splitOrderId": "<string>",
"amount": "<string>",
"rate": "<string>",
"orderPercent": "<string>"
}
],
"txReceipts": [
{
"status": "<string>",
"txHash": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"updatedAt": "2023-11-07T05:31:56Z"
}
}Retrieve the status of an order by its onchain Gateway ID and chain ID. Use this for smart contract integrations where you have the Gateway order ID from the blockchain rather than the API order UUID.
⌘I