> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tronrental.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取账单

> 通过 ID 获取账单详情

## 获取账单

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

### 路径参数

<ParamField path="invoice_id" type="number" required>
  账单 ID
</ParamField>

### 响应

返回完整的账单对象，包括 `status`、`payment_address`、`price_trx`、`price_usdt`、`tx_hash` 和时间戳。

### 账单状态

| 状态          | 描述          |
| ----------- | ----------- |
| `pending`   | 等待付款        |
| `paid`      | 已收到付款，委托进行中 |
| `delegated` | 能量委托成功      |
| `expired`   | 过期前未收到付款    |
| `failed`    | 委托失败（付款已退回） |

### 示例

```bash theme={null}
curl https://api.tronrental.com/v1/invoices/12345 \
  -H "X-API-Key: your_api_key"
```

```json Response theme={null}
{
  "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"
}
```
