Skip to main content

I have created a consumable product and it works so far. Now when the user wants to purchase the same consumable product again, it gives it to them wether they paid again or not because their entitlement exists? How do I fix this? here is the code I have: 

 

 

  
if let package = self.offering?.availablePackagesgpackageNumber] {
Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in
print("user cancelled: transaction", userCancelled)
if customerInfo?.entitlementsn"gems (consumable)"]?.isActive == true {
// Unlock that great "pro" content

} else {
print("Error for payment", error)
}
}
}

 

Hey @Jordan Peterson!

Consumable products will unlock entitlements permanently. Because of this, you’ll want to either remove your consumable products from your entitlements, or not restrict users from purchasing if the entitlement exists. You can read more in our guide on non-subscription products: https://www.revenuecat.com/docs/non-subscriptions#entitlements


Reply