Repository navigation
feat(flutterwave): in-admin payout onboarding and cart discounts - #104
Closed
alexasomba wants to merge 14 commits into
Closed
alexasomba wants to merge 14 commits into
alexasomba wants to merge 14 commits into
Conversation
…able Real test-mode run (24 Nov 2026): GET /v3/refunds answers 400 unauthorized on a key that can create refunds. Degrade the duplicate check to a logged warning for that case, log a failed disbursement, and add fixtures from the real verify and refund responses.
Author
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 set described in #97. Item 7. Builds on #98, #102 and #103 (the core payout-onboarding seam). Review those first.
What
In-admin vendor payout onboarding. The package now implements the three optional provider methods from #103:
listPayoutBanks→GET /v3/banks/{country}; maps{ code, name }and drops malformed rows.resolvePayoutAccount→POST /v3/accounts/resolvewithaccount_number+account_bank; returns the account holder's name.createPayoutAccount→POST /v3/subaccountswith the documented fields (account_bank,account_number,business_name,business_email,business_mobile,country,split_type,split_value, optional contact fields andmeta). Returns theRS_…id, resolved name, bank and masked last four.The Vendors page now shows the whole flow: country → bank → account number → Verify account → business details → default split → Create payout account. The full account number is never stored. A manually created
RS_…id can still be pasted.Cart discounts.
capabilities.couponsis nowtrue. Flutterwave charges the discounted total core computes; no provider-side coupon object is needed. The previousfalsemade core refuse any discounted cart.Split defaults. The create-subaccount API accepts a default
split_typeofpercentageorflat. The form exposes both. DashCommerce still overrides the default on every payment withflat_subaccount+ the exact vendor amount, so the shares stay exact; the default is only the fallback for payments made outside DashCommerce.API facts checked
GET /v3/banks/{country}→{ code, name }.POST /v3/accounts/resolve→{ account_number, account_name }.POST /v3/subaccountsrequiresaccount_bank,account_number,business_name,country,business_mobile,split_value(andbusiness_emailin practice);split_typeis optional. Response includessubaccount_id,full_name,bank_name,account_bank,id.meta(SWIFT/routing/branch) is supported by the provider method but not collected by the form yet; the README says to add it via the API until the form covers those countries.Live test-mode evidence (24 Nov 2026)
listPayoutBanks("NG"){ code: "560", name: "Page MFBank" }resolvePayoutAccount("0690000033", "044")Bale GarycreatePayoutAccount(...)RS_043B…, nameBale Gary,ACCESS BANK NIGERIA, masked••••0033DELETE /v3/subaccounts/27717→Subaccount deletedTests
Still to do
meta.split_settlement_info(next item).metain the form.