Solved

Android trial period not showing in payment sheet for React Native app

  • 30 July 2021
  • 3 replies
  • 600 views

Badge +4

Hello we have tried both options but Trail priod is not working

 

doPurchase = async () =>{
try {
await Purchases.purchaseProduct("gold_299_pf", null, Purchases.PURCHASE_TYPE.SUBS);
}catch (error) {
console.log(error)
return
}
}
=================
doPurchase = async () =>{
 
console.log("testng");
 
try {
const offerings = await Purchases.getOfferings();
if (offerings.current.monthly !== null) {
const currentOffering = offerings.current.monthly;
 
const { purchaserInfo, productIdentifier } = await Purchases.purchasePackage(currentOffering);
 
if (typeof purchaserInfo.entitlements.active[ENTITLEMENT_ID] !== 'undefined') {
console.log("Purchase Success");
 
}
}
} catch (e) {
 
if (!e.userCancelled) {
Alert.alert('acquisto annullato', e.message);
 
log output
==========
  {"identifier": "$rc_monthly", "offeringIdentifier": "Defult", "packageType": "MONTHLY", "product": {"currency_code": "INR", "description": "Abbonamento Mensile €2,99 con rinnovo automatico", "discounts": null, "identifier": "gold_299_pf", "introPrice": {"cycles": 1, "period": "P4W2D", "periodNumberOfUnits": 30, "periodUnit": "DAY", "price": 0, "priceString": "₹0.00"}, "intro_price": 0, "intro_price_cycles": 1, "intro_price_period": "P4W2D", "intro_price_period_number_of_units": 30, "intro_price_period_unit": "DAY", "intro_price_string": "₹0.00", "price": 260, "price_string": "₹260.00", "title": "Abbonamento Mensile (Primo Chef)"}}
 

 

 
console.log(e);
}
}
}

 

please let us know as soon as possible

icon

Best answer by cody 30 July 2021, 16:04

View original

3 replies

Userlevel 6
Badge +8

@Michele Laurelli 👋

On April 29th, Google sent out a notice to Android developers offering subscriptions in India that new auto-renewing subscriptions, free trials, and introductory prices will be paused for the foreseeable future on May 4, 2021.

  • This change affects subscriptions in India only.
  • Any existing auto-renewing subscriptions in India will continue to renew as expected.
  • Any new auto-renewing subscriptions in India will not auto-renew after Google rolls out the changes in May. This means users who subscribe will need to subscribe again once their subscription expires.
  • Free trials and introductory prices won't be redeemable after Google rolls out the changes because they can't renew.

In your case, the introductory price is failing to display because of these restrictions for purchases in India. There is no workaround at the moment, so you should:

  • Adjust your wording on your paywall to remove any mentions about free trials, introductory pricing, or auto-renewals for your users in India. While this can be done in various ways, one potential way is to check the currency of the SkuDetails using getPriceCurrencyCode (https://developer.android.com/reference/com/android/billingclient/api/SkuDetails#getpricecurrencycode) The currency code of the rupee is INR. You can potentially also use the device's locale to change the wording on your paywall.
  • You may optionally offer different skus in India that don't include any free trials or introductory pricing. RevenueCat can help you here - just create an offering for your Indian users and display it in your app accordingly.
Badge +4

Then it will work on Europe right ? but the trial still not working there also .I need to work on Italy mainly ,then all over Europe.Please send the method name where we can display trail period and and the method nae to check trail period for android and ios .

please let me asap

 

Thsnks for your help in advance

Userlevel 6
Badge +8

@Michele Laurelli,

Introductory prices are applied automatically to subscription products- there is no extra method to enable to introductory pricing, and these will be applied to every country it is available in (as mentioned above, India is not eligible for introductory pricing at the moment).  You can access information about introductory pricing in React Native by checking the introPrice property of a Product from your Package.

Reply