Late response, but this caused when it is bought in studio, as you can see it says “This is a test purchase; your account will not be charged”, I believe this has something to do with the api!
This should probably still be considered a bug, since it makes testing developer products harder. You would actually have to buy it, testing your own game shouldn’t come at a cost. If the engine for whatever reason needs this value to be 0 even when testing because technically you spent nothing, the returned table could just now include a PurchasedInStudio flag or similar name, while CurrencySpent would return back the price of the product.
I wouldn’t really consider this a bug since its intended purpose is to show how much robux was taken from the user’s account. As a workaround, in studio you could just get the PriceInRobux of the item’s ProductInfo.
These are mock purchases meaning they should function identical to real purchases. Although Robux aren’t taken from your account, it is still expected that CurrencySpent is the price of the developer product.
I was using it for a client who asked for the price of products purchased to be recorded while making it easy for them to change the product price at any given time.
However, the usage of CurrencySpent is completely irrelevant to the original bug report. Use cases only need to be given when making a feature request, not a bug report.
So your problem is that you can’t test it properly if you can’t have CurrencySpent ever be non-zero in Studio?
It’s actually relevant in this case because according to the devhub the current behavior is not a bug, it specifies on CurrencySpent: “The amount of currency spent in the transaction.”. A mock transaction doesn’t spend any currency.
Also some additional explanation on how it affects your work can help product managers prioritize fixes for issues.