tc-payment-router
Payments-platform monorepo: the JWT-secured Payment Router API that orchestrates payment sessions across the PSP adapter APIs, a Configuration Management API with Angular admin UI, shared TC.Payments.* packages and ~18 TypeScript Lambdas driving the session lifecycle off EventBridge/DynamoDB streams.
Health score
0 to 100 across seven weighted factors; nothing is hidden. Green is 75 and above, amber 50 to 74, red below 50. How scoring works.
Facts
| Languages | csharp, typescript |
| Frameworks | ASP.NET Core 8, Angular 19, AWS Lambda, Serilog |
| Runtimes | .NET 8, nodejs 20 |
| Tests / CI | good / CI in place |
| Last commit | 2026-06-19 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Payments and finance (system generated; curate in repo-owners.json to override) |
| Product area | Shared platform |
| Hosted | AWS Deployed to AWS
|
| Releases | 0 release pipeline(s): |
| Integration | rest, jwt, eventbridge |
| Source | Open in Azure DevOps |
Risk flags
No risk flags recorded.
Each flag links to its glossary definition.
Dependencies in context
Entanglement
loose No binding mechanisms apply: this system needs no untangling work.
Migration playbooks
Generated from this repo's assessment data: what is feasible, what blocks it, and the steps in order. Ratings: green means actionable now, amber means sequence other work first, red means blocked, grey means not applicable.
ZDD adoption
No excuseNothing technical is holding this repo on the three-week release. It either already deploys without downtime (AWS) or is a modern, well-tested service the automated stealth path can carry today. Already deploys as a container to AWS, which releases without downtime today. Separating it from the three-week release is a process decision, not a technical one.
- 2 system(s) depend on this repo; during a rolling deploy they will talk to old and new versions at once, so responses must stay compatible
- Adopt the four-stage discipline from the ZDD engineering standard: pre-deployment compatibility, deployment, feature activation behind a flag, post-release cleanup.
- Make every change dual-version safe: backwards-compatible APIs (new major version for breaking wire changes), expand and contract for any schema change, and consumers tolerant of unknown fields.
- Audit serialized data: anything in Redis, queues or shared caches must deserialize cleanly across adjacent versions.
- Wrap behaviour changes in feature flags so code deploys dark and release becomes a business decision, not a deployment event.
- Use ECS rolling deployments with health checks gating traffic, and take this service off the three-week release train.
- Verify with area-scoped regression rather than the whole-platform cycle, and watch error rates after rollout with automated rollback on alert.
SQL Server exit
Not applicableNo SQL Server dependency is recorded for this repo. Nothing to migrate.
Containerisation
Already containerisedIts pipelines already build containers and deploy to AWS. Nothing to do here.
Recommended actions
No specific actions for this repo. It either needs only normal maintenance, or its work is covered by an estate-level action. See the full programme.
Assessment notes
tc-payment-router
Purpose
Core of the AWS payments platform. The Payment Router API is what customers/TCs hit to execute payments: Phenix Retail or MyTC issue an initiate-session JWT, /Initiate/Session swaps it for a payment-session JWT (a Lambda authorizer validates tokens at the gateway), and the router then drives the session against the provider adapter APIs (Cybersource, BR-DGE, PciPal, Stripe, Dummy). Session lifecycle steps (authorise, capture, settle, cancel, decline, fraud-decline, expire, receipt-create, indexing, status updates, Stripe webhooks, API-key expiry notification) run as ~18 TypeScript Lambdas reacting to EventBridge events and DynamoDB streams. A Configuration Management API plus Angular 19 UI manages payment configuration.
Tech stack
43 of 46 C# projects on .NET 8 (one net6.0 client generator, netstandard2.0 models): ASP.NET Core, Serilog with a custom obfuscation/correlation logging stack, TC.Persistence.DynamoDB (V2 with V1 fallback), JWT token libraries with KMS signing, JSON canonicalizer/message-transport packages, StyleCop. Lambdas use AWS SDK v3 (dynamodb, dynamodb-streams, eventbridge, kms, sns, cloudwatch). UI is Angular 19 with Material.
Deployment
No classic release pipelines (release_count 0); four YAML pipelines on the shared InternalOSS/azure-pipelines-templates: build-containers.yml builds Router and ConfigurationManagement API containers (namespace finance-payments, ECS via aws-payments-tc-apps tfvars, functional area payments); build-node.yml ships the 18 Lambdas to tc-payments-function-artifacts; build-ng.yml builds the Angular UI to S3 with qa/staging/production configurations; build-packages.yml publishes the shared TC.Payments.* NuGet packages consumed by the paymentprovider-* repos.
Dependencies
Internal: TC.ConnectionBroker.* (tc-connectionbroker), TC.Exceptions.Contract (tc-exceptions), TC.Diagnostics.HealthChecks (tc-diagnostics-portal); runtime REST calls to the PSP adapters via their model packages — TC.Cybersource.Models (cybersource-api-integration), TC.PaymentProvider.Bridge.Models (paymentprovider-br-dge), TC.PaymentProvider.PciPal.Models (paymentprovider-pcipal), TC.PaymentProvider.Stripe.Models (paymentprovider-stripe) and the dummy provider (paymentprovider-dummy). TC.Quote.Payment.Reference and TC.Persistence.DynamoDB map to no included repo. External: Stripe webhooks, AWS EventBridge/DynamoDB/KMS/SNS, Cognito.
Data stores
DynamoDB payment-session persistence (TC.Persistence.DynamoDB, V2-with-V1-fallback repositories) with DynamoDB streams feeding the indexer/changes Lambdas; the EventBridge payments bus carries session events. No SQL Server or MongoDB.
Integration points
Inbound REST secured by session JWTs (Lambda token authorizer); outbound REST to the five provider adapter APIs over private *.private.payments.*.travelcounsellors.io endpoints; EventBridge for session lifecycle events; inbound Stripe webhook Lambda.
Code health
Strong: 17 test projects with ~1,137 xUnit facts/theories spanning API, application, logging, JWT, canonicalizer and TypeScript-integration layers, plus an integration-test project; a real README documenting the JWT auth flows; Backstage catalog-info.yaml; docs/card-payments-deprecation records the migration off the legacy card-payments system. Last commit 2026-06-19.
Modernisation risks
Low. Modern .NET 8/Angular 19/Node 20 with excellent tests and fully YAML/Terraform deployment. Watch-items: high fan-out — it is the hub coupling five PSP adapters, Phenix retail and MyTC JWT issuers, so contract changes ripple widely; 18 individually-deployed Lambdas plus two APIs and a UI in one repo make releases multi-pipeline affairs; and the Configuration Management API section of the README is still boilerplate.