Skip to main content
Solved

Show Offering to User after Cancellation


mariusbolik
Forum|alt.badge.img+5

Hello!

I wonder what the best way is to show a discount to a user after they have canceled their subscription. I want to show a different paywall to the user. I am using the Capacitor Plugin and a custom paywall.

Is there a good guide on this topic?

Ist the preferred way to use the new targeting feature?

Kind Regards,

Marius

Best answer by mariusbolik

Thanks Haley!

The solution I’m going with is to check if the customer already has items in `allPurchasedProductIdentifiers`. If there are items in the array, I know that I have to show another offering!

 

Here is my code:

const { customerInfo } = await Purchases.getCustomerInfo();
const isNewCustomer = !Boolean(customerInfo?.allPurchasedProductIdentifiers?.length);

if (isNewCustomer) {
  // Show normal offering
} else {
  // Show discounted offering to win user back
}

 

View original
Did this post help you find an answer to your question?

2 replies

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 509 replies
  • March 11, 2024

Hi, you can use our webhooks to get the notification to your server when a user cancels a subscription and then can change the offering being displayed via our REST API endpoint here: https://www.revenuecat.com/docs/api-v1#tag/offerings/operation/override-offering. This is not possible to do via our targeting as our current filters are only App, App Version, Country, and RC SDK version.


mariusbolik
Forum|alt.badge.img+5
  • Author
  • Helper
  • 4 replies
  • Answer
  • May 23, 2024

Thanks Haley!

The solution I’m going with is to check if the customer already has items in `allPurchasedProductIdentifiers`. If there are items in the array, I know that I have to show another offering!

 

Here is my code:

const { customerInfo } = await Purchases.getCustomerInfo();
const isNewCustomer = !Boolean(customerInfo?.allPurchasedProductIdentifiers?.length);

if (isNewCustomer) {
  // Show normal offering
} else {
  // Show discounted offering to win user back
}

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings