How can I cancel a dev product purchase from going through?

For example, if a player tries to buy Double XP when it is already active, I can detect this through a server script before it goes through and stops it.

Is this possible? If it isn’t, what do creators do with say voting maps? The purchase-prompt appears and the user keeps it on their screen, waits a while and then does it in the middle of a game?

I don’t know if this will works but you can use respawning and teleporting player back to last position

Even if that did work, it unfortunately can’t be used in my game due to the nature of it.

What you can do is check if a player doesn’t have the Double XP gamepass, if they don’t then just prompt it to the player.

You can’t prevent it. but before prompt purchasing, check the player or whatever you need to check

Player clicks button > check > if he can buy > prompt purchase

I have idea like when you want to disable it and player buys it, Addded to order of done transactions and when players is able buying again then complete and make things that player paid for

Yeah ill try securing that, that just seems really bad to me that you can’t stop a purchase from going through.

I remember someone showed me from an older project them opening the product prompt before a round started, and then purchasing the product mid-round only to find it obviously didn’t work and they wanted a refund

If this is a 1-time purchase, you should use a gamepass instead. Otherwise, a suggestion I have is to increase the time that the user has “Double XP” each time that they purchase.

I also think that if you never process the product receipt as granted, then eventually the user will get it refunded. This shouldn’t be a big deal if you have checks in place before prompting the purchase of a product to see if they already have it.

1 Like

Yeah I can probs just make it so the time goes up, but if I don’t process the product receipt as granted will they get a refund? I didn’t know it worked like that because when I don’t return it the purchase still goes through.

I would return
every time you process a product purchase otherwise you might not actually be getting your robux.

1 Like