ReceiptInfo's CurrencySpent is always 0

Bug
The value of the CurrencySpent key in the receiptInfo parameter from ProcessReceipt is always 0 in Studio.

foMKvX5q70

Expected Behavior
The value of CurrencySpent should be the price of the developer product purchased.

Repo
CurrencySpent Repo.rbxl (18.5 KB)

6 Likes

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!

1 Like

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.

8 Likes

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.

2 Likes

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.

3 Likes

What do you use CurrencySpent for?

You should be using the other parameters in the payload to figure out what to award to a player on purchase.

1 Like

This is sometimes used for in-game surfaceguis that say who has spent the most in the game or something.

1 Like

Try this

local currenySpent = MarketplaceService:GetProductData(ReceiptInfo.ProductId).PriceInRobux
1 Like

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.

1 Like

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.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.