Reputation: 81
I'm using RevenueCat's fetchOfferings to retrieve subscription details for my app. While it successfully fetches the description of the subscription products I created in the Google Play Console, it does not retrieve the benefits that I added when setting them up.
Here is an example of the output returned by fetchOfferings:
{
"monthly_plans": [
{
"offeringIdentifier": "test",
"product": {
"presentedOfferingIdentifier": "test",
"subscriptionOptions": [
{
"presentedOfferingContext": {
"placementIdentifier": null,
"targetingContext": null,
"offeringIdentifier": "test"
},
"introPhase": null,
"freePhase": null,
"isPrepaid": false,
"presentedOfferingIdentifier": "test",
"fullPricePhase": {
"offerPaymentMode": null,
"billingCycleCount": 0,
"price": {
"currencyCode": "INR",
"amountMicros": 300000000,
"formatted": "₹300.00"
},
"recurrenceMode": 1,
"billingPeriod": {
"iso8601": "P1M",
"value": 1,
"unit": "MONTH"
}
},
"isBasePlan": true,
"billingPeriod": {
"iso8601": "P1M",
"value": 1,
"unit": "MONTH"
},
"productId": "com.whinchat.ai.paid_basic",
"tags": [],
"pricingPhases": [
{
"offerPaymentMode": null,
"billingCycleCount": 0,
"price": {
"currencyCode": "INR",
"amountMicros": 300000000,
"formatted": "₹300.00"
},
"recurrenceMode": 1,
"billingPeriod": {
"iso8601": "P1M",
"value": 1,
"unit": "MONTH"
}
}
],
"storeProductId": "com.whinchat.ai.paid_basic:base-basic-monthly",
"id": "base-basic-monthly"
}
],
"introPrice": null,
"currencyCode": "INR",
"priceString": "₹300.00",
"subscriptionPeriod": "P1M",
"productCategory": "SUBSCRIPTION",
"price": 300,
"title": "Basic (Whinchat)",
"productType": "AUTO_RENEWABLE_SUBSCRIPTION",
"discounts": null,
"presentedOfferingContext": {
"placementIdentifier": null,
"targetingContext": null,
"offeringIdentifier": "test"
},
"defaultOption": {
"presentedOfferingContext": {
"placementIdentifier": null,
"targetingContext": null,
"offeringIdentifier": "test"
},
"introPhase": null,
"freePhase": null,
"isPrepaid": false,
"presentedOfferingIdentifier": "test",
"fullPricePhase": {
"offerPaymentMode": null,
"billingCycleCount": 0,
"price": {
"currencyCode": "INR",
"amountMicros": 300000000,
"formatted": "₹300.00"
},
"recurrenceMode": 1,
"billingPeriod": {
"iso8601": "P1M",
"value": 1,
"unit": "MONTH"
}
},
"isBasePlan": true,
"billingPeriod": {
"iso8601": "P1M",
"value": 1,
"unit": "MONTH"
},
"productId": "com.whinchat.ai.paid_basic",
"tags": [],
"pricingPhases": [
{
"offerPaymentMode": null,
"billingCycleCount": 0,
"price": {
"currencyCode": "INR",
"amountMicros": 300000000,
"formatted": "₹300.00"
},
"recurrenceMode": 1,
"billingPeriod": {
"iso8601": "P1M",
"value": 1,
"unit": "MONTH"
}
}
],
"storeProductId": "com.whinchat.ai.paid_basic:base-basic-monthly",
"id": "base-basic-monthly"
},
"description": "Glide through the line for 0.1 USD per day.",
"identifier": "com.whinchat.ai.paid_basic:base-basic-monthly"
},
"packageType": "MONTHLY",
"presentedOfferingContext": {
"placementIdentifier": null,
"targetingContext": null,
"offeringIdentifier": "test"
},
"identifier": "$rc_monthly"
}
],
"annual_plans": [],
"metadata": {}
}
As you can see, the description is fetched ("description": "Glide through the line for 0.1 USD per day."
), but I don’t see any data regarding the benefits that I added to my subscription products in the Google Play Console.
Things I've Tried:
Why might fetchOfferings not fetch the benefits for the subscription products? Is there a known limitation, or am I missing something in the configuration or setup process?
Upvotes: 0
Views: 37
Reputation: 476
You seem to be looking for the benefits in PurchaseOffering
which contains packages with the PurchasesStoreProduct
type which does not contain any information about the benefits you added in Google Play Console
.
You can verify this by checking out the properties of PurchaseStoreProduct
from 'react-native-purchases'.
Refer this link to see what is received in the offerings response: RevenueCat Docs
Upvotes: 0