跳转到主要内容
GET
/
api
/
v1
/
invoices
/
{invoice_id}
获取账单
curl --request GET \
  --url https://api.example.com/api/v1/invoices/{invoice_id}

获取账单

返回账单的详情和当前状态。

路径参数

invoice_id
number
必填
账单 ID

响应

返回完整的账单对象,包括 statuspayment_addressprice_trxprice_usdttx_hash 和时间戳。

账单状态

状态描述
pending等待付款
paid已收到付款,委托进行中
delegated能量委托成功
expired过期前未收到付款
failed委托失败(付款已退回)

示例

curl https://api.tronrental.com/v1/invoices/12345 \
  -H "X-API-Key: your_api_key"
Response
{
  "invoice_id": 12345,
  "payment_address": "TPaymentAddress...",
  "address": "TRecipientAddress...",
  "energy_amount": 65000,
  "duration_hours": 1,
  "price_trx": "2.75",
  "price_usdt": "0.64",
  "status": "delegated",
  "tx_hash": "a1b2c3d4e5f6...",
  "paid_at": "2026-03-05T12:05:00Z",
  "delegated_at": "2026-03-05T12:05:30Z",
  "expires_at": "2026-03-05T12:30:00Z",
  "created_at": "2026-03-05T12:00:00Z"
}