Hi @fishbrain,
It’s not very documented but inside every `offering` you’ll be able to find paywall configuration, if the paywall is configured. For offerings without paywall, this data will be `null` so you can use that logic to know if you have a paywall attached to that offering.
Let me know if this helps!
Hey,
thank you for replying. I tried finding any configuration related to the paywall but was unable. Am I blind or maybe the React Native SDK doesn’t have it?
I’m querying the current offering like this:
const offerings = await Purchases.getOfferings();
setCurrentOffering(offerings.current);
Here is the response (the response for an offering with a paywall has the same structure, no paywall config):
{
"serverDescription": "A Sandbox Offering without a Paywall",
"metadata": {},
"identifier": "sandbox_no_paywall",
"availablePackages": g
{
"packageType": "ANNUAL",
"offeringIdentifier": "sandbox_no_paywall",
"presentedOfferingContext": {
"placementIdentifier": null,
"targetingContext": null,
"offeringIdentifier": "sandbox_no_paywall"
},
"identifier": "$rc_annual",
"product": {
"productType": "AUTO_RENEWABLE_SUBSCRIPTION",
"productCategory": "SUBSCRIPTION",
"pricePerYear": 37.9,
"currencyCode": "EUR",
"introPrice": {
"cycles": 1,
"price": 0,
"priceString": "€0.00",
"periodNumberOfUnits": 2,
"period": "P2W",
"periodUnit": "WEEK"
},
"pricePerWeek": 0.73,
"identifier": "g_2999_1y_2w0",
"price": 37.9,
"pricePerMonth": 3.16,
"priceString": "€37.90",
"subscriptionPeriod": "P1Y",
"pricePerWeekString": "€0.73",
"discounts": d],
"pricePerYearString": "€37.90",
"description": "Discounted Annual Subscription",
"title": "Discounted Annual Subscription",
"pricePerMonthString": "€3.16"
}
}
],
"annual": {
"identifier": "$rc_annual",
"presentedOfferingContext": {
"placementIdentifier": null,
"targetingContext": null,
"offeringIdentifier": "sandbox_no_paywall"
},
"packageType": "ANNUAL",
"product": {
"productCategory": "SUBSCRIPTION",
"pricePerYearString": "€37.90",
"description": "Discounted Annual Subscription",
"pricePerMonth": 3.16,
"priceString": "€37.90",
"identifier": "g_2999_1y_2w0",
"discounts": >],
"productType": "AUTO_RENEWABLE_SUBSCRIPTION",
"title": "Discounted Annual Subscription",
"pricePerMonthString": "€3.16",
"currencyCode": "EUR",
"pricePerWeek": 0.73,
"introPrice": {
"price": 0,
"periodNumberOfUnits": 2,
"period": "P2W",
"priceString": "€0.00",
"cycles": 1,
"periodUnit": "WEEK"
},
"pricePerYear": 37.9,
"subscriptionPeriod": "P1Y",
"pricePerWeekString": "€0.73",
"price": 37.9
},
"offeringIdentifier": "sandbox_no_paywall"
}
}