[Solved] Selling Bundles with Unity iAP

Hi,

What would be the appropriate approach to sell Non Consumable good bundles?

For example:

  • Level 1, Price: 2 USD
  • Level 2, Price: 3 USD
  • Level 1 + Level 2, Price: 4 USD + Level 3 as Bonus Gift

Is above scenario possible to achieve with Unity iAP API functions?

I suspect that you would want to set these up as separate products. We are basically a pass-through service for the various stores, you would want to confirm with the stores regarding bundles.

If I try to manage it with stores, it will be difficult to manage also time consuming.

I was thinking to register bundle product ids to stores in a client side parsable form, fx. I would be applying the above scenario to Appstore like:

  • BundleID: Level1, Price: 2 USD
  • BundleID: Level2, Price: 3 USD
  • BundleID: Level3, Price: 1 USD
  • BundleID: Level1Level2Level3Bonus1, 4 USD

Then I will unlock items based on the names returned from the receipt.

Just wondering if there is a more elegant solution ?

Have you tested this? I’m not sure how multiple products would work in this purchasing flow, are you expecting a store purchase popup for each product within the bundle? This would likely be the user experience. Unless I’m misunderstanding, and the bundle is a separate/individual product as suggested. After they purchased this single product/bundle, you would unlock the corresponding items on the client.

No, I did not test neither start to develop, just making the design. I will not perform transactions for each product inside the bundle, it will be all handled at the client side, so no pop-ups.

At the Purchaser script from Unity, BuyProductID(string productId) function takes productId as argument, then calls ProcessPurchase(PurchaseEventArgs args) function if the productId is available at the store.

Bundled products will be handled at the ProcessPurchase( PurchaseEventArgs args) function:

        public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs args)
        {
            if (String.Equals(args.purchasedProduct.definition.id, singlePack, StringComparison.Ordinal))
            {
                           UnlockSinglePack(args.purchasedProduct.definition.id);
            }
         
            else if (String.Equals(args.purchasedProduct.definition.id, bundlePack, StringComparison.Ordinal))
            {
                           UnlockMultiplePacks(args.purchasedProduct.definition.id);
            }
        
            else
            {
                           PurchaseFailed();
            }

            return PurchaseProcessingResult.Complete;
        }

The most important point is the naming for the products to be parsed.

Why parse the name at all? If they buy Bundle #2 for example (a single product), then unlock the items that you already know are in that bundle. Perhaps that is what you are doing in UnlockMultiplePacks. But your implementation looks sound in general.

Exactly, UnlockMultiplePacks will be unlocking multiple items where each of them individually being sold as a single item. Thank you for the answer :slight_smile: Hoping that it will work as planned…