# Features — paymyfines-backend

Evidence date: 2026-10-08.

Source: `master` at `5b98fa7640e9cd4d1a71da5f18b107899179c4be` (2022-02-15, merge). Last functional commit subjects on `master` are `a9d9ded` and `ecb466f`, "allow 02 and other ID types".

Feature status is what this revision contains. Remote branches other than `master` were not inspected.

## Current features

All of these are deployed as methods on `PMF.Handler` in `serverless.yml` unless noted.

| Feature | Route or trigger | Handler | Status |
|---|---|---|---|
| reCAPTCHA verify | `POST /recaptcha` | `PMF.Handler::IsRecaptchaValid` | Current |
| Logged-in user | `GET /details` | `PMF.Handler::GetLoggedInUserDetails` | Current |
| Update profile and extra ID numbers | `POST /update` | `PMF.Handler::PostUserDetails` | Current |
| User by id, Cognito id, or email | `GET /user/details` | `PMF.Handler::GetUserDetails` | Current |
| API call log | `GET /logs` | `PMF.Handler::GetAPILogs` | Current. Method comment says "For testing only" |
| Transaction history | `GET /transactions` | `PMF.Handler::GetTransactions` | Current |
| Create MySQL user | `POST /register` | `PMF.Handler::RegisterUser` | Current |
| Link Cognito id to email | `POST /updateregistration` | `PMF.Handler::UpdateRegistration` | Current |
| iForce payment proxy | `POST /registerpayment` | `PMF.Handler::PostPayment` | Current. Comment says the call is used from the cron job, not this route |
| iForce evidence | `GET /evidence` | `PMF.Handler::GetEvidence` | Current. Timeout 30s |
| All fines for a user or ID | `GET /getallfines` | `PMF.Handler::GetAllFines` | Current. Timeout 45s |
| Notice search | `GET /getfinesearch` | `PMF.Handler::GetQuickFines` | Current. Timeout 30s |
| iForce evidence stream | `GET /streamevidence` | `PMF.Handler::GetStreamEvidence` | Current. Timeout 30s |
| iForce outstanding by notice | `GET /getoutstandingfines` | `PMF.Handler::GetOutstandingFines` | Current. Timeout 30s |
| iForce charges | `GET /getcharges` | `PMF.Handler::GetCharges` | Current. Timeout 30s. Comment: "Not used alone" |
| eNatis notice query | `GET /queryinfringements` | `PMF.Handler::QueryExternalInfringement` | Current. Timeout 30s |
| eNatis person query | `GET /queryinfringer` | `PMF.Handler::QueryExternalInfringer` | Current. Timeout 30s |
| eNatis pay proxy | `POST /payinfringement` | `PMF.Handler::PayExternalInfringement` | Current. Timeout 30s |
| Cognito custom mail | User pool `tmt-pmf-prod-user-pool`, trigger Custom Message | `PMF.Handler::GenerateCustomEmail` | Current |
| Settings read | `GET /getsettings` | `PMF.Handler::GetSettings` | Current |
| Settings write | `POST /postsettings` | `PMF.Handler::PostUpdateSettings` | Current |
| Graph data | `GET /getgraphs` | `PMF.Handler::GetGraphs` | Current |
| Graph definition read | `GET /getgraphsettings` | `PMF.Handler::GetGraphSettings` | Current |
| Graph definition write | `POST /postgraphsettings` | `PMF.Handler::PostGraphSettings` | Current |
| Store iVeri basket | `POST /postiveritransaction` | `PMF.Handler::PostIveriLiteTransaction` | Current. Timeout 30s |
| iVeri return, receipt, redirect | `POST /iveripayment` | `PMF.Handler::IVeriPayment` | Current. Timeout 45s |
| Source settlement | `GET /runcronjob` and schedule `RunCronJobDev` `rate(2 hours)` | `PMF.Handler::RunCronJob` | Current |

The URL comment block at the top of `serverless.yml` lists the same HTTP paths against API id `puru95wxc8` in `eu-west-1`, stage `production`. That block is a comment, not a live endpoint check.

## Completed features

Nothing in the repository is marked completed as a product phase. The functions above are the shipped surface of `master`.

Git subjects that describe work already on `master` before HEAD:

- Receipt number, payment time, PDF fetch delay (`7b155fe`, `6b60c0f`).
- PDF URL moved across public IP, private IP, and a load balancer, then the load balancer URL was removed (`661900c` through `cf7630f`).
- Receipt PDF attached from S3 (`df3d406`, `b4627e7`).
- Receipt from-address change (`4969d75`).
- ID types `"02"` and non-RSA types (`a9d9ded`).

Those subjects describe history. The behaviour that remains is the Current table.

## Planned features

No planned-feature list, ticket, or TODO file is in the tree.

Comments that describe unfinished intent, not a committed plan:

- `serverless.yml` schedule comment: 2 hours is for testing; 8 hours is recommended. The deployed rate is 2 hours.
- `PaymentService` sets `terminalId` to 0 with the comment "what goes here??".
- `IVeriPayment` comments that an empty `LITE_RESULT_DESCRIPTION` should be checked with iVeri.
- `provisionedConcurrency: 5` is commented out on the HTTP functions.
- `authorizer: aws_iam` is commented out on `RunCronJob`.
- `Select.HtmlToPdf.NetCore` is commented out in the project file. PDF generation is the external service instead.
- `deletepayment` is commented out in `serverless.yml`. There is no `DeletePayment` method in `Handler.cs`.

## In development

`master` has no commits after 2022-02-15. No branch in this checkout is ahead of `master` with uncommitted product work. Other remote branch names exist (listed in `project-plan.md`) and were not read.

## Recently changed

Relative to the rest of `master`, the last functional change is ID handling: `GetAllFines` validates the RSA regex for `strIdType` `"2"` and `"02"`, and accepts other types without that regex. `RegisterUser`, `PostUserDetails`, and `GetTransactions` still apply the regex only for `"2"`, not `"02"`.

## Deprecated or removed

| Item | Evidence | Status |
|---|---|---|
| `POST /deletepayment` | Commented function in `serverless.yml`. No handler method | Not deployed |
| In-process HTML-to-PDF | Package reference commented out | Not used |
| Load-balancer PDF URL | Commit `cf7630f` "remove load balancer pdf". Current constant is `http://10.106.3.158:8080/htmltopdf` | Removed from current constants |
| `SaveToS3` | Private method in `PaymentReceiptService`. No caller | Present, unused |
| Starter `hello` / `getquerystring` | README still documents them. `serverless.yml` does not | Documented only |

## Source map

| Concern | Path |
|---|---|
| All routes | `serverless.yml` |
| All handlers | `Handler.cs` |
| Field rules | `Model/APIModel.cs`, `classes/Helper.cs` |
| Endpoints and secrets in code | `classes/Constants.cs`, `Services/SecretsManager.cs` |
| Paid-twice flag | `Services/PaymentChecker.cs` |
| Settlement | `Services/PaymentService.cs` |
| Receipt | `Services/PaymentReceiptService.cs` |
| Admin failure mail | `Services/MailService.cs` |
| Graphs | `Services/GraphService.cs` |
| Envelope | `Services/ResponseService.cs` |
| Build | `build.cmd`, `build.sh` |
