curl --request GET \
--url https://{api}.subotiz.com/api/v1/trades \
--header 'Authorization: Bearer <token>' \
--header 'Request-Id: <request-id>'const options = {
method: 'GET',
headers: {'Request-Id': '<request-id>', Authorization: 'Bearer <token>'}
};
fetch('https://{api}.subotiz.com/api/v1/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{api}.subotiz.com/api/v1/trades"
headers = {
"Request-Id": "<request-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api}.subotiz.com/api/v1/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Request-Id: <request-id>"
],
]);
$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}.subotiz.com/api/v1/trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Request-Id", "<request-id>")
req.Header.Add("Authorization", "Bearer <token>")
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}.subotiz.com/api/v1/trades")
.header("Request-Id", "<request-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api}.subotiz.com/api/v1/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Request-Id"] = '<request-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"message": "<string>",
"data": {
"has_more": true,
"list": [
{
"trade_id": "<string>",
"access_no": "<string>",
"merchant_id": "<string>",
"amount": "<string>",
"currency": "<string>",
"customer_id": "<string>",
"callback_url": "<string>",
"metadata": {},
"last_payment_error": {
"code": "<string>",
"message": "<string>"
},
"next_action": {
"type": "<string>",
"redirect": {
"url": "<string>"
},
"client": {
"confirm_url": "<string>",
"apple_pay_session": "<string>"
}
},
"order_id": "<string>",
"last_trans_id": "<string>",
"paid_at": "<string>",
"payment_mode": "<string>",
"payment_token": "<string>",
"payment_method": "<string>",
"payment_channel": "<string>",
"return_url": "<string>",
"trade_status": "<string>",
"txn_time": "<string>",
"created_at": "<string>",
"refund_status": "<string>",
"total_refunded_amount": "<string>",
"session_id": "<string>",
"session_url": "<string>",
"refer_info": {
"country_code": "<string>",
"ip": "<string>",
"device": "<string>",
"user_agent": "<string>"
},
"order_type": "<string>",
"line_items": [
{
"id": "<string>",
"title": "<string>",
"price": "<string>",
"price_id": "<string>",
"quantity": "<string>",
"sku": "<string>",
"vendor": "<string>",
"cycle_unit": "<string>"
}
],
"discounts": {
"current_period": [
{
"discount_id": "<string>",
"discount_amount": "<string>",
"discount_code": "<string>"
}
]
},
"closed_at": "<string>",
"closed_reason": "<string>",
"first_source_channel": "<string>",
"last_source_channel": "<string>",
"billing_address": {
"name": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"country_code": "<string>",
"province_code": "<string>",
"city": "<string>",
"area": "<string>",
"postal_code": "<string>",
"phone": "<string>",
"phone_area_code": "<string>",
"email": "<string>"
},
"tax_amount": "<string>",
"payment_info": {
"verification": {
"cvc_check": "<string>",
"avs": {
"line1_check": "<string>",
"postal_code_check": "<string>"
},
"three_d_secure": {
"authentication_flow": "<string>",
"result": "<string>",
"result_reason": "<string>",
"version": "<string>",
"eci": "<string>"
}
},
"authcode": "<string>",
"network_transaction_id": "<string>"
}
}
]
}
}{
"code": "invalid_request_error",
"message": "ending_before and starting_after cannot be set at the same time."
}List Trades
List Trades
curl --request GET \
--url https://{api}.subotiz.com/api/v1/trades \
--header 'Authorization: Bearer <token>' \
--header 'Request-Id: <request-id>'const options = {
method: 'GET',
headers: {'Request-Id': '<request-id>', Authorization: 'Bearer <token>'}
};
fetch('https://{api}.subotiz.com/api/v1/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{api}.subotiz.com/api/v1/trades"
headers = {
"Request-Id": "<request-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api}.subotiz.com/api/v1/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Request-Id: <request-id>"
],
]);
$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}.subotiz.com/api/v1/trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Request-Id", "<request-id>")
req.Header.Add("Authorization", "Bearer <token>")
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}.subotiz.com/api/v1/trades")
.header("Request-Id", "<request-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api}.subotiz.com/api/v1/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Request-Id"] = '<request-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"message": "<string>",
"data": {
"has_more": true,
"list": [
{
"trade_id": "<string>",
"access_no": "<string>",
"merchant_id": "<string>",
"amount": "<string>",
"currency": "<string>",
"customer_id": "<string>",
"callback_url": "<string>",
"metadata": {},
"last_payment_error": {
"code": "<string>",
"message": "<string>"
},
"next_action": {
"type": "<string>",
"redirect": {
"url": "<string>"
},
"client": {
"confirm_url": "<string>",
"apple_pay_session": "<string>"
}
},
"order_id": "<string>",
"last_trans_id": "<string>",
"paid_at": "<string>",
"payment_mode": "<string>",
"payment_token": "<string>",
"payment_method": "<string>",
"payment_channel": "<string>",
"return_url": "<string>",
"trade_status": "<string>",
"txn_time": "<string>",
"created_at": "<string>",
"refund_status": "<string>",
"total_refunded_amount": "<string>",
"session_id": "<string>",
"session_url": "<string>",
"refer_info": {
"country_code": "<string>",
"ip": "<string>",
"device": "<string>",
"user_agent": "<string>"
},
"order_type": "<string>",
"line_items": [
{
"id": "<string>",
"title": "<string>",
"price": "<string>",
"price_id": "<string>",
"quantity": "<string>",
"sku": "<string>",
"vendor": "<string>",
"cycle_unit": "<string>"
}
],
"discounts": {
"current_period": [
{
"discount_id": "<string>",
"discount_amount": "<string>",
"discount_code": "<string>"
}
]
},
"closed_at": "<string>",
"closed_reason": "<string>",
"first_source_channel": "<string>",
"last_source_channel": "<string>",
"billing_address": {
"name": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"country_code": "<string>",
"province_code": "<string>",
"city": "<string>",
"area": "<string>",
"postal_code": "<string>",
"phone": "<string>",
"phone_area_code": "<string>",
"email": "<string>"
},
"tax_amount": "<string>",
"payment_info": {
"verification": {
"cvc_check": "<string>",
"avs": {
"line1_check": "<string>",
"postal_code_check": "<string>"
},
"three_d_secure": {
"authentication_flow": "<string>",
"result": "<string>",
"result_reason": "<string>",
"version": "<string>",
"eci": "<string>"
}
},
"authcode": "<string>",
"network_transaction_id": "<string>"
}
}
]
}
}{
"code": "invalid_request_error",
"message": "ending_before and starting_after cannot be set at the same time."
}Authorizations
Bearer API Key authentication. Format: Authorization: Bearer {your_api_key}
Headers
The unique identifier of the request
Query Parameters
Trade ID array, filter trades whose IDs belong to this array
Payment status:
- requires_payment_method: Initial state
- processing: Payment processing
- succeeded: Payment successful
Cursor for pagination. starting_after is the object ID that defines your position in the list. For example, if you want to get the next page, you can use the last object's ID as the parameter value after getting the object list for the first time. Cannot be used together with ending_before
Cursor for pagination. ending_before is the object ID that defines your position in the list. For example, if you want to get the previous page, you can use the first object's ID as the parameter value after getting the object list for the first time. Cannot be used together with starting_after
Pagination parameter, number of items per page, default: 10, interface defaults to sorting by creation time in descending order. Limit: [1, 100]
Third-party order numbers
Minimum value to filter by (exclusive, UTC time in RFC3339 format, such as '2025-01-01T00:00:00Z')
Minimum value to filter by (inclusive, UTC time in RFC3339 format, such as '2025-01-01T00:00:00Z')
Maximum value to filter by (exclusive, UTC time in RFC3339 format, such as '2025-01-01T00:00:00Z')
Maximum value to filter by (inclusive, UTC time in RFC3339 format, such as '2025-01-01T00:00:00Z')
Only return Trade for the customer that this customer ID specifies.
Was this page helpful?