Build plugins and automations for TDUgame
/v1/*.429 if you exceed this limit.https://tdugame.ru/api. Endpoint paths start with /v1./rent and /extend prevents duplicate charges when you retry a request.X-Api-Key header for requests to /v1/*Generate a key above, then pass it in the X-Api-Key header:
Connects to FunPayCardinal and works exclusively through this API using your key.
★ The only one with a Telegram mini-app. Automatic listing creation and delivery, Steam Guard codes, rental extensions, smart hiding of unavailable listings, an error log with troubleshooting tips, and automatic updates. View screenshots and features →
!кодстим.!друг.The plugin runs inside FunPay Cardinal, which signs in to your FunPay account and manages listings. Install Cardinal first, then add the plugin.
Cardinal must run around the clock for orders to be delivered automatically. You can use a rented virtual server (Ubuntu 22–24) or a regular computer that stays on.
Official repository: github.com/sidor0912/FunPayCardinal. Choose your system:
wget https://raw.githubusercontent.com/sidor0912/FunPayCardinal/main/install-fpc.sh -O install-fpc.sh && bash install-fpc.sh
Setup.bat, wait for the packages to install, then run Start.bat.When you first launch Cardinal, it will ask a few questions in the console:
/newbot and paste the token you receive.After setup, launch Cardinal again, open your bot in Telegram, and send it the password. The bot will become your control panel.
Download the plugin using the button above, then send /menu in your bot chat and click “🧩 Plugins”:
This is what your bot menu looks like. In the plugin list, click “Add plugin”:
Click “➕ Add plugin” and send the downloaded TDUgameResellPlugin.py file to the bot as a document:
After uploading, restart Cardinal using /restart to load the plugin.
Generate a key in the “API key” section above on this page and top up your balance — rental costs are deducted from the balance associated with the key. In the bot, open “🧩 Plugins” → TDUgameResell → “⚙️ Settings” → “🔑 API key” and send the key as a message:
The plugin menu. Click “🔑 API key” — the bot will ask you to send your key:
Open “📦 Create listings”. The first time, complete the short setup wizard (listing text, rental durations, and markup), then click “➕ Create missing listings”. The plugin will show a plan and create the listings on FunPay.
The “🆕 New games” button enables automatic listing creation for new catalog games. “🚫 Exclusions” opens the list of games for which listings should not be created.
Screenshots were taken in a real bot with the plugin installed (the key and balance shown have been replaced). Your Telegram interface may look slightly different.
Your FunPay account currency must be rubles. FunPay allows no more than 500 new listings per 24 hours — the plugin tracks this limit automatically and resumes later.
search (query, optional) — search by game title
Retrieve a single game instead of the entire catalog — useful when your plugin works with a specific game.
nextAvailable — when busy accounts become free, ascending: seconds and the same as "4h 17m". An empty list means no busy accounts or the time is unknown. It can be non-empty even when availableAccounts > 0.
404 not_found — no game exists with this ID
Calculates the exact cost using the same formula as checkout. The duration discount is nonlinear.
X-Api-Key. Rent accounts, manage active rentals, retrieve logins and passwords, and get Steam Guard codes for automation (such as the FunPayCardinal plugin).Same as the public /products endpoint, but requires a key for consistency with the rest of the reseller API.
Identical to the public /products/{id} endpoint, but requires a key.
Identical to the public /products/{id}/quote endpoint.
Get prices for game × duration combinations in one request, without calling /quote for each pair. Useful for creating listings in bulk; these prices are estimates. The exact charge is returned by /v1/rent and calculated by /v1/products/{id}/quote.
hours — comma-separated durations in hours (up to 40 values); if omitted, a standard set ranging from 1 hour to 30 days is used.
Returns the FunPay section typically used for each game and the form fields it requires. productId is the same ID as in /v1/products. Used by the plugin to create listings automatically.
Deducts the cost from the balance associated with the key and starts the rental immediately.
Idempotency-Key (optional, but recommended) — a unique request ID you provide. Repeating a call with the same key (for example, when retrying after a timeout) returns the same result and does not charge you again.
Check a specific rental instead of scanning the full list of active rentals.
A one-time code that changes with each request.
Idempotency-Key (optional) — prevents duplicate charges on retries, just as with /v1/rent.
/v1/rentals.Set a URL below (available once you have generated an API key). For each event, we will send a POST request to it with this body:
| event | When |
|---|---|
| rental.created | immediately after a successful /v1/rent request |
| rental.extended | immediately after a successful /v1/rentals/{uid}/extend request |
| rental.expiring_soon | approximately one hour before expiry (sent once) |
| rental.expired | the rental has expired and was not automatically renewed |
| rental.terminated | the rental was ended early through /v1/rentals/{uid}/terminate |
Each request includes an X-TDUgame-Signature header containing an HMAC-SHA256 signature of the request body, generated using your webhookSecret:
| HTTP | Error | Description |
|---|---|---|
| 401 | invalid_api_key | The key is missing, invalid, or revoked |
| 403 | account_disabled | The account is blocked |
| 403 | not_active | The rental is inactive (expired or ended) |
| 400 | insufficient_balance | Insufficient balance |
| 400 | no_stock | Not enough accounts available for the requested quantity |
| 404 | not_found | The product or rental was not found, or does not belong to you |
| 409 | operation_inflight | A code request is already in progress; please wait |
| 429 | rate_limited | Rate limit exceeded |
| 502 | catalog_unavailable | Technical error; please try again later |