TorbatYar/docs/phases/Payment/phase-14-9-reconciliation.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

72 lines
1.7 KiB
Markdown

# Phase 14.9 — Reconciliation & Accounting Integration
| Field | Value |
| --- | --- |
| Identifier | `payment-14.9` |
| Implementation Priority | **LATER** |
| Status | Planned |
| Service | `payment` |
| Depends On | `payment-14.5`, Accounting contract |
> Full specification: [payment-roadmap.md](../../payment-roadmap.md#phase-14-9--reconciliation--accounting-integration)
## Purpose
Reconcile PSP settlements with payment ledger; emit Accounting posting intents via API/events only.
## Business Scope
Settlement file import refs; exception handling; daily reconciliation shells.
## Technical Scope
ReconciliationRun, ReconciliationException, AccountingPostingIntent. AccountingClient mock.
## Dependencies
`payment-14.5`, optional `payment-14.7`, Accounting
## Out of Scope
Tax/e-invoice; automatic bank feeds.
## Capabilities
`payment.reconciliation`, `payment.accounting_integration`
## Permissions
`payment.reconciliation.view|run|manage`, `payment.accounting_intents.view`
## Events
`payment.reconciliation.started|completed`, `payment.reconciliation.exception.created`, `payment.accounting_intent.created`
## API Contracts
POST reconciliation-runs; GET exceptions; GET accounting-posting-intents
## Data Ownership
Payment owns reconciliation; Accounting owns vouchers.
## Provider Ownership
PSP settlement files via adapter or upload ref.
## Integration Rules
Idempotent posting intents; no JournalEntry in Payment.
## Quality Gates
Intent idempotency, no local journal tables.
## Definition of Done
Reconciliation run + accounting intent event; Accounting unchanged.
## Future Compatibility
Multi-PSP consolidated reconciliation; FX adjustment intents.