GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Stripe subscription integration for paid storage upgrades by rtibbles · Pull Request #5810 · learningequality/studio

Conversation

@rtibbles

@rtibbles rtibbles commented Apr 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

Adds Stripe subscription integration allowing users to purchase additional storage (1–50 GB at $15/GB/year). Uses Stripe Checkout Sessions for payment, Customer Portal for self-service management, and webhooks for lifecycle sync. Storage is additive to admin-granted quotas.

Environment-gated configuration (BRANCH_ENVIRONMENT) ensures non-production deployments automatically use Stripe sandbox keys — no risk of processing real payments on QA/staging.

Includes documentation at docs/stripe_integration.md covering setup, Stripe Dashboard configuration, and local dev workflow with make devserver-stripe.

stripe-upgrade-demo.webm

Reviewer guidance

Testing

  1. Set up a Stripe sandbox and configure STRIPE_TEST_SECRET_KEY, STRIPE_TEST_PRICE_ID env vars
  2. Run make devserver-stripe to start the dev server with webhook forwarding
  3. Navigate to Settings → Storage, select a GB amount, and complete checkout with card 4242 4242 4242 4242
  4. Verify storage total updates and subscription card shows active state
  5. Click "Manage Subscription" → cancel via the Customer Portal
  6. Verify the card shows "Subscription Canceling" with the end date

Risky areas

  • contentcuration/views/subscription.py — webhook handlers: verify idempotency and that customer.subscription.updated correctly syncs quantity after checkout
  • contentcuration/migrations/0166_add_usersubscription.py — new table, review schema
  • contentcuration/frontend/shared/mixins.js — bytesForHumans now shows 1 decimal for GB, 2 for TB instead of integers; affects all file size displays at GB+ scale

AI usage

Used Claude Code throughout. Reviewed Stripe best practices via their published AI skill, iterated on the implementation against those guidelines, and verified the UI in-browser using Playwright. Manually tested the full checkout, cancellation, and webhook flows against a Stripe sandbox.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rtibbles
rtibbles force-pushed the payment_processing branch 4 times, most recently from e42f75e to d8ea559 Compare April 2, 2026 05:17
@marcellamaki

marcellamaki commented Apr 2, 2026

Copy link
Copy Markdown
Member

So far preliminary testing is looking good. A few suggestions, although only one is blocking (and I have not done much code review, just doing a bit of manual QA for happy paths)

Blocking: The default 10 is the only number that works. I'm guessing there is a mismatch on the data type. manually entering any number (including 10) or using the increments doesn't work.

Screenshot 2026-04-02 at 10 57 03 AM

Not blocking: a nice UI improvement would be some small adjustment from "(x10)"/ "Quantity: 10" to (10GB) or something like that

Screenshot 2026-04-02 at 10 59 19 AM

Not blocking: If you have cancelled your subscription, but it hasn't yet expired, it still shows as active. It would be nice to include some slightly adjusted wording here like. "Your subscription will expire on [date]" if it's been cancelled.
And for active subscriptions, "your subscription will automatically renew on [date]"

Screenshot 2026-04-02 at 11 23 43 AM

Out of scope of this PR but should do: update all stripe branding assets to current

Screenshot 2026-04-02 at 10 58 03 AM

Question: if someone has 10 GB worth of storage and they cancel their subscription, what happens on the day after they stop paying for storage? (I am okay with "we will cross that bridge when we come to it" as a response for now. but. just wanted to ask so we can decide intentionally)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rtibbles
rtibbles force-pushed the payment_processing branch from d8ea559 to bee8581 Compare April 2, 2026 18:55
marcellamaki
marcellamaki reviewed Apr 2, 2026
View reviewed changes

@marcellamaki marcellamaki left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking (and impactful non-blocking) feedback resolved, and code is very readable/standard. i did not go over it with a super fine toothed comb but overall: readable, uses KComponents not vuetify, composables -- all good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread contentcuration/contentcuration/frontend/settings/pages/Storage/SubscriptionCard.vue
fetchSubscriptionStatus,
createCheckoutSession,
createPortalSession,
} = useSubscription();

@marcellamaki marcellamaki Apr 2, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay composable

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
MisRob
MisRob reviewed Apr 6, 2026
View reviewed changes
Comment thread contentcuration/contentcuration/frontend/settings/pages/Storage/SubscriptionCard.vue Outdated
</KButton>
</div>

<Banner

@MisRob MisRob Apr 6, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please use non-Vuetify replacement StudioBanner?

Note that there will be a visual difference compared to Banner ~ it's intentional.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
MisRob
MisRob reviewed Apr 6, 2026
View reviewed changes
Comment thread contentcuration/contentcuration/frontend/settings/pages/Storage/SubscriptionCard.vue Outdated
:style="{ backgroundColor: $themePalette.grey.v_100 }"
>
<div
v-if="loading"

@MisRob MisRob Apr 6, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For new loaders, could you use v-if="show('loader', loading, 400)" to align with https://design-system.learningequality.org/loaders#minimum-visible-time?

(old loaders in Studio don't have this, and some newer loaders use wrong value, but 400 is closest to the expected experience ~ we recently fine-tuned with Tomiwa)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@MisRob MisRob Apr 6, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an example which also has transition applied https://design-system.learningequality.org/usekshow#example

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
MisRob
MisRob reviewed Apr 6, 2026
View reviewed changes
Comment thread contentcuration/contentcuration/frontend/settings/pages/Storage/SubscriptionCard.vue
@click="handleUpgradeClick"
>
<span class="upgrade-btn-content">
<KCircularLoader

@MisRob MisRob Apr 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/learningequality/studio/pull/5810/changes#r3038962811

(not 100% sure, if I recall there may animation glitch if show applied directly on the loader component, so if you observe that ~ disableDefaultTransition on KCircularLoader should help, or maybe also applying show on the wrapping div / span)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@marcellamaki marcellamaki self-assigned this Apr 7, 2026
@rtibbles
rtibbles force-pushed the payment_processing branch 3 times, most recently from 2b57f0c to 7994fd8 Compare April 7, 2026 20:39
@rtibbles
rtibbles marked this pull request as ready for review April 7, 2026 20:39
@rtibbles
rtibbles force-pushed the payment_processing branch from 7994fd8 to b2344cb Compare April 7, 2026 22:45
@rtibbles @claude
Add Stripe subscription integration for paid storage upgrades
363d10d
Users can purchase additional storage (1-50 GB at $15/GB/year) via
Stripe Checkout, manage subscriptions through the Customer Portal,
and see their subscription status on the Storage settings page.

Environment-gated configuration ensures non-production deployments
use Stripe test/sandbox keys automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@rtibbles
rtibbles force-pushed the payment_processing branch from b2344cb to 363d10d Compare April 8, 2026 01:53
marcellamaki
marcellamaki approved these changes Apr 10, 2026
View reviewed changes

@marcellamaki marcellamaki left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, and infra is ready with the relevant updates per slack discussion

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

radinamatic reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@rtibbles
rtibbles merged commit 24a93eb into learningequality:unstable Apr 13, 2026
13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rtibbles
rtibbles deleted the payment_processing branch April 13, 2026 17:03
This was referenced Apr 28, 2026
Unstable - Settings > Storage - My storage is not upgraded after successful payment #5865
Closed
Unstable - Settings > Storage - Potential subscription issues #5870
Open
@rtibbles rtibbles mentioned this pull request May 13, 2026
2026.05.13 Release #5902
Merged
This was referenced Sep 21, 2026
Count subscription storage towards the upload quota #6157
Merged
Patch release v2026.09.21 #6160
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@MisRob MisRob MisRob left review comments
@marcellamaki marcellamaki marcellamaki approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@marcellamaki marcellamaki

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@rtibbles @marcellamaki @MisRob
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.