Is there a way to create a DevProduct with code?

Good afternoon,

I am trying to create a donation centre for my new group, so if someone were to type in a ROBUX amount, the dev product would be created and it would prompt them to purchase it. I’m not exactly sure how I would go about doing this.

Any thoughts?

AFAIK There’s no native way of going about this. However if you’re interested in a JavaScript method that you would need to keep up and hosted yourself you can look into this. Otherwise you might just want to create certain amounts such as 25, 50 ,75, 100 etc

Would there be a way to edit an existing DevProduct’s price?

No there isn’t unless you’re doing it manually.

There’s been a few times this topic has been created for, primarily to use it for donation centers. One of the solutions proposed was that instead of trying to do this (which in effect you’re just creating several throwaway products), you make products of different amounts and then prompt the user the products until they reach the amount they typed in.

For example: if a user types in 521 to pay then you prompt the player the 500, 20 and 1 Robux products which then equal up to 521. The tax would of course differ than just paying the whole amount but that’s the only way to do this in-house. I think it’s more reasonable than trying to use external services to create ultimately useless products or then running into the issue of wanting to edit those amounts.

Reference to the post in question:

5 Likes

Yes there is, but it’s complicated.
Since you can’t acces the Roblox API from game servers, you’ll need an “API proxy”.
That’d be a web server, the game server would send requests to, the web server would then forward those requests to the Roblox API and forward the result to the game server.
As far as I know, there are public ones, though you shouldn’t/can’t use them for stuff you need to log in for.

You could also, of course not create an API proxy, but a little own “API” for your game itself with, for example things like Node and Noblox.js.

1 Like

It would be possible using this module and the endpoints on https://develop.roblox.com/docs

There was one pre made for this,

It is a bit buggy from when I did some security checks but it works for what it is.