feat: organization wallet top-up by M-Pesa (#53, PR A) #161
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!161
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/partner-wallet-53"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Issue #53, PR A: an organization tops up its KWS wallet by M-Pesa.
topup_walletand tablewallet_topups(immutable link to the organization), guards on lines and tickets.POST /v1/orgs/{id}/wallet/top-ups(ewallet.top_up, idempotent,purchaserate class, KES 10 to 250,000 in whole shillings) andGET .../top-ups/{transaction_id}(ewallet.view).Settle; completion credits the organization wallet once (keytopup:<sale id>) throughpartnerwallet.Crediter, no tickets or purchase email. A late payment becomesrefund_dueand is refunded to the organization wallet./v1/me, and are excluded from admin sales reports and the Daily Invoice. Emailnotify.wallet_topupis sent by the worker.Review
Dual pass (ponytail complexity, then a fresh correctness review). Fixed test-first: top-ups counted as sales in four reports, checkout key shared across organizations, waive of a top-up, missing enum values.
Coverage
make cover: 91.4% (minimum 80%).make lint: 0 issues.Owner questions [verify]
M-Pesa and KES only; the limits; a late top-up is credited to the organization wallet; which roles may top up; Daily Invoice has no wallet-liability line for top-ups; no staff view of organization wallets; no statement export.
🤖 Generated with Claude Code