How ustaxcourt/ustc-payment-portal works
USTC Payment Portal is a service that accepts payment requests from USTC applications, authorizes them, and brokers SOAP calls to Pay.gov while tracking transaction state. The primary workflow is initiate a collection, redirect the user to Pay.gov, then process the returned token; clients can also fetch current payment details. The README documents these flows, while sampled source confirms the Lambda request boundary, permission lookup, fee resolution, SOAP transport, and persistence. Reporting and health capabilities are represented from the source tree; their internal wiring was not sampled.
Main entry points: lambdaHandler.ts Lambda API boundary · initPayment.ts Initiate payment · SoapRequest.ts SOAP request transport · TransactionModel.ts Transaction model
Components 16
API and access
- Lambda API boundary
src/handlers/lambdaHandler.ts - Caller identity
src/extractCallerArn.ts - Client permissions
src/clients/permissionsClient.ts - Request validation
src/utils/parseAndValidate.ts
Payment lifecycle
- Fee catalog
src/config/fees.ts - Initiate payment
src/useCases/initPayment.ts - Process payment
src/useCases/processPayment.ts - Payment details
src/useCases/getDetails.ts
Pay.gov integration
- SOAP request transport
src/entities/SoapRequest.ts
Transactions and reporting
- Transaction model
src/db/TransactionModel.ts - Transaction reporting
src/handlers
Health and operations
- Health checks
src/health
Other components
- USTC application
- Pay.gov
- Transaction database
- Paying user
Connections 19
- USTC application → Lambda API boundary: calls API
README.md - Lambda API boundary → Request validation: validates request
src/handlers/lambdaHandler.ts - Lambda API boundary → Caller identity: extracts caller
src/handlers/lambdaHandler.ts - Lambda API boundary → Client permissions: resolves client
src/handlers/lambdaHandler.ts - Lambda API boundary → Initiate payment: dispatches initiation
- Lambda API boundary → Process payment: dispatches processing
- Lambda API boundary → Payment details: dispatches details
- Initiate payment → Fee catalog: resolves fee
README.md - Initiate payment → Transaction model: records transaction
README.md - Initiate payment → SOAP request transport: starts collection
README.md - SOAP request transport → Pay.gov: sends SOAP
src/entities/SoapRequest.ts - Pay.gov → Paying user: redirects for payment
README.md - Process payment → SOAP request transport: completes collection
README.md - Process payment → Transaction model: updates transaction
README.md - Payment details → Transaction model: checks transaction
README.md - Payment details → SOAP request transport: refreshes pending status
README.md - Transaction model → Transaction database: queries and writes
src/db/TransactionModel.ts - Lambda API boundary → Transaction reporting: serves reports
- Lambda API boundary → Health checks: serves health checks