API Documentation

API v1.2

Build plugins and automations for TDUgame

Authentication
X-Api-Key
Pass your key in the header of every request to /v1/*.
Rate limit
120 / 60 seconds
Per API key. The server returns 429 if you exceed this limit.
Base URL
tdugame.ru/api
Full URL: https://tdugame.ru/api. Endpoint paths start with /v1.
Idempotency
Idempotency-Key
This header on /rent and /extend prevents duplicate charges when you retry a request.
🔑
Your API key
The X-Api-Key header for requests to /v1/*
Checking...

Getting started

Generate a key above, then pass it in the X-Api-Key header:

# example curl -H "X-Api-Key: tdu_your_key_here" \ https://tdugame.ru/api/v1/balance
🧩 Plugin for FunPay Cardinal
A ready-to-use plugin for FunPay sellers: listings, automatic delivery, and extensions for rented TDUgame accounts.

Connects to FunPayCardinal and works exclusively through this API using your key.

TDUgameResell for FunPay FunPayCardinal✓ Free

★ 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 →

Version: 2.14.16 Updated: December 3, 2026 Size: 656 KB

Features

Step-by-step installation

The plugin runs inside FunPay Cardinal, which signs in to your FunPay account and manages listings. Install Cardinal first, then add the plugin.

1
Prepare a computer or server

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.

2
Install FunPay Cardinal

Official repository: github.com/sidor0912/FunPayCardinal. Choose your system:

  • Linux (Ubuntu) — run this command and follow the installer prompts:
    wget https://raw.githubusercontent.com/sidor0912/FunPayCardinal/main/install-fpc.sh -O install-fpc.sh && bash install-fpc.sh
  • Windows — install Python 3.11 (check “Add python.exe to PATH” on the first screen), then download the Cardinal archive from GitHub and extract it. Run Setup.bat, wait for the packages to install, then run Start.bat.
  • Docker — instructions are in the repository README.
3
Complete the initial Cardinal setup

When you first launch Cardinal, it will ask a few questions in the console:

  • golden_key — your FunPay account key (retrieve it from the funpay.com cookies using a browser extension such as Cookie-Editor).
  • Your browser’s User-Agent.
  • Telegram bot token — create your own bot through @BotFather using /newbot and paste the token you receive.
  • A password for accessing the bot.

After setup, launch Cardinal again, open your bot in Telegram, and send it the password. The bot will become your control panel.

4
Add the plugin to Cardinal

Download the plugin using the button above, then send /menu in your bot chat and click “🧩 Plugins”:

Cardinal menu: Plugins button

This is what your bot menu looks like. In the plugin list, click “Add plugin”:

Cardinal plugin list

Click “➕ Add plugin” and send the downloaded TDUgameResellPlugin.py file to the bot as a document:

Uploading the plugin file to the bot

After uploading, restart Cardinal using /restart to load the plugin.

Only install plugins from sources you trust: a plugin has access to your FunPay account. This file communicates only with the TDUgame API using your key.
5
Enter your TDUgame API key

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:

TDUgameResell plugin menu

The plugin menu. Click “🔑 API key” — the bot will ask you to send your key:

Entering a TDUgame API key
6
Create listings

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.

Creating listings

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.

📖 Catalog (no key required)
Game listings and rental price calculations — publicly available, with no authentication required.
GET/productsList games in the catalog

Parameters

search (query, optional) — search by game title

Example response

[{ "id": 279, "name": "MECCHA CHAMELEON", "pricePerHourRub": 1, "availableAccounts": 239, "minHours": 1, "maxHours": 720, "nextAvailable": [] }]
GET/products/{id}Get a game by ID

Retrieve a single game instead of the entire catalog — useful when your plugin works with a specific game.

Example response

{ "id": 790, "name": "Little Nightmares Complete Edition", "pricePerHourRub": 1, "availableAccounts": 0, "minHours": 1, "maxHours": 720, "nextAvailable": [ { "availableInSeconds": 15476, "availableInHuman": "4h 17m" }, { "availableInSeconds": 35011, "availableInHuman": "9h 43m" } ] }

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.

Errors

404 not_found — no game exists with this ID

POST/products/{id}/quoteCalculate the rental price

Calculates the exact cost using the same formula as checkout. The duration discount is nonlinear.

Request body

{ "hours": 24, "quantity": 1 }

Example response

{ "priceRub": 42, "priceUsd": 0.51, "discountPercent": 12 }
🔌 Reseller API
Requires X-Api-Key. Rent accounts, manage active rentals, retrieve logins and passwords, and get Steam Guard codes for automation (such as the FunPayCardinal plugin).
GET/v1/balanceWallet balance

Example response

{ "balanceRub": 1200 }
GET/v1/productsList products

Same as the public /products endpoint, but requires a key for consistency with the rest of the reseller API.

GET/v1/products/{id}Get a game by ID

Identical to the public /products/{id} endpoint, but requires a key.

POST/v1/products/{id}/quoteCalculate the price

Identical to the public /products/{id}/quote endpoint.

GET/v1/price-tablePrices for all games at specified durations

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.

Parameters

hours — comma-separated durations in hours (up to 40 values); if omitted, a standard set ranging from 1 hour to 30 days is used.

Example response

{ "hours": [1, 24], "prices": { "218": { "1": 4, "24": 48 } }, "ready": true }
GET/v1/funpay-mapFunPay categories for games

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.

Example response

{ "games": [ { "productId": 2, "name": "Rust", "aliases": [], "funpay": { "categoryId": 92, "subcategoryId": 250, "subcategoryType": "common", "fields": { "fields[type]": "Rental" } } } ] }
POST/v1/rentRent an account

Deducts the cost from the balance associated with the key and starts the rental immediately.

Headers

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.

Request body

{ "productId": 279, "hours": 24, "quantity": 1 }

Example response

{ "rentalUids": ["7a6543f9-..."], "failedCount": 0, "priceRub": 42, "balanceRub": 158 }
GET/v1/rentalsActive rentals

Example response

[{ "rentalUid": "7a6543f9-...", "productName": "DayZ", "status": "active", "expiresAt": "2026-09-22T10:00:00.000Z" }]
GET/v1/rentals/{uid}Status of a single rental

Check a specific rental instead of scanning the full list of active rentals.

Example response

{ "rentalUid": "7a6543f9-...", "productName": "DayZ", "status": "active", "expiresAt": "2026-09-22T10:00:00.000Z" }
GET/v1/rentals/{uid}/credentialsGet the login and password

Example response

{ "login": "jk97211859", "password": "fOsfEMUAzo1Y28qW" }
GET/v1/rentals/{uid}/codeSteam Guard code

A one-time code that changes with each request.

Example response

{ "code": "ABCDE", "expiresIn": 30 }
POST/v1/rentals/{uid}/extendExtend a rental

Headers

Idempotency-Key (optional) — prevents duplicate charges on retries, just as with /v1/rent.

Request body

{ "hours": 24 }

Example response

{ "priceRub": 42, "balanceRub": 116, "expiresAt": "2026-09-22T10:00:00.000Z" }
POST/v1/rentals/{uid}/terminateEnd a rental early

Example response

{ "status": "terminated" }
🔔 Webhooks
Notifications of rental status changes, instead of polling /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": "rental.expiring_soon", "data": { "rentalUid": "7a6543f9-...", "productName": "DayZ", "expiresAt": "2026-09-22T10:00:00.000Z" }, "timestamp": "2026-09-21T09:00:00.000Z" }

Events

eventWhen
rental.createdimmediately after a successful /v1/rent request
rental.extendedimmediately after a successful /v1/rentals/{uid}/extend request
rental.expiring_soonapproximately one hour before expiry (sent once)
rental.expiredthe rental has expired and was not automatically renewed
rental.terminatedthe rental was ended early through /v1/rentals/{uid}/terminate

Signature verification

Each request includes an X-TDUgame-Signature header containing an HMAC-SHA256 signature of the request body, generated using your webhookSecret:

// Node.js const crypto = require("crypto"); const expected = crypto.createHmac("sha256", webhookSecret) .update(rawRequestBody) .digest("hex"); // compare with the X-TDUgame-Signature header
⚙️
Webhook settings
The URL that will receive rental event notifications
Checking...

⚠️ Error codes (/v1/*)

HTTPErrorDescription
401invalid_api_keyThe key is missing, invalid, or revoked
403account_disabledThe account is blocked
403not_activeThe rental is inactive (expired or ended)
400insufficient_balanceInsufficient balance
400no_stockNot enough accounts available for the requested quantity
404not_foundThe product or rental was not found, or does not belong to you
409operation_inflightA code request is already in progress; please wait
429rate_limitedRate limit exceeded
502catalog_unavailableTechnical error; please try again later

OpenAPI specification: open · raw .json