Skip to content

Add per-account payout percentage to developer accounts#364

Merged
simonhamp merged 1 commit intomainfrom
add-payout-percentage
Apr 15, 2026
Merged

Add per-account payout percentage to developer accounts#364
simonhamp merged 1 commit intomainfrom
add-payout-percentage

Conversation

@simonhamp
Copy link
Copy Markdown
Member

Summary

  • Adds a payout_percentage column (unsigned tinyInteger, default 70) to the developer_accounts table
  • Invoice payout logic now reads the developer account's payout_percentage instead of the hardcoded PLATFORM_FEE_PERCENT constant
  • Ultra subscriber purchases still override to 100% developer payout (0% platform fee) for third-party plugins
  • Displays the payout percentage in the Filament admin panel on the user resource

Test plan

  • Default payout percentage is 70%
  • platformFeePercent() correctly returns the inverse (100 - payout_percentage)
  • Custom payout percentage (e.g. 80%) results in correct platform fee on purchase
  • Ultra subscriber override still gives 100% to developer regardless of custom percentage
  • Developer with 100% payout percentage gets full amount
  • Existing payout tests (MaxSubscriberPayoutTest, PluginPayoutTest) still pass

🤖 Generated with Claude Code

Store a configurable payout_percentage (default 70) on each developer
account so platform fees can be adjusted per developer. The invoice
paid job now reads this value instead of the hardcoded constant,
while Ultra subscriber purchases still override to 100% developer payout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonhamp simonhamp marked this pull request as ready for review April 15, 2026 07:26
@simonhamp simonhamp merged commit 2a603d7 into main Apr 15, 2026
2 checks passed
@simonhamp simonhamp deleted the add-payout-percentage branch April 15, 2026 07:30
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.

1 participant