License Extensions

How admins grant extra days on a user's license — by bot command or from the dashboard. Max 90 days per call, fully audited, automatically picked up by the client node.

License Extensions

Prerequisites

  • You are the bot owner (OWNER_TELEGRAM_ID) — /extend is owner-only
  • The target user's license email
  • Admin dashboard access at /admin/licenses (for UI mode)

Walkthrough

1
When to extend a license

When to extend a license

Extensions are free gestures you grant to keep customers happy and nodes running. Typical use cases:

  • Payment delay — bank transfer clearing or Stripe hold (7 days)
  • Trial evaluation — prospect needs more time to decide (14–30 days)
  • Referral reward — thank a customer who brought a new node (30 days)
  • Bug-bounty compensation — reward for a responsibly disclosed issue
  • Partner pilot / enterprise eval — up to 90 days

Payment vs extension

Extensions are free — they do not move DZIT or charge the wallet. Use /up for paid renewals.

2
Issue via bot command

Issue an extension via the bot

Open @biznode_bot on Telegram. Send:

/extend <email> <days> [optional reason]

Examples:

/extend alice@example.com 14 First-time trial /extend bob@biz.com 30 Referral bonus /extend charlie@co.com 7 Payment delay

The bot POSTs to api_license_extend.php on the VPS, which updates the license row and writes an entry to the license_extensions audit table. You get back a confirmation with the new expiry.

Tip: always include a reason — it appears in the audit log and helps future-you remember why.
3
Issue via dashboard

Issue via the dashboard

Prefer clicking? Open https://<admin>/admin/licenses (linked from the orange Admin Tools dropdown). You'll see every license with its expiry date.

  • Click +30d / +60d / +90d for instant grants
  • Click Custom… to enter any day count (1–90) and a reason
  • The License Manager writes the same audit trail as the bot command

Same endpoint under the hood

Both paths call POST /api_license_extend.php — so bot and dashboard stay in sync and dedupe naturally.

4
The 90-day rule

The 90-day-per-call rule

Each call adds up to 90 days. The system rejects any single request larger than that. Why?

  • Safety rail — prevents typos like /extend bob@biz.com 3000 from nuking billing
  • Audit clarity — multiple small extensions tell a clearer story than one giant one
  • No hard cap overall — you can re-extend as many times as needed
# Need 180 days? Run it twice: /extend alice@example.com 90 Enterprise pilot (part 1) /extend alice@example.com 90 Enterprise pilot (part 2)
5
Client-side pickup

Client-side pickup behaviour

Client nodes are event-driven — they do not poll. When you extend, the client picks up the new expiry on:

  • Boot — every service start checks the license
  • Daily 09:00 UTC — scheduled via APScheduler (_run_daily_license_check)
  • Urgency mode — when <7 days remain, checks bump to every 6 hours so extensions land fast
  • Offline — cached value is used; after 7 days offline without contact, a fail-open grace kicks in so the bot never dies from a network blip
Need it instant? Ask the customer to restart the bot, or wait up to 24 hours for the daily check — whichever comes first.
6
Audit trail

Audit trail — license_extensions table

Every extension — whether from bot or dashboard — writes a row to the license_extensions table on the VPS:

id, email, days_added, new_expiry, admin_id, reason, source, created_at

Fields captured:

  • admin_id — the Telegram user ID (or dashboard session user) that issued the grant
  • reason — free-text explanation provided with the request
  • sourcebot or dashboard
  • new_expiry — ISO timestamp after the extension was applied

Alerting

The scheduler runs _run_license_expiry_alerts daily at 08:00 UTC and sends the owner a Telegram list of any licenses expiring in 7 / 3 / 1 days — so you never miss a renewal window.

Endpoints reference

  • POST /api_license_extend.php — admin only, requires X-Admin-Key header, body {email, days, reason, admin_id}
  • GET /api_license_check.php?email=<email> — public, returns current expiry and days remaining
  • GET /api_licenses_list.php — admin, full license list used by the dashboard and expiry-alert job

Try /extend now

Open @biznode_bot and run /extend <email> <days> [reason]. You must be the registered bot owner.

Open BizNode Bot →