Hello there!
I'm Tarek, from the support team, and I'll happily help you figure this out.
Currently, paywalls are associated to a single offering, so you cannot reference products from other offerings or packages "out-of-the-box". I raised your request with engineering to consider adding this feature.
However, in the meantime, there is a way to achieve this result by relying on custom variables and injection in paywalls.
You could do the following:
- Create a custom variable in your exit offer paywall (name it for instance
default_monthly_price and give it a default value). Reference this custom variable in your exit offer paywall wherever you want to display the original price by using {{ custom.default_monthly_price }} - In you code, right before displaying your paywall, fetch your
default offering and pull your monthly price from it - Inject this monthly price in your
exit_offer paywall right before displaying it - Your exit offer paywall with then display this value where your have referenced it since it's been injected
Since you said you were using ReactNative, here's a sample code to help you get started:
// Fetch offerings, inject the custom variable and show the paywall
async function showPremiumPaywall() {
const offerings = await Purchases.getOfferings();
const defaultOffering = offerings.all["default"];
const premiumOffering = offerings.all["premium"];
if (!premiumOffering) return;
const monthlyPrice =
defaultOffering?.monthly?.product.priceString ?? "";
await RevenueCatUI.presentPaywall({
offering: premiumOffering,
customVariables: {
default_monthly_price: monthlyPrice,
},
});
}
// You can also show the paywall and inject the custom variable declaratively (fell free to adapt fetching in this case)
<RevenueCatUI.Paywall
options={{
offering: premiumOffering,
customVariables: {
default_monthly_price: monthlyPrice,
},
}}
onDismiss={() => setShowPaywall(false)}
/>
I hope this is helpful.
Best regards,