I am using RevenueCat for in-app purchases in my app. I am using this code for upgrading the subscription:
private fun upgradePackage(packageToBuy: Package, upgradeInfo: UpgradeInfo) {
Purchases.sharedInstance.purchasePackageWith(
requireActivity(),
packageToBuy,
upgradeInfo,
onError = { error, _ ->
viewModel.onUpgradeError(error)
},
onSuccess = { _, purchaserInfo ->
viewModel.onUpgradeSuccess(purchaserInfo)
})
}
It was working fine but recently I am getting an error:
E/[Purchases] - ERROR: ‼️ BillingWrapper purchases failed to update: DebugMessage: The subscription can't have the first charge for free.. ErrorCode: DEVELOPER_ERROR.null E/[Purchases] - ERROR: ‼️ One or more of the arguments provided are invalid.
As per billing client documentation, we get DEVELOPER_ERROR when:
Invalid arguments provided to the API. This error can also indicate that the application was not correctly signed or properly set up for In-app Billing in Google Play, or does not have the necessary permissions in its manifest.
What does this error message "The subscription can't have the first charge for free." imply? The method used to work before, just stopped working recently. Even the old tested version of my app stopped working now. I've tested in 3.1.1, 4.1.0, 4.2.0 versions of RevenueCat.