TorbatYar/docs/phases/Payment/phase-14-7-split-settlement.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.6 KiB
Markdown

# Phase 14.7 — Split Payments & Facilitator Settlement
| Field | Value |
| --- | --- |
| Identifier | `payment-14.7` |
| Implementation Priority | **LATER** |
| Status | Planned |
| Service | `payment` |
| Depends On | `payment-14.5`, `payment-14.2` |
> Full specification: [payment-roadmap.md](../../payment-roadmap.md#phase-14-7--split-payments--facilitator-settlement)
## Purpose
Allocate captured funds across parties (marketplace sellers, branches) and emit facilitator settlement intents.
## Business Scope
Split rules (fixed/percent/remainder); settlement batch shells; marketplace multi-vendor.
## Technical Scope
PaymentSplitRule, PaymentSplitAllocation, SettlementBatch, SettlementBatchLine.
## Dependencies
`payment-14.5`, facilitator merchant (14.2)
## Out of Scope
Bank payout execution; Accounting journal creation.
## Capabilities
`payment.splits`, `payment.settlement_batches`
## Permissions
`payment.splits.manage`, `payment.settlement_batches.view|manage`
## Events
`payment.split.allocated`, `payment.settlement_batch.created|closed`
## API Contracts
CRUD split rules; POST settlement batches; POST close
## Data Ownership
Payment owns splits/batches; Accounting owns cash journals.
## Provider Ownership
Future payout rail adapters.
## Integration Rules
Allocations sum to captured amount; marketplace passes seller refs only.
## Quality Gates
Allocation math, batch invariants, tenant isolation.
## Definition of Done
Split on capture with settlement intent events.
## Future Compatibility
Cross-border split FX metadata.