Discord webhook HTTP 400 (Bad Request)

so this webhook fires when a player redeems a valid code.

here’s the code redeeming script (Local), it works.

and this is where the error is: (server script in sss)

local https = game:GetService("HttpService")
local WebHook = --LINK--

local Event = game.ReplicatedStorage.Reward
local codeReward = 50

Event.OnServerEvent:Connect(function(player, code)
	print("Code Worked!")
	player.Settingsfolder.credits.Value += codeReward
	player.PlayerGui.Menus.Credits.ShopBG.creditsvalue.Text = player.Settingsfolder.credits.Value
	local data = 
		{
			["content"] = "",
			["embeds"] = {{
				["title"] = "Code Redeemed",
				["description"] = player.Name .. " Redeemed a Code",
				["type"] = "rich",
				["color"] = tonumber(0xffffff),
				["fields"] = {
					{
						["name"] = "Code:",
						["value"] = code,
						["inline"] = false
					},
					{
						["name"] = "Reward",
						["value"] = codeReward .. " Credits",
						["inline"] = true
					}}}}}

	local finalData = https:JSONEncode(data)
	https:PostAsync(WebHook, finalData)
end)

and finally, here’s the error. does anyone see a problem? thanks.
image

(Getting the obvious out) Do you have HTTP Requests enabled in your Game Settings?

yeah, I do. I wish the error provided more detail, would make it easier lol.

Hm, could it be possible that you formatted something wrong? Try printing the finaldata variable before you use PostAsync

field.value only accepts strings. Try this:

local data = {
		["content"] = "",
		["embeds"] = {
			{
				["title"] = "Code Redeemed",
				["description"] = player.Name.." Redeemed a Code",
				["type"] = "rich",
				["color"] = tonumber(0xffffff),
				["fields"] = {
					{
						["name"] = "Code:",
						["value"] = tostring(code),
						["inline"] = false
					},
					{
						["name"] = "Reward:",
						["value"] = tostring(codeReward).." Credits",
						["inline"] = true
					}
				}
			}
		}
	}