Webhooks
Webhook 日志
查看最近的 Webhook 投递记录
GET
/
v1
/
webhooks
/
logs
Webhook 日志
curl --request GET \
--url https://api.tronrental.com/v1/webhooks/logsimport requests
url = "https://api.tronrental.com/v1/webhooks/logs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.tronrental.com/v1/webhooks/logs', 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.tronrental.com/v1/webhooks/logs",
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.tronrental.com/v1/webhooks/logs"
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.tronrental.com/v1/webhooks/logs")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tronrental.com/v1/webhooks/logs")
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{
"id": 123,
"event_type": "<string>",
"payload": {},
"response_status": 123,
"attempts": 123,
"created_at": "<string>"
}Webhook 日志
最近的投递尝试,最新的排在最前——我们发送了什么,您的服务器回应了什么。 记录保留 30 天。查询参数
响应
记录数组。示例
curl https://api.tronrental.com/v1/webhooks/logs \
-H "X-API-Key: your_api_key"
Response
[
{
"id": 105,
"event_type": "order.updated",
"payload": {
"event": "order.updated",
"data": {
"id": 247033,
"type": "energy",
"status": "filled",
"source": "api",
"target_address": "TXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"volume": 65000,
"expected_volume": 65000,
"delivered_volume": 65000,
"price_trx": "2.75",
"delegate_txid": "a1b2c3d4e5f6...",
"undelegate_txid": null,
"reclaim_at": "2026-09-15T07:44:56+00:00",
"fail_reason": null,
"refunded_trx": null
},
"timestamp": "2026-09-14T14:51:16.986341+00:00"
},
"response_status": 200,
"attempts": 1,
"created_at": "2026-09-14T14:51:16.986341Z"
}
]
日志列出发送到您账户的每一次投递——所有事件,包括
subscription.transfer 和 package.*。在用它排查之前,有一点需要知道:无法解析的 URL,或解析到私有地址的 URL,完全不会产生记录——空日志无法区分「没有事件」和「地址被拒绝」。如果您预期有流量却什么也看不到,请到 Dashboard → API 检查 URL。⌘I
Webhook 日志
curl --request GET \
--url https://api.tronrental.com/v1/webhooks/logsimport requests
url = "https://api.tronrental.com/v1/webhooks/logs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.tronrental.com/v1/webhooks/logs', 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.tronrental.com/v1/webhooks/logs",
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.tronrental.com/v1/webhooks/logs"
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.tronrental.com/v1/webhooks/logs")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tronrental.com/v1/webhooks/logs")
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{
"id": 123,
"event_type": "<string>",
"payload": {},
"response_status": 123,
"attempts": 123,
"created_at": "<string>"
}