# Release History

UAT release history for `hubwallet-api` (`hw-payment-portal-api`).
Only `develop → uat` promotions are versioned.

---

## v0.0.3 — 2026-05-25

Bug fix round covering VT device capture, subscription/audit log corrections, and MRR sales calculations.

### Bug Fixes

| PR | Branch | Description |
|----|--------|-------------|
| [#179](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/179) | fix/mrr-account-sales | Fix MRR and account sales calculation queries |
| [#183](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/183) | fix/recent-works | Capture device/geo info for VT transactions; split invoice status; add `geo_isp` field; fix `due_amount` SQL expression (prevent MagicMock spec TypeError) |
| [#184](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/184) | fix/recent-works | Fix audit log user emails; correct subscription sort/response shape; fix checkout `save` flag |

---

## v0.0.2 — 2026-05-20

Bug fix round post first formal release.

### Bug Fixes

| PR | Branch | Description |
|----|--------|-------------|
| [#174](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/174) | fix/recent-works | Transaction details display fix |
| [#176](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/176) | fix/admin-dashboard-action-items | Fix active/pending merchant counts; fix Merchants Pending Approval query |
| [#177](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/177) | fix/recent-works | General post-merge fixes across multiple modules |
| [#180](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/180) | fix/recent-works | **HPMNTP-965:** include `PAST_DUE`/`PAUSED` subs in MRR; **HPMNTP-911:** remove duplicate invoice creation for future-dated payments; **HPMNTP-977/981/992:** invoice summary draft amount, PR status sync, auth status on PRE_AUTH; **HPMNTP-995/996:** split invoice `due_date` and financials aggregation; **HPMNTP-999/998:** sync billing/due date and restore payment date in draft wizard; **HPMNTP-845/968/999:** split payments charge first installment only; fix invoice pay flow; **HPMNTP-1003:** prevent expiring authorization with completed payment; **HPMNTP-970/971/980:** fix admin dashboard revenue totals and merchant stats; fix checkout completions count |
| [#181](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/181) | fix/recent-works | Latest regression patches and follow-up corrections (post-PR #180) |

---

## v0.0.1 — 2026-05-19

**First formal `develop → uat` promotion.** Consolidated all feature and fix work built in `develop` from Jan–May 2026.

### Features

| PR(s) | Branch | Description |
|-------|--------|-------------|
| [#36](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/36)–[#70](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/70) | various | Initial feature buildout: account management, auth improvements, product/customer CRUD, core payment flows, payment methods, transactions module |
| [#71](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/71)–[#100](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/100) | various | Reporting, site masters, files, notes, subscriptions stub — all production-ready modules |
| [#101](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/101)–[#140](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/140) | various | **Invoice module (PRD-004-HWINV):** full CRUD, draft lifecycle, PDF generation (WeasyPrint 68.1), reminders, bulk actions, analytics (37 tests passing) |
| [#141](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/141)–[#155](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/155) | `feat/admin-portal` | **Admin Portal (PRD-HWADM-001):** 19 superuser-only endpoints (`/api/v1/admin/...`), merchant management (activate/deactivate/delete), admin user CRUD, audit log (`admin_audit_log` table), merchant impersonation (4-hour non-renewable tokens), admin dashboard KPI stats |
| [#156](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/156)–[#157](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/157) | `fix/hwinv-invoice-detail-auth-fixes` | Fix `account_name` field in invoice authorizations response |
| [#158](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/158) | `feat/PRD-HWADM-005-admin-dashboard` | **Admin Dashboard (HWADM-005):** Enhanced KPI endpoints — revenue, MRR, active merchants, checkout completions, action items |
| [#159](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/159) | `feat/PRD-HWADM-002-pricing-control` | **Pricing Control (PRD-HWADM-002):** Admin-managed pricing tiers and surcharge rules |
| [#160](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/160) | `feat/admin-portal-rbac-improvements` | RBAC fixes, all-transactions endpoint with agent scoping, invite refresh-link |
| [#161](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/161) | `feat/PRD-HWUI-003-barcode-scanning` | **Barcode Scanning (PRD-HWUI-003):** Backend item lookup for barcode-scanned products; IntegrityError handling, CSV empty-row skip |
| [#162](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/162)–[#163](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/163) | `feat/scheduler-admin-ui-prd011` | **Scheduler Admin UI (PRD-011):** Admin-configurable Celery task scheduler with audit logging; email alert notifications for task failures, task execution monitoring, security hardening |
| [#164](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/164)–[#166](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/166) | `fix/recent-works` | TSYS ACH bank fixes, URL fix |
| [#167](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/167) | `fix/alembic-multi-head` | Merge `prd003_merge_barcode_head` and `prd011_fix_task_names` into single Alembic head |
| [#168](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/168)–[#169](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/169) | `fix/recent-works` | TSYS ACH additional fixes |
| [#170](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/170) | `fix/tax-inclusive-calculation` | Apply correct tax-inclusive formula in `save_line_items` |
| [#171](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/171) | `feat/plan-management-hwadm007` | **Plan Management (HWADM-007):** Unified plan management with feature-flag isolation; plan assignment and enforcement per merchant |
| [#172](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/172)–[#173](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/173) | `feat/transaction-fee-settlement-hwadm012` | **Fee & Settlement (HWADM-012):** Daily ACH sweep logic, card-network pricing backend, transaction fee calculation and settlement reporting |

### Payment Providers

| Branch | Description |
|--------|-------------|
| `feat/PRD-HWMP-003-tsys-provider-integration` | **TSYS Provider (PRD-HWMP-003):** Full `BasePaymentProvider` implementation, webhook handler (`tsys_webalerts.py`), credential storage |
| `feat/HWMP-004-per-merchant-tsys-credentials` | **Per-merchant TSYS Credentials (PRD-HWMP-004):** Isolated credential config per merchant in `merchant_provider_credentials` |

### Payment Scheduler (PRD-010-HWSCHED)

- Celery `scheduler` queue + `celery_scheduler_worker` service
- `generate_future_invoices` task — pre-generates invoices up to `SCHEDULER_INVOICE_LOOKAHEAD_DAYS` (default 7, range 1–30) ahead
- `process_due_transactions` task — charges due payment requests
- `dunning_retry_dispatcher` task — configurable max retries with backoff
- 5 new invoice dunning fields: `retry_count`, `max_retries`, `next_retry_at`, `last_retry_at`, `retry_exhausted_at`
- 3 new notification seeder templates: `invoice_overdue`, `invoice_overdue_sms`, `payment_dunning_exhausted`
- 30 tests passing in `tests/test_prd010/test_payment_scheduler.py`

---

## Pre-release UAT history (Dec 2025 – Jan 2026)

Before the `develop → uat` workflow was established, feature and fix branches were merged directly to `uat`. These are not individually versioned.

| PR | Date | Branch |
|----|------|--------|
| [#1](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/1) | 2025-12-04 | feature/setup |
| [#24](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/24) | 2025-12-04 | feat/Account |
| [#25](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/25) | 2025-12-05 | fix/payment-request |
| [#27](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/27) | 2025-12-08 | fix/product-note |
| [#29](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/29) | 2025-12-18 | feat/payrix |
| [#28](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/28) | 2025-12-19 | feat/subscription |
| [#26](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/26) | 2025-12-19 | feat/Account |
| [#30](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/30) | 2025-12-19 | fix/payrix |
| [#31](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/31) | 2025-12-19 | feat/Account |
| [#33](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/33) | 2025-12-19 | fix/payrix |
| [#34](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/34) | 2026-01-13 | auth_me |
| [#35](https://bitbucket.org/dreamztech/hw-payment-portal-api/pull-requests/35) | 2026-01-13 | feature/customer-phone-lookup |
