Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Api: Return information about user subscription in user resource #43

Open
EkimoCode opened this issue Sep 12, 2023 · 2 comments · May be fixed by #62
Open

Api: Return information about user subscription in user resource #43

EkimoCode opened this issue Sep 12, 2023 · 2 comments · May be fixed by #62
Assignees

Comments

@EkimoCode
Copy link
Collaborator

The problem: the user might have canceled the subscription and the end of the period not be premium. the frontend does not know this and doesn't know where to show an "unsubscribe" or "renew subscription".

Suggested solution: add that information in the User resource (get api/User)
I would go with User.EndOfCurrentTime from subscription and User.HasCancelled a new bool property of subscription.
As we are at this point let's go to the end and share also SubscriptionStatus from

@ElSalvo96
Copy link
Member

The renewed subscription is a new subscription. If the user is premium I don't insert anything, if the user is not premium I call stripe intent!

What type of control needs to be made in the frontend? I have just the information if the user is premium or not. We don't need anything else.

@TouchySpidey TouchySpidey linked a pull request Oct 4, 2023 that will close this issue
@TouchySpidey
Copy link
Collaborator

This PR became relevant
GenesiAI/PluginsWebPortal#137

as linked branch will be merged, user info will be as follows

public class UserInfo
{
    public bool IsPremium { get; set; }
    public DateTime? ExpireDate { get; set; }
    public bool? IsAutoRenewActive { get; set; }
    public ChatData ChatData { get; set; } = null!;
}

@ElSalvo96 ElSalvo96 added this to the Payments and premium milestone Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants