Full code for mora.stream, the "Twitch.tv for academic researchers". The streaming platform served several thousands of concurrent viewers. This has now been acquired and absorbed by Cassyni.
NOTE: for now, checkout session is hosted on Stripe. Later, we will write the checkout page ourselves and integrate it in an overlay.
Credit tech
[x] DB Table for credits for channels + column for talks
[x] Credit repository
[x] Creditservice.tsx
Cash tech:
[x] Stripe: 8 products (product 1 and 2 with subscriptions/ per event for big/small)
[x] Create PaymentService with createSession
[x] Create endpoints on Flask to get each sessionId for each products (call API)
[x] Create "Payments", "Subscriptions", "Products" db
[x] Add "success" and "failed" view
[x] Add webhook for renewable for Stripe
[x] (Self note: check /home/cloud-user/test/stripe/gold for ID management from CheckoutSession to invoicePaid to ManageSubscription; find common id between 3)
[x] Webhook for new credits / new active subscription
NOTE: for now, checkout session is hosted on Stripe. Later, we will write the checkout page ourselves and integrate it in an overlay.
Credit tech
Cash tech:
UX:
Testing and integration:
[x] Test subscription creation works
[x] Test suscription cancellation works (removed from DB + removed from Stripe)
[x] Check "payment is declined" is handled
[x] Check "payment requires authentication" is handled
[ ] Disable test mode + add products in stripe + update stripe_prod_id in DB
[ ] Test everything working with real api key (not test ones)
Personal notes:
on-going debugging:
Sub lifecycle
How to get CLI working: https://stripe.com/docs/stripe-cli
Test mode: