I build paid subscriptions into the application. The problem is the inability to debug the application. In the developer console, the project is configured, released in alpha testing. In the downloaded application from the store with the alpha tester, purchases are made without problems.
But at the purchase stage in the debug version, an error occurs: "This version of the application does not work with the Google Play payment service." In this case, the version of the application is the same as the one in the console.
I found information that Google prohibits making payments from apps not installed from the Google Play store. But maybe someone has encountered such a problem and knows how to debug purchases in the debug versions of the application?
UPD: The documentation found that you can test with a "dummy" product id. But when the id changes, nothing changes. Link to the dock: https://developer.android.com/google/play/billing/billing_testing#billing-testing-static
Code:
val flowParams = BillingFlowParams.newBuilder() .setSku("android.test.purchased") .setType(BillingClient.SkuType.SUBS) .build() billingClient.launchBillingFlow(activity, flowParams)