Add admin Payouts section with failure tracking and manual retry#439
Merged
Conversation
Adds a Filament resource for plugin payouts showing plugin, customer, amounts, and payout status. Records every transfer attempt (with the Stripe error on failure) in a new plugin_payout_attempts table, stores the latest failure reason on the payout, and adds a Retry Payout action that resets the payout to pending and re-dispatches the transfer job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- New admin Third-Party Sales screen showing every paid third-party plugin sale with its payout status and a Missing badge for orphans - Payouts are now always created at sale time; Held when the seller's Stripe Connect account can't yet receive payouts, healed to Pending by the daily payouts:process-eligible run - Remove the Ultra/Max 0% platform fee rule; splits always respect the developer account's payout percentage - New payouts:backfill command (with --dry-run) to create missing payout records for historical sales Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
July 23, 2026 00:34
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.
What
Adds a Payouts section to the Filament admin (under Products) for monitoring third-party plugin sales payouts.
List view
Detail view
Failure tracking (new)
We previously only logged Stripe transfer errors — they weren't stored. Now:
plugin_payoutsgainsfailure_reason,attempt_count, andlast_attempted_atplugin_payout_attemptstable records each attempt (success or failure) with the charge ID and error message, e.g.The currency of source_transaction's balance transaction (usd) must be the same as the transfer currency (eur)StripeConnectService::processTransfer()persists these on every attempt; a successful transfer clears the failure reasonManual retry
A Retry Payout button (list row + detail header, visible only for failed payouts) resets the payout to pending and immediately dispatches
ProcessPayoutTransferonto the queue.Why
Failed payouts were only visible in logs, making it hard to see which sellers hadn't been paid and why. This gives admins visibility into every payout's state and history, plus a one-click retry once the underlying issue (e.g. currency mismatch) is fixed.
Tests
StripeConnectPayoutFailureTest— failure reason + attempt persisted on error; succeeded attempt recorded on successPluginPayoutResourceTest— list/detail rendering, amounts shown, status filter, attempt history, retry action dispatches the job and resets status, retry hidden for transferred payouts🤖 Generated with Claude Code