Skip to main content
Solved

Show Offering to User after Cancellation

  • 7 March 2024
  • 2 replies
  • 41 views

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

2 replies

Userlevel 4
Badge +8

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.

Badge +5

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