W
Wasp5w ago
Sven

subscriptionplan and status question

I think i manually changed a subscription plan in the dtabase on accident, i set it to start. What should the value originally be in order to not mess with the user table i want to put it back to the correct value.is it null? Also in production i gave myselfe a subscription thorugh stripe but the subscription entries in the user table are not updated.
No description
8 Replies
kapa.ai
kapa.ai5w ago
Hi @Sven. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, it appears that the correct value for the subscription status should be undefined rather than null or start. According to a discussion in the Discord support thread (https://discord.com/channels/686873244791210014/1214979650803998781), one of the community members suggests:
2. drop the `hasPaid` flag and use `user.subscipritonStatus === undefined` to check if a user has or hasn't started a subscription
2. drop the `hasPaid` flag and use `user.subscipritonStatus === undefined` to check if a user has or hasn't started a subscription
ts user.subscriptionStatus = undefined | 'active' | 'past_due' | 'canceled' | 'deleted' `` This indicates that when a user hasn't started a subscription, the subscriptionStatus should be undefined. The other possible values are 'active', 'past_due', 'canceled', or 'deleted', depending on the state of the subscription. To fix your database, you should set the value back to undefined` for users who haven't started a subscription yet. However, please be cautious when manually editing the database, as it can lead to inconsistencies. It's generally better to use the application's built-in methods for managing subscription statuses to ensure all related data and processes are updated correctly. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Sven, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho5w ago
@Vinny (@Wasp) one for you
Sven
SvenOP5w ago
and also can i cancel a subscription through stripe dash and make sure the user does not have access anymore and database is updated accordingly?
Vinny (@Wasp)
Vinny (@Wasp)5w ago
@Sven the bot is wrong here. In wasp db studio set it to null I believe it will send a webhook event which your app should recognize But i'm not 100% certain. You'll have to try and see.
Sven
SvenOP5w ago
oh oka
Vinny (@Wasp)
Vinny (@Wasp)5w ago
if you do, check your webhook events in the dash and see what they say
Sven
SvenOP5w ago
okay wait i will come back to this in 30mins i have another questoin/case cool
Vinny (@Wasp)
Vinny (@Wasp)5w ago
if none are sent after some time, then you'll have to do it manually, but I assume they will send some kind of webhook
Want results from more Discord servers?
Add your server