docs(payments): a payments service of its own, Patreon first (#26)
Rewrites the payments plan for a separate payments service, with Patreon as the first way to pay.
**docs/payments.md**
- **`t5de-payments` is its own service:** its own repo, Postgres database and secrets, at `payments.t5de.dev`, to contain the compliance risk. The hub and Music never hold a payment provider's key. Music reads entitlements (`GET /v1/entitlements/{sub}`), is told about changes over a signed back-channel call, and keeps the last answer it got.
- **Patreon first:** Patreon is the seller, so it handles sales tax and VAT.
- **Linking:** members link Patreon with OAuth (`identity`).
- **Tiers:** which tier gives how much is set in config in git.
- **Webhook:** the service checks its webhook exists and is set up right on every start, and fixes it if not. Requests are verified with `X-Patreon-Signature` (HMAC-MD5).
- **State:** after a webhook it re-fetches the member from Patreon, and a nightly sync of every member catches anything missed.
- **Grace:** access runs until `next_charge_date` plus 7 days.
- **Tokens:** Patreon rotates the creator token's refresh token, so the current pair is kept in the database.
- **Entitlements are counts** (`music.rooms` × N), because a Patreon member has only one tier. Moderators' grants (no money) come first, in phase 1.
- **Processors:**
- **Polar:** used only if their support says yes in writing. Its acceptable use policy names YouTube downloaders (#30) and circumventing other services' terms (#18).
- **Not used:** Stripe or PayPal directly (we'd be the seller), and IMVU credits.
**docs/music.md**
- **The paid tier sells hosting only.** YouTube limits are now the same in both tiers.
- **Tiers:** Room ($1.99, 1 room) and Rooms ($4.99, 3 rooms). The owner picks which rooms are paid. When the count drops, the most recently picked rooms go back to free first.
- The risks section and phase 3b point to t5de-payments.
Rewrites the payments plan for a separate payments service, with Patreon as the first way to pay.
**docs/payments.md**
- **`t5de-payments` is its own service:** its own repo, Postgres database and secrets, at `payments.t5de.dev`, to contain the compliance risk. The hub and Music never hold a payment provider's key. Music reads entitlements (`GET /v1/entitlements/{sub}`), is told about changes over a signed back-channel call, and keeps the last answer it got.
- **Patreon first:** Patreon is the seller, so it handles sales tax and VAT.
- **Linking:** members link Patreon with OAuth (`identity`).
- **Tiers:** which tier gives how much is set in config in git.
- **Webhook:** the service checks its webhook exists and is set up right on every start, and fixes it if not. Requests are verified with `X-Patreon-Signature` (HMAC-MD5).
- **State:** after a webhook it re-fetches the member from Patreon, and a nightly sync of every member catches anything missed.
- **Grace:** access runs until `next_charge_date` plus 7 days.
- **Tokens:** Patreon rotates the creator token's refresh token, so the current pair is kept in the database.
- **Entitlements are counts** (`music.rooms` × N), because a Patreon member has only one tier. Moderators' grants (no money) come first, in phase 1.
- **Processors:**
- **Polar:** used only if their support says yes in writing. Its acceptable use policy names YouTube downloaders (#30) and circumventing other services' terms (#18).
- **Not used:** Stripe or PayPal directly (we'd be the seller), and IMVU credits.
**docs/music.md**
- **The paid tier sells hosting only.** YouTube limits are now the same in both tiers.
- **Tiers:** Room ($1.99, 1 room) and Rooms ($4.99, 3 rooms). The owner picks which rooms are paid. When the count drops, the most recently picked rooms go back to free first.
- The risks section and phase 3b point to t5de-payments.
Co-authored-by: dhkatz <[email protected]>
This commit was merged in pull request #26.
This commit is contained in:
1 parent
b496714151
commit
02e8269d4d
2 files changed
+159
-109
No files matched your search
+22
-18
@@ -10,8 +10,8 @@ accounts there without making a T5DE account first; one can be added later witho
|
||||
## Goals
|
||||
|
||||
- **Cheap at scale**: listeners pull audio from a bandwidth-cheap host (Oracle Cloud's free tier to start), never
|
||||
through home or the relay. A paid tier priced near cost, billed through a payments backend shared with the hub
|
||||
(docs/payments.md).
|
||||
through home or the relay. A paid tier priced near cost, through a Patreon membership and a payments service of
|
||||
its own (docs/payments.md).
|
||||
- **Three things to play** to start (**Decided**): existing internet radio stations (a searchable list from
|
||||
radio-browser.info), the owner's own stream (bring your own), and a queue of songs found on YouTube. **More
|
||||
sources later** without reworking anything (Sources, below). Jamendo and Audius are out for now: Jamendo's API is
|
||||
@@ -255,14 +255,15 @@ both tiers, free with limits:
|
||||
|
||||
- **If YouTube breaks or has to go** (blocked, a takedown, a processor's demand), paid rooms keep everything they
|
||||
paid for, and it's switched off without refunds.
|
||||
- **What the pricing page sells** is music bot hosting, not "pay to play YouTube songs".
|
||||
- **Free YouTube is the trial**: people use it, reach the limits, and upgrade.
|
||||
- **What the pricing page sells** is music bot hosting, not "pay to play YouTube songs". YouTube's limits are the
|
||||
same in both tiers (**Decided**), so nothing about YouTube is for sale.
|
||||
- **The free tier is the trial**: people use it, want better audio or more listeners, and upgrade.
|
||||
|
||||
| | Free | Paid ($1.99 a month per room) |
|
||||
| | Free | Paid (Patreon: $1.99 a month for 1 room, $4.99 for 3) |
|
||||
| --- | --- | --- |
|
||||
| Rooms | 1 | One subscription per room |
|
||||
| Rooms | 1 | 1 or 3, by tier, on top of the free one |
|
||||
| Stations and own streams | Yes (direct where possible, so they cost nothing) | Yes |
|
||||
| YouTube search and queue | Short queue, a few songs an hour | Unlimited queue, longer songs |
|
||||
| YouTube search and queue | Fair-use limits: queue length, songs an hour, the longest song | The same |
|
||||
| Audio | 64 kbps | 128 kbps |
|
||||
| Listeners | A small cap (about 10) | Up to the room's capacity |
|
||||
| Saved playlists, scheduled playback | No | Yes |
|
||||
@@ -273,13 +274,16 @@ The free limits are what keep free YouTube affordable: it's always relayed (band
|
||||
(CPU), unlike direct stations. The bot also leaves free rooms when they're empty. Exact limits are settings, tuned
|
||||
once there's usage to look at.
|
||||
|
||||
Another way to pay, to check: **IMVU credits**, which every IMVU user already has. Buying a product we list in
|
||||
IMVU's shop (a "Music Pass") is the payment, and the bot checks the buyer owns it. No processor at all, but it
|
||||
depends on IMVU's rules for selling services and on how its credits cash out now; both to read before relying on it.
|
||||
IMVU credits aren't a way to pay (**Decided**, docs/payments.md).
|
||||
|
||||
The paid entitlement is `music.room` with the room as its scope (docs/payments.md, Entitlements). Pricing: about
|
||||
$1.99 a month per room (the most popular community bot starts at $4.99 for one room); on PayPal's micropayments
|
||||
pricing that loses about 19¢ to fees. A yearly price at a discount on top.
|
||||
**Paying** (**Decided**: Patreon first, docs/payments.md): a Patreon membership, linked to the person's account on
|
||||
payments.t5de.dev. A Patreon member has one tier, so tiers are room bundles: "Room" ($1.99 a month, 1 room) and
|
||||
"Rooms" ($4.99, 3 rooms); the most popular community bot starts at $4.99 for one room. After Patreon's 10% and
|
||||
processing, $1.99 is about $1.59. Yearly memberships at a discount once Patreon turns them on for the page.
|
||||
|
||||
The paid entitlement is `music.rooms`, a count (docs/payments.md, Concepts). The owner picks which of their rooms are
|
||||
paid on the room's page, up to the count. If the count drops (a lapse, a smaller tier), the most recently picked
|
||||
rooms go back to the free tier first, and the owner can swap which ones.
|
||||
|
||||
**One stream URL, many rooms.** The stream is plain HTTP, so anyone can paste a room's URL into other rooms (or any
|
||||
player), and they'll all hear it. Only the bot's own room has commands, but every extra listener costs bandwidth,
|
||||
@@ -324,9 +328,9 @@ published by CI like images. t5de-site moves from its copies to `@t5de/ui` when
|
||||
charging for it makes it commercial. Relaying stations and owners' own streams is the safest part. Search providers
|
||||
stay pluggable, so a licensed one can replace or join YouTube.
|
||||
- **Payment processors**: Stripe and the merchants of record forbid selling services that infringe copyright, and
|
||||
review what they're selling. A paid service built on YouTube's audio can get the merchant account closed, with
|
||||
funds held. Music's merchant account is kept separate from T5DE's (docs/payments.md), so that can't take the hub's
|
||||
payments with it.
|
||||
Polar's rules name YouTube downloaders outright. A paid service built on YouTube's audio can get the account
|
||||
closed, with funds held. Patreon is used, selling hosting only, and payments are a service of their own
|
||||
(docs/payments.md), so a closed account can't take the hub or Music down with it.
|
||||
- **YouTube from a datacenter**: yt-dlp from cloud IPs is often blocked ("confirm you're not a bot") and needs a
|
||||
token provider, a JavaScript runtime and sometimes an account's cookies; it's also against YouTube's terms. Paying
|
||||
users will expect it to work, so the operator setting that turns it off, and the status page, matter more.
|
||||
@@ -347,7 +351,7 @@ published by CI like images. t5de-site moves from its copies to `@t5de/ui` when
|
||||
DJs, bans, the stream URL. Infra: its stack and Postgres on t5de-apps, music.t5de.dev.
|
||||
3. **Music, playing**: streamer with stations (relayed) and own streams, the bot with commands and permissions,
|
||||
config sync. **Beta** (free tier).
|
||||
3b. **Payments** (hub, docs/payments.md phases 1-2): entitlements, Music's processor, checkout; the paid tier.
|
||||
3b. **Payments** (t5de-payments, docs/payments.md phases 1-2): entitlements and grants, Patreon; the paid tier.
|
||||
4. **Search and queue**: content providers and the audio cache, the YouTube provider from HorizonRadio, MusicBrainz
|
||||
metadata, `!play`, the queue page. (Phase 3's stations and own streams are already live providers.)
|
||||
5. **Accounts, later**: merging basic into member accounts, `user.merged`, third-party OIDC clients (console,
|
||||
@@ -355,5 +359,5 @@ published by CI like images. t5de-site moves from its copies to `@t5de/ui` when
|
||||
|
||||
## Open decisions
|
||||
|
||||
- The free tier's exact limits, and the yearly price (Paid tier, above).
|
||||
- The free tier's exact limits, and YouTube's fair-use limits (Paid tier, above).
|
||||
- Direct mode's details, once phase 0 has found the call that sets a room's radio and On Air.
|
||||
Reference in new issue
Block a user