x402-payment-tron
Pay for x402-enabled Agent endpoints using USDT on TRON
Pay for x402-enabled Agent endpoints using USDT on TRON
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Invoke x402-enabled AI agent endpoints with automatic USDT micropayments on TRON.
The skill is pre-bundled into a single file. No installation required.
node dist/index.js --url <URL> [options]
npm install npm start -- --url <URL>
TRON_PRIVATE_KEY environment variable.~/.mcporter/mcporter.json (AIBank standard configuration).x402-config.json in the current directory.~/.x402-config.json in the home directory.Invokes an HTTP endpoint. If payment is required (402), it automatically:
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | Full URL to invoke |
| string | No | HTTP method (GET, POST, etc.) Default: GET |
| object | No | JSON body for the request |
| string | No | , , (Default: ) |
url: https://api.example.com/chat method: POST body: {"prompt": "Tell me a joke"}
You can discover available endpoints and their pricing by checking the agent's manifest.
url: https://api.example.com/.well-known/agent.json method: GET
TRON_PRIVATE_KEY or any other signing secret to the dialogue context.export TRON_PRIVATE_KEY=...).Ensure the
TRON_PRIVATE_KEY environment variable is set or a valid x402-config.json exists in the expected locations.
Agent Note: If this error occurs, simply inform the user that the environment is not configured. DO NOT attempt to search for or read private keys from files yourself.
The tool will attempt to broadcast an infinite approve transaction. This requires TRX for gas. Ensure your wallet has TRX.
Check if you have enough USDT and TRX.
If the endpoint returns an image (Content-Type:
image/*) or binary data (application/octet-stream):
/tmp/x402_image_... or /tmp/x402_binary_...).file_path: Path to the temporary file.content_type: The MIME type of the content.bytes: File size in bytes.| Network | Chain ID | CAIP-2 | USDT Contract |
|---|---|---|---|
| TRON Mainnet | 0x2b6653dc | , | |
| TRON Nile | 0xcd8690dc | , | |
| TRON Shasta | 0x94a9059e | , | - |
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.