PayAny Energy API
Rent TRON energy for your own customers, paid from your PayAny Energy account balance. The
reseller API (/v1) uses the same prices, the same order lifecycle and the same balance as the
website — there is no second wallet to fund.
- Base URL:
https://energy.payany.com— every path in these docs starts with/v1. - Everything is JSON over HTTPS, UTF-8.
- Ready-made clients for Python, Node.js and PHP are on the Examples page.
Getting started
- Sign in, enable two-factor authentication (Account → Settings), open
Account → API keys and create a key. Choose:
- Bearer (simple) or HMAC (the secret never leaves your server — recommended for production);
- permissions: Read (every
GET) and/or Order (everything that spends money); - an IP allow-list (strongly recommended for keys with Order) and a callback URL for
webhooks (optional,
https://only).
- Copy the secret — it is shown exactly once. Lost it? Rotate the key; the old secret stops working at once.
- Top up your balance:
GET /v1/accountshows your personal TRC20 deposit address. TRX is credited at first sight, USDT once final. Orders are charged in TRX by default (charge_asset: "USDT"charges your USDT balance at the current rate). - Try everything risk-free with the
X-Test-Mode: 1header — see Orders.
Responses
Every response is an envelope, and the HTTP status is meaningful — 2xx on success, 4xx/5xx with the same envelope on errors:
JSON
{"code": 0, "message": "success", "data": { "...": "..." }}JSON
{"code": 45009, "message": "insufficient balance", "data": null}The second one arrives with HTTP 400. code is the business code — see Errors.
Conventions
- Amounts are decimal strings (
"2.08"), trailing zeros trimmed. Never parse them as floating-point numbers. - Times are ISO-8601 UTC (
2026-10-13T08:00:00Z). - Integer fields also accept numeric strings (
"65000"). - Lists are paged:
{"data": [...], "count", "curr_page", "total", "total_page", "has_next"}. - Your TRX and USDT balances are kept apart and never converted into each other.
Where to next
| Page | What it covers |
|---|---|
| Authentication | Bearer and HMAC, the string to sign, test vectors, limits |
| Price and terms | Terms, quotes, how much energy an address needs |
| Orders | Create, idempotency, max_price_trx, batch, test mode, lookups, CSV export |
| Order status | The status vocabulary and the lifecycle of an order |
| Account | Balances, deposit address, the key you are calling with |
| Addresses and quick rent | Saved addresses and one-call rentals |
| Webhooks | Body, headers, acknowledgement, retries, ordering, verification |
| Errors | Every error code with its HTTP status |
| Examples | Complete clients in Python, Node.js and PHP |