Sorry for the weird format of my title, I hope it accurately explains my problem. I'm trying to create 3 subscription plans: Monthly, Yearly and Lifetime.
I was able to create the Monthly and Yearly plans on but I can't figure out how to add a lifetime plan (aka a one-time payment that grants the subscription forever).
The only workaround I could think of is to simply use Monthly and Yearly for recurring payment and to create a different product for the lifetime plan, but that bothers me a little that I have to add the extra logic in my code to check if the client has bought the lifetime subscription product. Is there another way that would make it so the lifetime subscription would be the same product ?
The only workaround I could think of is to simply use Monthly and Yearly for recurring payment and to create a different product for the lifetime plan,
That is exactly how you do it.
Is there another way that would make it so the lifetime subscription would be the same product ?
No. What you describe above is precisely how it is done.
but that bothers me a little that I have to add the extra logic in my code to check if the client has bought the lifetime subscription product.
I don't mean to bring you bad news but if you are "bothered" by that - I might suggest dropping the project.
Unfortunately you will find that there is a truly incredible amount of work to do, to achieve subscriptions and purchases.