Internal payment processing microservice for handling transactions, refunds, and ledger accounting.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpytestThe service is organized into focused modules under src/payments/:
- processor -- orchestrates payment lifecycle (authorize, capture, void)
- validator -- validates payment requests against business rules
- refund -- handles full and partial refund workflows
- models -- data models for payments, refunds, and ledger entries
- ledger -- transaction ledger and balance tracking
- utils -- shared formatting and helper functions
- Python 3.11+
- No external runtime dependencies (stdlib + dataclasses)
- pytest for testing