Skip to content

feat: add partial contribution support with top-up (#128)#433

Merged
JosephOnuh merged 1 commit into
JosephOnuh:mainfrom
Wisdom603:issue/128-partial-contributions
Jun 2, 2026
Merged

feat: add partial contribution support with top-up (#128)#433
JosephOnuh merged 1 commit into
JosephOnuh:mainfrom
Wisdom603:issue/128-partial-contributions

Conversation

@Wisdom603
Copy link
Copy Markdown

Closes #128

Changes

  • Migration: adds amount_paid_usdc (running total) and is_partial columns to contributions
  • Contribute route: accepts optional partialAmountFiat body param; initializes a Paystack payment for the partial amount
  • Top-up route: POST /api/v1/circles/:id/topup — pays remaining balance on a partial contribution
  • Paystack webhook: credits amount_paid_usdc per payment; only sets status = confirmed when fully paid
  • Scheduler: processDueCycles now skips payout if any active member has not yet confirmed their contribution

Acceptance Criteria

  • ✅ Member can pay partial amount
  • ✅ Remaining balance tracked (amount_paid_usdc)
  • ✅ Payout only proceeds when full amount collected
  • ✅ Top-up payment flow (/topup endpoint)

- Migration: add amount_paid_usdc and is_partial columns to contributions
- Contribute route: accept optional partialAmountFiat, initialize partial Paystack payment
- Top-up route: POST /api/v1/circles/:id/topup to pay remaining balance
- Webhook: credit amount_paid_usdc per payment, confirm only when fully paid
- Scheduler: gate payout on all active members having confirmed contributions
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Wisdom603 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@JosephOnuh JosephOnuh merged commit 79fe0b8 into JosephOnuh:main Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for partial contributions with top-up

2 participants