获取交易单详情
curl --request GET \
--url https://{api}.subotiz.com/api/v1/trades/{trade_id} \
--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/{trade_id}', 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/{trade_id}"
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/{trade_id}",
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/{trade_id}"
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/{trade_id}")
.header("Request-Id", "<request-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api}.subotiz.com/api/v1/trades/{trade_id}")
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": {
"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": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"country_code": "<string>",
"country": "<string>",
"province_code": "<string>",
"province": "<string>",
"area": "<string>",
"city": "<string>",
"address": "<string>",
"address1": "<string>",
"zip": "<string>",
"company": "<string>",
"phone_area_code": "<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>"
}
}
}交易单
获取交易单详情
交易单详情
GET
/
api
/
v1
/
trades
/
{trade_id}
获取交易单详情
curl --request GET \
--url https://{api}.subotiz.com/api/v1/trades/{trade_id} \
--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/{trade_id}', 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/{trade_id}"
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/{trade_id}",
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/{trade_id}"
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/{trade_id}")
.header("Request-Id", "<request-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api}.subotiz.com/api/v1/trades/{trade_id}")
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": {
"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": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"country_code": "<string>",
"country": "<string>",
"province_code": "<string>",
"province": "<string>",
"area": "<string>",
"city": "<string>",
"address": "<string>",
"address1": "<string>",
"zip": "<string>",
"company": "<string>",
"phone_area_code": "<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>"
}
}
}交易单详情
授权
Bearer API Key 鉴权。格式:Authorization: Bearer {your_api_key}
请求头
请求的唯一标识符
路径参数
交易单ID
此页面对您有帮助吗?
⌘I