TorbatYar/backend/services/payment/README.md
Mortezakoohjani 9fac160258 feat(payment): ship Torbat Pay MVP phases 14.0-14.5
Add independent payment-service (port 8012, payment_db) with foundation licensing, BYO-PSP, merchant accounts, idempotent requests, callbacks, and immutable ledger.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 17:57:04 +03:30

1.5 KiB
Raw Permalink Blame History

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