How to tell InAppPurchase2 to use the offer? store.order() only takes product_id and an additionalData object. How to pass the offer id? Is it possible in additional params?
Ok, found the solution: "cordova-plugin-purchase": "^13.0.0" is needed. And "@awesome-cordova-plugins/in-app-purchase-2" which is kind of an interface for "cordova-plugin-purchase": "^11.0.0" is outdated.
When using version 13 of "cordova-plugin-purchase" with plain javascript (no other library), you get the offers in the product object and can order it with something like store.order(product.offers[0]).
What it the official best practise way of purchases in a Capacitor app? Why do I still have to use a cordova plugin?
EDIT: Oh, just realized the CapGo plugin is using RevenueCat. I switched to RevenueCat after trying the plugin you are trying. RevenueCat provides a Cordova plugin which is working fine for me in Capacitor 4.
@twestrick Thank you. This Cap-go/Revenuecat way seems to be the best way for today. I would use it if I would start from the beginning. But it has drawbacks, too. Its another service in the chain of an app.
Yeah, I had everything developed with the plugin you are using but ended up ripping it all out and switching to RevenueCat. Sure it is another service, but from my standpoint, I’d rather focus on the core features of my app and not have to worry about maintaining all the intricacies of subscriptions.
Do you have any suggestion to migrate to RevenueCat. We already have several 2 hundred subscriptions using the mentioned plugin and using its validator services. Many time the validator service is down too. I However, I dont know if you had to migrate old subscriptions. So we will appreciate any inputs to help us to migrate. We have not found this type of information on the web. Thanks in advance
I was fortunate to start with RevenueCat when we launched the app so we didn’t need to migrate anything over. However, RevenueCat has documentation for you!