To test your webhook script, you can simple use curl to send a POST request directly to your webhook. You can do something like the following to send the request:

curl -d ‘{“hello”: “world”}’ http://path/to/your/webhook/script

Using the -d flag will make the request use the POST method and the string following the flag is the actual data being sent to your script.

Below are a couple full example curl requests you can use to test your scripts:

1) Test a New Sale event

curl -d ‘{"id": "198","object": "event","attempt": 1,"webhook": "sale_new","created_at": 1375705760,"data": {"lineitem": {"id": "458","plan_id": "83","plan_name": "30-day Free Trial Version","order_number": "198","price": "10.00","subtotal": "100.00","discount": "0.00","tax": "0.00","total": "100.00","payout_amount": "70.00","created_at": "1375705758","trial": true,"trial_ends": 1378297758,"trial_status": "Trialing","subscription": true,"subscription_status": "Active","structure": "Per User Pricing","numbers_users": "10","frequency": "Monthly Fee"},"member": {"id": "14","username": "sampleuser","display_name": "Sample User","email": "sample.user@email.com","url": "https:\/\/www.sugaroutfitters.com\/members\/sampleuser"},"licensekey": {"key": "28aded8s9f83890ef6csdf9309526f8a7","user_count": "10","updated_at": "1375705760","created_at": "1375705760","active": true},"addon": {"id": "18","name": "Test Add-on","shortname": "test-addon","url": "https:\/\/www.sugaroutfitters.com\/addons\/test-addon","updated_at": "1375356990","created_at": "1335990852"}}}’ http://path/to/your/webhook/script

2) Test a New Support Case Created event

curl -d ‘{"id":"199","object":"event","attempt":1,"webhook":"case_created","created_at":1375706700,"data":{"case":{"id":"16","subject":"Issues Installing the Add-on","description":"I'm having issues installing the add-on I just purchased. I tried this, this and that, but nothing seems to be working. Please help. Thanks!\n","url":"https:\/\/www.sugaroutfitters.com\/support\/test-addon\/16","updated_at":"1375706700","created_at":"1375706700","status":"Open","type":"Bug"},"member":{"id":"14","username":"sampleuser","display_name":"Sample User","email":"sample.user@email.com","url":"https:\/\/www.sugaroutfitters.com\/members\/sampleuser"},"addon":{"id":"18","name":"Test Add-on","shortname":"test-addon","url":"https:\/\/www.sugaroutfitters.com\/addons\/test-addon","updated_at":"1375356990","created_at":"1335990852"}}}’ http://path/to/your/webhook/script