Skip to main content
Answer

Show Offering to User after Cancellation

  • March 7, 2024
  • 2 replies
  • 178 views

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
}

 

This post has been closed for comments

2 replies

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 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
  • 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
}