Skip to main content
POST
/
api
/
v1
/
invoices
Create Invoice
curl --request POST \
  --url https://api.example.com/api/v1/invoices \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "<string>",
  "energy_amount": 123,
  "transfer_count": 123,
  "duration_hours": 123
}
'
{
  "invoice_id": 123,
  "payment_address": "<string>",
  "price_trx": "<string>",
  "price_usdt": "<string>",
  "status": "<string>",
  "expires_at": "<string>"
}

Create Invoice

Creates a payment invoice that generates a unique deposit address. When payment (TRX or USDT) is received, energy is automatically delegated to the target address. Useful for integrations where end-users pay directly — no account balance needed.

Request body

address
string
required
Target TRON address to receive energy
energy_amount
number
Energy amount (32,000 – 5,000,000). Use this OR transfer_count.
transfer_count
number
Number of USDT transfers (1 – 100). Each transfer = 65,000 energy.
duration_hours
number
required
Rental duration (1 or 24 hours)

Response

invoice_id
number
Unique invoice identifier
payment_address
string
Unique deposit address — send TRX or USDT here
price_trx
string
Price in TRX
price_usdt
string
Price in USDT
status
string
Invoice status: pending, paid, delegated, expired, failed
expires_at
string
ISO 8601 expiration timestamp

Example

curl -X POST https://api.tronrental.com/v1/invoices \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "TRecipientAddress...",
    "transfer_count": 1,
    "duration_hours": 1
  }'
Response
{
  "invoice_id": 789,
  "payment_address": "TPaymentAddress...",
  "address": "TRecipientAddress...",
  "energy_amount": 65000,
  "duration_hours": 1,
  "price_trx": "2.75",
  "price_usdt": "0.64",
  "status": "pending",
  "expires_at": "2026-03-05T12:30:00Z"
}
Invoices expire after 30 minutes if no payment is received. Both TRX and USDT payments are accepted at the generated address.