Telegram & email delivery
Parent connection
The print service handles Telegram webhooks and verifies the parent's phone number against Spring. Keep that phone number accurate in Parent List.
Supported commands include /start, /require_invoice, /status, and /help. Verification state lasts 15 minutes. Successfully handled webhook update IDs are deduplicated for seven days.
Requesting an invoice
/require_invoice finds the linked parent, then retrieves the saved current-month invoice from Spring. It does not invent an invoice number or create new tuition prices.
If there is no saved invoice for that month, the parent is directed to the administrator. Generate the correct invoice before trying the request again.
Batch delivery
When a parent has a Telegram chat ID, the delivery flow tries Telegram. Definite Telegram failures fall back to PDF files in an administrator ZIP email.
ZIP emails are split by the configured size limit, so one batch may produce multiple emails. The existing all-Telegram flow also retains its administrator ZIP-email behaviour.
Webhook setup
A bot can have one active webhook. Register it deliberately when switching services:
php artisan telegram:webhook https://print.tigasatutiga.com/telegram/webhook
TELEGRAM_WEBHOOK_SECRET supplies the expected Telegram secret-token header. Registration changes the live bot integration; a local test should use faked HTTP/queue responses instead.
Unknown send results
A network interruption can happen after a provider accepted a message but before the application received acknowledgement. These cases are held for review instead of being automatically sent again.
See Batch delivery before retrying uncertain Telegram or email sends.