Acceptance and test plan
Status: MVP quality gates to refine with engineering, finance and payment partner.
Test layers
| Layer | Examples |
|---|---|
| Unit | State transition guards, fee calculations, consent scope, retry classification |
| Integration | Prisma transactions, outbox delivery, webhook deduplication, provider adapter |
| Contract | Merchant API OpenAPI, webhook schemas, partner sandbox compatibility |
| End-to-end | Bill submission through collection, settlement, payout and merchant invoice |
| Financial | Journal balancing, payout allocation, reversals, statement reconciliation |
| Security | Tenant isolation, privilege escalation, MFA, token exposure, webhook spoofing |
| Resilience | Provider timeout, worker crash, duplicate jobs, reordered events, outage |
| Operations | Manual exception review, audit evidence, backup restoration, incident alert |
Must-pass financial scenarios
- Replayed merchant bill submission never creates a second bill.
- Two workers racing to collect one bill cannot both initiate payment.
- Timeout followed by success webhook resolves to one successful attempt.
- Delayed failure webhook cannot overwrite a confirmed success.
- Consumer revocation prevents future attempts.
- Retry does not bypass network or mandate limits.
- Payout only includes settled eligible funds and excludes held/reserved amounts.
- Concurrent payout jobs cannot double allocate the same collection.
- Payout return creates a reconciled exception and reverses reservation appropriately.
- Chargeback after payout is recorded without rewriting historic journal entries.
- Merchant receives full bill amount; fee invoice is separate.
- Cross-merchant API requests cannot access another merchant's bill or payout.
- Every journal balances per currency; all external financial events are traceable.
- Provider statement and bank account reconciliation identifies missing/duplicate lines.
- Backup/restore and event replay preserve financial integrity.
Pilot launch gates
Signed partner contracts and legal review; approved mandate and customer communications; documented financial controls; passing automated tests; security assessment; live operations runbook; tested reconciliation; incident response ownership; agreed dispute and refund handling. A passing CI build alone is not sufficient to launch live payments.