Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic stripe portals per organization #236

Open
2 tasks
elboletaire opened this issue Nov 26, 2024 · 0 comments
Open
2 tasks

Dynamic stripe portals per organization #236

elboletaire opened this issue Nov 26, 2024 · 0 comments
Labels

Comments

@elboletaire
Copy link
Member

Our current stripe integration links the account paying the subscription with stripe, making this account the only one able to manage the subscription.

Stripe has a way to create portal sessions, allowing us to not just remove the screen in the middle asking for a login, but also allow any organization admin to manage the organization subscription.

Integrate customer portal: https://docs.stripe.com/customer-management/integrate-customer-portal#redirect
Create customer portal sessions via the API: https://docs.stripe.com/api/customer_portal/sessions/create

Since we've been creating stripe clients using the e-mail, we'll have to take into consideration how to migrate or treat new accounts, without losing the subscriptions which are already working.

Since customers require an e-mail, and the new identifier may be the organization public address, this should not be a problem. We should be able to simply add the address as a customer metadata, and maintain the email of the person who payed that subscription for the first time both for backwards compatibility and for data coherence.

The process should be quite straightforward:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant