How can I get notified If you bought a Devproduct a webhook will send message to discord

Greetings, I’m looking for a way on how can I get notified, If you bought a Devproduct a webhook will send message to discord?

Can someone help me, please?

(Note): I’m that good at scripting so this is why I am asking.

you could use “PromptProductPurchase”, and if the callback returns that the player purchased it, you can use Http:PostAsync() to post the data to your webhook.

Read more:

1 Like

I don’t really know how to do callbacks but here is sample code:

You must enable http requests.

local HttpService = game:GetService("HttpService") -- HTTP service.
local webhooklink = "" -- Enter webhook in the lines.

-- The content you want to send.

local stuff = {
	["content"] = "Hey, [USERNAME] has bought [ITEM]"
}

stuff = http:JSONEncode(stuff) -- Encoding data like a pro :) .

http:PostAsync(webhooklink, stuff)  -- Sending the stuff to the webhook.