telegram
RUEN
~/cases/digiseller-steamoffline

Digiseller SteamOffline

Sells Steam offline activations on Digiseller and sends Steam Guard codes when the buyer asks.

30 sSteam Guard code lifetime
7 snew message check
3delivery modes
2message languages

The task

A Digiseller seller needed to deliver Steam offline activations without being on duty: login details after payment, and a fresh Steam Guard code whenever the buyer asks.

What I built

  • payment tracking and automatic delivery of the details into the order chat
  • order distribution across accounts: the least busy one is picked, with a limit on concurrent orders
  • Steam Guard codes when the buyer writes "code", with a per-order code limit
  • three delivery modes and delayed delivery when no account is free
  • closing the activation on refund or expiry, and a review reminder
  • messages in Russian, English or both; statistics; a Telegram panel for accounts, products and texts

Under the hood

  • A custom Steam Guard generator with time sync. If a code has only a few seconds left, the bot waits for the next one — the buyer never gets an expired code.
  • No race conditions: picking an account and recording the activation happen under one lock, so the concurrent-order limit holds even with parallel purchases, and the code limit is checked and spent in a single operation.
  • No data loss on crashes: atomic writes to disk, and a corrupted file is never silently overwritten.
  • A resilient Digiseller API client: token caching, re-authentication, retries with growing delays.
stack:Pythonaiogram 3requestssystemd

The code belongs to the clients, so the case pages only describe the work.