docs(payments): a payments service of its own, Patreon first #26

Merged
dhkatz merged 1 commits from docs/payments-service into main 2026-11-20 19:38:02 +00:00
Owner

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.
dhkatz added 1 commit 2026-11-20 19:31:48 +00:00
docs(payments): a payments service of its own, Patreon first
Pull request / title (pull_request) Successful in 1s
CI / test (pull_request) Successful in 1m28s
CI / image (apps/api/Dockerfile, t5de-hub-api) (pull_request) Skipped
CI / image (apps/web/Dockerfile, t5de-hub-web) (pull_request) Skipped
ebe24f2f07
Payments move out of the hub into t5de-payments (its own repo, database and
secrets) to contain the risk. Patreon is the first way to pay: it's the
seller, so sales tax and VAT are its. Polar's acceptable use policy now
names YouTube downloaders, so it's only used on a written yes. No IMVU
credits, no Stripe or PayPal directly.

Music's paid tier sells hosting only: YouTube's limits are the same in both
tiers. Entitlements become a count (music.rooms) because a Patreon member
has one tier; the owner picks which rooms are paid.
dhkatz merged commit 02e8269d4d into main 2026-11-20 19:38:02 +00:00
dhkatz deleted branch docs/payments-service 2026-11-20 19:38:02 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: t5de/t5de-hub#26