Question

Is it possible to add a custom field to the package variable?

  • 16 January 2024
  • 1 reply
  • 38 views

Badge +3
try {
const {
purchaserInfo,
productIdentifier
} = await Purchases.purchasePackage(package);
if (typeof purchaserInfo.entitlements.active.pro !== "undefined") {
// Unlock that great "pro" content
}
} catch (e) {
/* No purchase */
}

 

Is it possible to add a custom field to the package variable?
I would like to access the field data through a webhook.


1 reply

Userlevel 4
Badge +6

Hey @bnocorp !

 

As of now, it is not possible to add custom fields to the package variables. I noticed that you are still using PurchaserInfo, I recommend updating to a more up-to-date version of the SDK as more information will be available in packages and the overall experience would likely be better and improved. 

 

More information on webhooks can be found here: https://www.revenuecat.com/docs/webhooks

Reply