Skip to main content
Question

How to make consumable purchases multiple times?

  • October 7, 2023
  • 1 reply
  • 80 views

Forum|alt.badge.img+5

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?.availablePackages[packageNumber] {
            Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in
                print("user cancelled: transaction", userCancelled)
                if customerInfo?.entitlements["gems (consumable)"]?.isActive == true {
                    // Unlock that great "pro" content

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

 

This post has been closed for comments

1 reply

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 501 replies
  • October 12, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings