How do I PromptPurchase Bundles?

In my game I want to prompt users to buy Bundles however, ROBLOX made a “new ID system” (I don’t know how to describe it) for the Bundles.



How do I prompt players to buy Bundles (in game) using the PromptPurchase function or using any other functions? I tried using the ID from an Anthro package to prompt purchase but it doesn’t work.

I don’t think any of the purchase APIs support bundles right now, they only work with the old AssetType. You have two options here; either you can fetch the catalog Id of the bundle or you can file a feature request to allow for bundles to be purchased.

I actually had a post about this a while ago but figured it out. What you have to do is get an asset from the bundle using AssetService:GetBundleDetailsAsync(bundleId), get the first asset from the Items part of the dictionary, then find the digits in the description to get the old bundle assetId, then PromptPurchase those digits, and it should give you something like this:image

edit: see How do I PromptPurchase Bundles? for code

Which member of the dictionary are you supposed to use? The fact that GetBundleDetailsAsync still has no documentation is really a crowbar in this.

Here’s the exact code that I used, I forgot that I must get the old link from the description of the asset like this:

local bundleId = 39

local AssetService = game:GetService('AssetService')
local MarketplaceService = game:GetService('MarketplaceService')

local BundleItems = AssetService:GetBundleDetailsAsync(bundleId).Items

local FirstBundleInfo = MarketplaceService:GetProductInfo(BundleItems[1].Id)

local OldBundleId = string.match(FirstBundleInfo.Description, "%d+")

MarketplaceService:PromptPurchase(game.Players.LocalPlayer, OldBundleId)

Took me a few hours to figure it out, so hope you enjoy!

That somehow feels very terrifying to use, but I suppose it does work. Nice stuff.

It’s extremely bad code, and I wish that there was some API so that we could purchase bundles, or animations directly.