Repository navigation
feat(core): make split refunds explicit - #112
Closed
alexasomba wants to merge 8 commits into
Closed
alexasomba wants to merge 8 commits into
alexasomba wants to merge 8 commits into
Conversation
createVendor stored stripeAccountId: "" and the field has a unique index, so the second vendor failed. The field is now optional and omitted when there is no Stripe account; a missing field is NULL. Also documents the coupon rule for split allocations (the platform absorbs a cart-wide discount; a larger one is a 409) and makes the allocation comments generic for Paystack.
This was referenced Nov 25, 2026
Author
|
Folded into #105. No review had started, so the split-refund guard now ships with split settlement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the Flutterwave follow-up in #97. Stacked on #105 (split settlement); merge after it.
Why
A split payment cannot always be refunded through the provider from DashCommerce. Flutterwave answers a split refund with
400 "Refund request successfully logged"and no refund id, so the order cannot be marked refunded. Stripe Connect refunds do work, but the money comes from the platform balance and vendor shares are not clawed back.Today the admin refund panel does not say either of those things. This makes the limit explicit and stops the provider call when it cannot work.
What
PaymentProviderCapabilities.splitRefunds: optional. Missing means yes (existing Stripe behaviour).falsemeans the provider cannot refund a split charge.refundOrderchecks it whenorder.providerSplitsis present and refuses before loading credentials or calling the provider:"<Provider> cannot refund split payments from DashCommerce. Refund this order in the <Provider> dashboard."splitRefunds: falsein feat(flutterwave): Flutterwave payment provider package #107.Tests
splitRefunds: falseis refused before the call and writes no refund row; a provider that does not declare it keeps the existing behaviour and refunds.Notes