tylerjrichards / st-paywall

A python package for creating subscription Streamlit apps
MIT License
235 stars 46 forks source link

Multiple subscription options #38

Closed marcosberghahn closed 9 months ago

marcosberghahn commented 9 months ago

Hello Everyone. Fist, congrats on an amazing job I was looking for something like st-paywall for some time.

Do you have in ming already a way to validate the stripe plan the user subscribed to? Maybe we can include that information as well in the session state.

tylerjrichards commented 9 months ago

oooo that's pretty interesting, so I think you're right, right now i'm assuming that the stripe account just has one plan. I can pass the information back in session state, or I can set an optional param that specifies that subscription option.

I havent touched this project in a few weeks because I was publishing a book, but I think this is up there for something I can hack on this week

marcosberghahn commented 9 months ago

Right now I'm resolving my need here with this line, but probably we should return a clean array with the stripe product ids (since you can have more than one plan), or something like that. Hope it helps.

Screenshot 2023-10-24 at 17 46 19

And congrats on the Book! By the way, so cool Fanilo's video about it 😎

sfc-gh-trichards commented 9 months ago

yeah that's a great idea, or even the ability to filter to a specific subscription in is_active_subscriber would be good enough too. That way, the developer could optionally filter, but wouldn't have to write any extra code other than adding a new param

tylerjrichards commented 9 months ago

Ok this is now closed too!

tylerjrichards commented 9 months ago

forgot to mention this, but on 0.1.6 you should have all the requested features

xMath7 commented 1 month ago

@marcosberghahn , Were you able to add more than one type of subscription? if yes, how? example: I have a monthly and annual subscription. How to specify to make the selection clear for him?