TRON’s wallet-cli has been updated to version 4.14.0, bringing a new command family that allows users to pay for HTTP 402 Payment Required endpoints directly from the wallet. The change is primarily TypeScript‑only, with the Java REPL receiving a version bump and minor documentation updates, but the core functionality remains unchanged.
The new `x402 pay <url>` command lets an agent call an endpoint that responds with a 402 status code, select a payment route offered by the endpoint on the chosen network, sign the authorization with the active account, and repeat the request with the signed token. This flow eliminates the need for a `--wait` flag, as the facilitator settles the payment on‑chain. The command accepts standard HTTP parameters—`--method`, `--header`, `--body` or `--body-file`—alongside spend controls that are enforced before signing: `--max-amount`, `--max-raw-amount`, `--token`/`--asset`, `--scheme` (exact or exact_gasfree), and `--max-gasfree-fee` to draw from the account’s GasFree balance.
Error handling is designed to prevent double‑spending. Each failure reports whether money may have moved, with fields such as `error.details.phase`, `paymentStatus` (not_sent, unknown, settled), `retryPayment`, `candidateTxHash`, and, on TRON, the one‑time Permit2 approval that was signed. The SDK surfaces spend refusals as `amount_exceeds_limit` or `no_matching_requirement`, and rate‑limited facilitators return `provider_rate_limited` with a `retryAfterSeconds` value.
Other than the x402 feature, the release includes a non‑mandatory upgrade that updates the TypeScript CLI, applies documentation touch‑ups, and respects the legacy_derivation guidance from the 4.13.1 release. The Java REPL remains functionally identical.
For developers building on TRON, the x402 pay command offers a streamlined way to integrate paywalls and token‑based access controls into command‑line workflows. By handling payment routing, signing, and settlement within the wallet, scripts can reliably interact with protected HTTP endpoints without manual intervention or risk of duplicate charges.
Overall, wallet-cli 4.14.0 enhances the developer experience by adding a powerful payment tool while keeping the core CLI stable and well‑documented.
