Receiving Webhooks
Once you have created a webhook endpoint you need to set up your application to receive webhooks.
Build out the HTTP Endpoint
This endpoint will receive a POST request from Tiltify with a JSON payload, as well as a few identifying headers to help you identify that the webhook is actually from Tiltify.
Requirements Summary
- Receives HTTP POST requests
- Returns 200-299 status codes
caution
You must respond to our webhooks with a 200-299 status code, or your Webhook Endpoint will be deactivated after approximately 1 hour. See our retry schedule for more information.
Example HTTP Request
A Webhook HTTP request from Tiltify will have the following headers:
Content-Type: application/json
User-Agent: Tiltify Outgoing Webhook
X-Tiltify-Timestamp: 2023-04-18T16:06:55.323352Z
X-Tiltify-Signature: FmbJdukjOp0XnyjRm0eFeG7A2SO4q8u0xZjsy36ZTzA=
X-Tiltify-Verision: v5
X-Tiltify-Endpoint: 7a03496d-2f03-4b7c-9f2e-6117ca62bb6e
And a JSON Request Body that looks similar to:
{"data":{"amount":{"currency":"USD","value":"25.94"},"campaign_id":"05abe59b-0301-4eaf-89c2-92015103f1cb","completed_at":"2023-04-18T16:11:58.484907Z","created_at":"2023-04-18T01:51:44.484923Z","donor_comment":"Exercitationem est quaerat voluptatem explicabo minus!","donor_name":"Wynaut","fundraising_event_id":null,"id":"386bb6d5-8b7f-464e-a095-ea0057f08635","legacy_id":0,"poll_id":null,"poll_option_id":null,"reward_id":null,"sustained":false,"target_id":null,"team_event_id":"20fbee79-327b-4604-858c-4f77cdbf5ab3"},"meta":{"attempted_at":"2023-04-18T16:12:16.688821Z","event_type":"public:direct:donation_updated","generated_at":"2023-04-18T16:12:15.484965Z","id":"8b91dd75-98b6-4d60-8c62-a74645adbca6","subscription_source_id":"00000000-0000-0000-0000-000000000000","subscription_source_type":"test"}}
Once your endpoint is configured to return successful status codes from Tiltify Webhook POST requests, you are ready to Verify the Signature of the received webhooks.