Struggling with subscriptions on Google Play

I’m using cordova-plugin-purchase@13.9.0 and METEOR@2.13.3. It works for subscriptions on the Apple store, but I can’t get it to work on Google Play.

Specifically, it won’t load the subscription products:

[CdvPurchase.Adapters] INFO: GooglePlay products loaded: [{"isError":true,"code":6777012,"message":"Product with id supporter_1m not found.","platform":"android-playstore","productId":"supporter_1m"}

but it loads a test “consumable” product just fine:

[CdvPurchase.GooglePlay] DEBUG: Loaded: [{"productId":"test2","title":"Test (Bomad kids money tracker)","name":"Test","description":"Test","product_type":"inapp","product_format":"v11.0","formatted_price":"$0.99","price_amount_micros":990000,"price_currency_code":"USD"}]

The subscription definitely exists and appears to be configured correctly. I tried another payments library called RevenueCat and it managed to import the subscriptions just fine:

I don’t want to switch libraries at this point. I suspect it’s just something small that needs fixing, but I can’t figure out what.

Any ideas or suggestions on how to debug this? What libraries are others using for subscriptions?

I’ve also posted an issue on the cordova-plugin-purchase GitHub with a bit more detail: Not found error for PAID_SUBSCRIPTION, CONSUMABLE works fine (Google Play) · Issue #1499 · j3k0/cordova-plugin-purchase · GitHub

Aaargh, the problem was me setting the type to CdvPurchase.PAID_SUBSCRIPTION instead of CdvPurchase.ProductType.PAID_SUBSCRIPTION

I think it should work now, at least the products are loading.

I can confirm that it’s working now.

Just FYI: subscriptions purchases work quite well on both Apple App Store and Google Play using cordova-plugin-purchase - npm

2 Likes