Thanks - I need to have play around with the JSON manipulation stuff.
But the second part of the query was around how to get something like this example curl request working in the AJAX plugin.
curl -X POST 'https://api.twitch.tv/helix/eventsub/subscriptions' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz' \
-H 'Content-Type: application/json' \
-d '{
"type": "channel.chat.message",
"version": "1",
"condition": {
"broadcaster_user_id": "12826",
"user_id": "141981764"
},
"transport": {
"method": "webhook",
"callback": "https://your-webhook-handling-server.com",
"secret":"s3cre7"
}
}'
Specifically the -d data part