TorbatYar/backend/services/payment
Mortezakoohjani 0d424c500a feat(platform): complete commercial runtime consolidation
Unify commercial runtime ownership across backend and frontend so platform, experience, and hospitality modules use the shared commercial source of truth.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 11:11:53 +03:30
..
alembic feat(payment): ship Torbat Pay MVP phases 14.0-14.5 2026-07-27 17:57:04 +03:30
app feat(platform): complete commercial runtime consolidation 2026-07-29 11:11:53 +03:30
scripts feat(payment): ship Torbat Pay MVP phases 14.0-14.5 2026-07-27 17:57:04 +03:30
alembic.ini feat(payment): ship Torbat Pay MVP phases 14.0-14.5 2026-07-27 17:57:04 +03:30
Dockerfile.dev feat(payment): ship Torbat Pay MVP phases 14.0-14.5 2026-07-27 17:57:04 +03:30
pytest.ini feat(payment): ship Torbat Pay MVP phases 14.0-14.5 2026-07-27 17:57:04 +03:30
README.md feat(payment): ship Torbat Pay MVP phases 14.0-14.5 2026-07-27 17:57:04 +03:30
requirements.txt feat(payment): ship Torbat Pay MVP phases 14.0-14.5 2026-07-27 17:57:04 +03:30

Torbat Pay — Enterprise Payment Platform

Independent, tenant-isolated payment microservice (Torbat Pay) implementing phases 14.014.5 (MVP).

Field Value
Service payment-service
Version 0.14.5.0
Port 8012
Database payment_db
API prefix /api/v1
OpenAPI /docs (FastAPI auto-generated)

Capabilities (14.5)

  • Foundation: workspaces, L2 bundles, L3 toggles, provider assignments, audit, outbox
  • BYO-PSP: connections, routing, mock adapter + health test
  • Torbat Pay Merchant: merchant account lifecycle
  • Payment requests: idempotency, mock redirect, credit ref fields (nullable)
  • Callbacks: signature verify, replay protection, verify API
  • Ledger: immutable transactions + append-only ledger entries

Reserved (not implemented)

  • CREDIT_PROVIDER payment source → Torbat Credit (422 until bundle + service exist)
  • Refunds, splits, connectors, reconciliation (phases 14.6+)

Local development

cd backend/services/payment
pip install -e ../../shared-lib
pip install -r requirements.txt
pytest app/tests -q

Migrations

Alembic head: 0006_phase_145_ledger

python scripts/ensure_db.py && alembic upgrade head

Documentation