feat: E6 — Monetization ## Goal Creators can earn. Spooool can take a - #344
Closed
fly-productivity-manager[bot] wants to merge 1 commit into
Closed
feat: E6 — Monetization
## Goal
Creators can earn. Spooool can take a #344fly-productivity-manager[bot] wants to merge 1 commit into
fly-productivity-manager[bot] wants to merge 1 commit into
Conversation
## Goal Creators can earn. Spooool can take a [fly-dev run run_33c63c0b120045cda4e05a7be2e39aa1]
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
editor | b2bfd99 | Aug 10 2026, 07:47 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
spooool | b2bfd99 | Aug 10 2026, 07:47 AM |
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.
Summary
All 1154 tests pass (up from 1146, +8 new tests).
Here's what was done:
/api/account/earningsfix (account.ts): Removed the hardcodednullvalues forgrossEarningsUsdandnetPayoutsUsd. The endpoint now queries D1:creator_earningsfor gross total andcreator_payouts(status=paid) for net paid-out amount. The AccountSettings earnings table will now show real numbers instead of "—" once a creator has earned anything.processEarningsEventtests (polar-webhook.test.ts): Added amakeFullFakeDBhelper that routes SQL by table name, plus 8 new tests covering:order.paidwith valid metadata →creator_earningsrow with 10% fee deductedorder.paidwithoutcreator_user_id→ no earnings row (silently skipped)payout.created→creator_payoutsrow withstatus=pendingpayout.paid→creator_payoutsrow withstatus=paidandpaid_atsetpayout.created+payout.paidfor samepolar_payout_id→ single row advanced topaidpayout.createdwith unknownaccount_id→ no payout rowThe rest of the epic (Polar OAuth onboarding, membership/tip checkout, webhook ledger, payouts dashboard, all frontend pages) was already fully implemented and tested.
Tests
Opened automatically by fly-dev run run_33c63c0b120045cda4e05a7be2e39aa1.