Overview
Add a mock Paystack wallet funding mode so contributors can test investor wallet funding without using real Paystack keys.
Problem
The app currently needs Paystack configuration for wallet funding flows. External contributors should be able to develop and test the UI/API flow locally without maintainer secrets or real payment transactions.
Expected solution
Add support for:
ENABLE_MOCK_PAYMENTS=true
When mock payments are enabled:
- wallet funding requests should return a safe fake authorization/payment response
- no request should be sent to Paystack
- mock references should be clearly marked, for example
mock_wallet_<timestamp>
- the UI should still be able to continue the local development flow
Security notes
- Do not use real Paystack keys in tests.
- Do not commit Paystack secrets.
- Do not mock production behavior when
NODE_ENV=production unless explicitly configured by maintainers.
Files likely involved
app/api/payments/initialize/route.ts
- payment service/helper files if they exist
- wallet funding UI components
.env.example
- README or contributor docs
Acceptance criteria
ENABLE_MOCK_PAYMENTS=true skips real Paystack API calls.
- Local contributors can test wallet funding flow without a Paystack key.
- Production behavior remains unchanged when mock mode is disabled.
- Mock responses are clearly identifiable.
- Lint and build pass.
Suggested labels
payments, backend, developer-experience, good first issue
Difficulty
Beginner / Intermediate
Overview
Add a mock Paystack wallet funding mode so contributors can test investor wallet funding without using real Paystack keys.
Problem
The app currently needs Paystack configuration for wallet funding flows. External contributors should be able to develop and test the UI/API flow locally without maintainer secrets or real payment transactions.
Expected solution
Add support for:
When mock payments are enabled:
mock_wallet_<timestamp>Security notes
NODE_ENV=productionunless explicitly configured by maintainers.Files likely involved
app/api/payments/initialize/route.ts.env.exampleAcceptance criteria
ENABLE_MOCK_PAYMENTS=trueskips real Paystack API calls.Suggested labels
payments,backend,developer-experience,good first issueDifficulty
Beginner / Intermediate