I am developing a desktop app where users will need to log in using their wix credentials. However, I only want this to be available to members with a paid subscription.
In the REST API I can find the endpoint for members, which is useless because it doesn’t seem to contain anything about their orders, subscriptions, permissions, or anything like that.
I can also find the endpoints for subscriptions, and pricing plans, but they are for configuring the subscription / pricing plan options, not for actually checking the subscription of an existing user, so they are also pretty much useless.
Is there really no way to check if a member is a paid subscriber? Am I perhaps looking at the wrong place?
If this is not clear (it is in developer preview so the docs are more limited), please feel free to ask in our Discord community in the dedicated headless channel. Devs on Wix
I don’t think the Get Order endpoint would work by itself since I would need to know the Order ID for that. But the List Orders endpoint might help with that:
Once the user logs in, I can call this to get a list of their orders, and go through them one by one to see if they have purchased this specific item, and when they have purchased it. Then I can use this information to figure out if their subscription is still active.
But honestly, this is all a rather convoluted way of doing it. Currently I’m leaning towards keeping a database of subscribers on my own server, and using the Order Started / Order Ended webhooks to keep it updated.
Hopefully the REST API will evolve to cover more use cases like this in the future!
Thank you for the detailed feedback. I’m glad you have a workaround now so you can keep building and I will report that this process is difficult back to the team so it can be improved in the future