Changing from codelessIAP to coded IAP

I had a IAP system that was working fine for consumable products.
However, now I would like to add a subscription product which appears to add some complexity.
So I am attempting to change the system from codeless to using the IAPDemo.cs.
I added the products from the codelessIAP catalogue to the IAPDemo.cs using the builder.AddProduct section.

However, when I try to initiate a purchase now, i get an error saying that “Purchase is not initialized”.
But in the console, when i start the game,it states : Initializing UnityPurchasing via Codeless IAP

Any idea what I am doing wrong here?

Subscriptions are handled just like any other product purchase, there is no difference in the code. You can certainly add a Codeless IAP Button for a subscription. Please share a screenshot of your subscription as defined on your Google Play developer dashboard, and in your project. Also, be sure to be monitoring the device logs which is quite critical to successful IAP development. You might want to check out the Sample IAP Project here Sample IAP Project . There is more information on capturing device logs here How To - Capturing Device Logs on Android