KareTech Docs

Payment Report Generation

Monthly payment report generation by NMS site with PDF output and Telegram delivery

Payment Report Generation

Purpose: Generate monthly payment reports per NMS site, export as PDF, and deliver via Telegram.

Report Scope

  • Source: UISP CRM payments API
  • Granularity: By NMS parent site (Kumaka, Mahdia, Karaburi, Parakeese)
  • Output: PDF report + summary table
  • Delivery: Telegram (Alfred bot)

API Pagination

UISP payments API returns max 500 records per page. Use offset parameter to paginate:

# Page 1
GET /crm/api/v1.0/payments?limit=500&offset=0
 
# Page 2
GET /crm/api/v1.0/payments?limit=500&offset=500

Total system: approximately 890 payments (July 2024 onward).

Report Generation Command

cd /home/karetech/clawd
source scripts/load-secrets.sh
python3 skills/satlinkgy-uisp/scripts/uisp.py report --month YYYY-MM --site all

Report Format

Monthly report includes:

  • Total payments received per site
  • Number of customers who paid
  • Number of customers still outstanding
  • Running total vs expected monthly revenue

Delivery

Reports are sent via Alfred Telegram bot (@kareem_alfred_bot) to Master Kareem automatically at month-end, or on demand via the /report command.

On this page