feat: E6 — Monetization ## Goal Creators can earn. Spooool can take a - #356
Closed
fly-productivity-manager[bot] wants to merge 1 commit into
Closed
feat: E6 — Monetization
## Goal
Creators can earn. Spooool can take a #356fly-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_2f23754eb4e742d2a9853682fb9943dc]
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
spooool | 1b007e2 | Aug 24 2026, 08:38 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
editor | 1b007e2 | Aug 24 2026, 08:38 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
Good. The fix looks correct. Here's a summary of the E6 monetization state:
E6 Monetization — Implementation Review
The full monetization stack was already implemented. I found and fixed one correctness bug.
What was already complete
All the "Done when" criteria were wired up end-to-end:
account.ts— OAuth connect/callback at/api/account/polar/connectand/api/account/polar/callback; storespolar_organization_id,polar_account_id,polar_account_statusmonetize.ts—POST /api/channels/:username/membershipcreates Polar checkout;Channel.tsxrenders tier cardsmonetize.ts—POST /api/videos/:id/tipcreates checkout;Watch.tsxhas theTipButtoncomponent with custom-amount UI and tip_success toastpayouts.ts(3 endpoints) +Payouts.tsx— summary cards, transaction table, payout history merged from D1 + live Polar balanceplatform_fee_centsincreator_earningson everyorder.paidwebhookpolar-webhook.ts— Standard Webhooks HMAC-SHA256 verification, idempotent write topolar_ledger, best-effort write tocreator_earnings/creator_payoutsAccountSettings.tsx— Polar onboarding status gating, product link/remove form, earnings & tax disclaimerBug fixed (
polar-webhook.ts)creator_earnings.created_at,creator_payouts.created_at, andcreator_payouts.paid_atare TEXT columns in the schema. The webhook was writing raw integer ms-epoch values, which SQLite coerces to the string"1724568000000". While V8 handles that innew Date(), it's not spec-guaranteed and breaksORDER BYcorrectness if column type changes. Fixed to write ISO 8601 strings (new Date(nowMs).toISOString()).Also added:
polar_subscription_idis now extracted from the Polar order payload for membership renewal orders (the column existed in the schema but was never populated).What you need to configure (secrets, not code)
Tests
Opened automatically by fly-dev run run_2f23754eb4e742d2a9853682fb9943dc.