Can we Change the Unity IAP prices at runtime? What I have in mind is to fetch the prices from the server and use those prices after the game is published. I want to tweak those prices according to seasons without having to update the app.
No, never change the prices once you publish. You set the prices on your Google and Apple dashboards. If I were a user and purchased at price A then it was changed to a lower price B later, I might be concerned. You need separate products to support separate prices.
Hi,
I have several items in a bundle. Lets say Bundle X contains ( item A B and C) at 2.99$ and after a while through analysis I realise that players are more keen on Items J K and L. I want to make a bundle out of those items i.e Bundle Y containing (item J, K and L) at 3.99$. That is why.
but my main question is can we do it? is it possible?
If the stores allow you to change the prices after publishing, then yes. You would need to change the price on the store dashboard, then reflect the same prices in your app. You could use Unity Remote Config for that https://docs.unity3d.com/Packages/com.unity.remote-config@2.0/manual/index.html
There’s no other way? I dont want to use remote config right now. Maybe I can Make different IAP buttons of different prices and Activate Deactivate according to my needs. What I mean is that
I have lets say 10 different IAP buttons each with Different prices. Once I get my Updated catalogue (with bundles updated prices) and then activate and deactivate the relevant buttons?
Well of course, but you’re not changing prices at that point, you already have them set up. You still need to change the prices on the Dashboard, or just have different products, similar but with a different price
How do you plan to activate/deactivate buttons “according to your needs”? You mentioned that you don’t want to do it remotely, so that implies a new release each time.
I am using playfab as a backend service. So calling a cloudscript function to grab the values. And Putting checks inside app.
Nice! Similar to my mention of Remote Config, that works too.
Yes Thanks alot for that tip, I dint know about Remote config. Its a bit of work, I am trying to keep eveything as simple as i possible right now.
This is exactly what I was looking for. Thanks to you both.
What I am stuck on is how can I create products in IAP Catalog after I retrieve the prices/products remotely?
What should I use in the code for that?
Hi @alikun ,
One way to use your remotely retrieved catalog items is to populate them directly into the ConfigurationBuilder before initializing IAP.
https://docs.unity3d.com/Packages/com.unity.purchasing@4.5/manual/UnityIAPInitialization.html
This may seem a bit clunky, but it is the most straightforward approach. You could take your catalog object and create a class that transfers it into a ConfigurationBuilder.
@John_Corbett Yeah, did it already and works like a charm
Thanks ![]()
@alikun Hi can you please share some examples of how you changed the price at runtime I’m building the shopping system in Unity obviously I can’t set a fixed price in the IAP Catalog price will change when more and more products will add to the chart Thanks
Here, I have a list of IAP scriptable objects with Id and Type fields and add them to builder instance. Later, I initialise the builder instance. This all happens in a class derived from IStoreListener. But you still need to add an tap item in the Unity project when you add it in App Store Connect or Play Console.
var productScriptables = iapItems.OrderBy(o => o.Price).ToList();
var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
foreach (var productScriptable in productScriptables)
{
builder.AddProduct(productScriptable.Id,productScriptable.Type);
}
UnityPurchasing.Initialize(this, builder);