One-off purchase or an account balance
Website purchases pay an exact TRX amount from a wallet. Merchant purchases spend the merchant’s internal balance. Each merchant receives a dedicated deposit address; confirmed deposits credit that account rather than automatically creating an Energy order. The merchant console and OpenAPI use the same quote and purchase flow.
Quote the exact quantity first
Request a quote for the resource type, amount and duration you intend to buy. Prices fluctuate, and a bulk order may not equal a one-unit price multiplied by quantity. Use the returned total and quote_id. A merchant quote is valid for one minute; if it expires before submission, obtain a new one.
Create one logical order once
Send the quoted product, destination wallet, quote_id and your client_order_id when creating the order. Use one Idempotency-Key for that logical request. If the response times out, retry the same payload with the same key or query the order; do not create a fresh key simply because the response was lost.
Accepted does not mean delivered
An accepted order response means processing has started. Track the returned order identifier through order queries or signed webhook notifications. Check the final delivery state and chain evidence before treating the Energy as usable. An uncertain result needs reconciliation, not another automatic purchase.
Protect the integration
Keep API secrets on your server, configure permitted source IPs, and verify webhook signatures. Store only the identifiers and operational evidence needed for support; do not log full credentials. Treat repeated webhook deliveries as normal and make your consumer idempotent.
Evaluate the actual price
The public API price is a standard reference, not a promise that every account has identical products or pricing. Your account’s current quote is authoritative. Begin with a supported quantity, verify the complete order lifecycle, then scale the integration while watching balance, failures and callback processing.