Question

Android Subscription Upgrade Error: "The device or user is not allowed to make the purchase."

  • 7 December 2023
  • 3 replies
  • 129 views

Badge +4

When trying to upgrade an existing Play Store subscription in our React Native mobile app, I often get a "The device or user is not allowed to make the purchase" error, and the upgrade fails. Eventually, using another payment method, the upgrade succeeds. I’m unsure if this is an error with my payment method, RevenueCat code, or something else.

Steps taken on a Samsung Galaxy A14 in a live production app with real purchases:

  1. Purchase sakura_gold_v1a:monthly-5-autorenewing subscription with Apple Card credit card info entered into Play Store - succeeds.
  2. Upgrade to sakura_diamond_v1a:montly-19-autorenewing subscription with Apple Card - fails. Retry - fails.
    1. Apple card shows no declined transactions that require approval
    2. Play Store app is up to date
    3. Play Store “Require authentication for purchases” is on
    4. Google payments activity shows Declined transaction
    5. Error logged in app:

    code: 3, 
    message: The device or user is not allowed to make the purchase.,
    name: Error,
    nativeStackAndroid: [],
    stack:
    Error: The device or user is not allowed to make the purchase.
    at promiseMethodWrapper (address at /data/user/0/fm.sakura.app/files/.expo-internal/8040753f6b5948fc51d31657dac2a821:1:68785)
    ...
  3. Upgrade to sakura_diamond_v1a:montly-19-autorenewing subscription with Paypal - succeeds.
    1. Snippet of receipt from Play Store

RevenueCat upgrade code (used for successful and failed upgrades):

const upgradeInfo: UpgradeInfo = {
oldSKU: oldSku,
prorationMode: isUpgrade
? PRORATION_MODE.IMMEDIATE_AND_CHARGE_PRORATED_PRICE
: PRORATION_MODE.IMMEDIATE_WITH_TIME_PRORATION,
}
const res = await Purchases.purchaseProduct(
productId.android,
upgradeInfo,
PURCHASE_TYPE.SUBS
)


Has anyone run into this issue before? Would like to understand what the cause is here to be sure other users don’t have this issue.

Thank you!


3 replies

Userlevel 4
Badge +8

Hi, the error “The device or user is not allowed to make the purchase” is coming from Google. This can occur when there are limitations on the device or user for making purchases, or on the simulator if Play Services is not properly installed.
 
One thing you can try is calling canMakePayments before calling purchasePackage/Product. This checks if billing is support for the user, and will hopefully catch most cases of that PurchaseNotAllowedError. The canMakePayments method will ensure the user is allowed to make purchases, or it may give a more robust error message than the one that Google sends for this error.

Badge +3

Hi @Haley Pace 

Note : Flutter Android App

We are experiencing an issue in production where approximately 10% to 20% of Android devices are unable to load products. The error we're encountering is as follows

PlatformException(10, Error performing request., {code: 10, message: Error performing request., readableErrorCode: NetworkError, readable_error_code: NetworkError, underlyingErrorMessage: Unable to resolve host "api.revenuecat.com": No address associated with hostname}, null)

Could you please provide some insight into what error code 10 signifies? It appears to be related to a network error, but we're not sure how to address it.

Thank you for your assistance.

 

 

Badge +2

Hi, the error “The device or user is not allowed to make the purchase” is coming from Google. This can occur when there are limitations on the device or user for making purchases, or on the simulator if Play Services is not properly installed.
 
One thing you can try is calling canMakePayments before calling purchasePackage/Product. This checks if billing is support for the user, and will hopefully catch most cases of that PurchaseNotAllowedError. The canMakePayments method will ensure the user is allowed to make purchases, or it may give a more robust error message than the one that Google sends for this error.

Are there any specific steps/checks the user can take/do to resolve the issue on their side? 

We’re seeing the same issue (Android, subscriptions). We’re going back and forth with users to try and debug this. Just today a user verified that their Play Service are up-to-date, payment method valid, able to perform purchases on other apps but in our app it results in 

The device or user is not allowed to make the purchase

This issues seems pretty widespread (judging by content on this forum related to this error and Google searches). 

Reply