Events
Most events have filters, so the webhook fires only when conditions match, for example only for one program or only when an affiliate initiated the event. Open Add filter in the trigger to see the filters of an event.
Set up a webhook
1
Create a trigger
Open Triggers in your dashboard and click New trigger. Choose the event. The help center walks through the screen.
2
Add filters
Optional. Narrow down when the trigger fires.
3
Choose the webhook type
- Webhook sends the object in the same format as the API reference, for example a conversion for Conversion created.
- Webhook (custom) lets you compose the request yourself. Use merge tags from the
{…}menu next to the field to insert event data.
4
Save
The webhook starts firing on the next matching event.
Delivery and retries
Every webhook request carries these headers:
A test request sent from the trigger editor has no delivery ID.
A delivery succeeds when your endpoint answers with a
2xx status. Tapfiliate waits up to 20 seconds for the answer, or 10 seconds for Webhook (custom). Any other status, or no answer in time, is a failure.
Redirects are followed, and the status of the last response decides. After a 301, 302, or 303 the request continues without the payload, and a POST becomes a GET, so enter the final URL of your endpoint, not one that redirects.
After a failure, Tapfiliate tries again about 5 minutes, 1 hour, 12 hours, and 24 hours after the first attempt. If the last attempt fails too, the delivery is dropped. If the trigger is paused when a retry is due, the remaining attempts aren’t made. If another action of the same firing has failed for good, for example an email, retries that are still waiting can be dropped earlier.
A retry runs every action of the trigger again. If a trigger has several actions and one of them fails, the actions that were already delivered are sent again, with the same Tap-Trigger-Action-Id.
Each time a trigger fires, it counts once toward the trigger limit of your plan, whatever its actions. Retries aren’t counted again, and a firing whose actions all fail in the end isn’t counted, unless its waiting retries were dropped early because another action had failed for good: such a firing stays counted. Once the limit is reached, webhooks aren’t sent. If your plan has a limit, the Triggers page shows how much of it is used.
Handling webhooks
- Respond with a
2xxstatus quickly and do the work asynchronously. - Make your handler idempotent: store the
Tap-Trigger-Action-Idof every request you process, and skip a request whose ID you have already seen. Don’t use the object’sidfor this: events such as Commission updated and Customer updated fire more than once for the same object. - Use the REST API to fetch the current state of an object when you need more than the payload.