Data direction: This is a destination — Upstack sends event and conversion data out to this platform via server-side APIs.
How do I send Upstack events to my webhook URL?
- In Upstack, click Destinations in the sidebar.
- Under Available destinations, find Webhook and click Connect.
- In Webhook URL, paste your endpoint. It must start with
https://. - Optional: in Signing Secret, enter a secret. Upstack then signs every request. See How do I check that a request came from Upstack?
- Click Create Destination.
Which URLs can I use?
A public address that starts withhttps:// and answers without a redirect.
Which events does Upstack send?
These events are sent by default, under their Upstack names:- To send another event, see How do I send an event that is not on the list?
How do I send an event that is not on the list?
Add a custom trigger. Upstack sends it with the event name you choose.- In Upstack, click Destinations, then click your webhook destination.
- Click the Event Mappings tab.
- Click Add Custom Trigger.
- Fill in Display name, Base event, and Destination event name. Your endpoint receives the Destination event name as
eventName. - Click Save custom event.
- Click Save Changes.
What does each request look like?
Each event is onePOST with a JSON body.
Example body for a purchase:
Which fields can a request contain?
Only these fields. A field with no value is left out, so every field below can be missing.user_data and data are always sent, even when empty.
Top level
user_data
When Upstack has no email, phone or address for the visitor, user_data holds externalId only.
user_data.location
data: value and orders
data.items
data: accounts, plans and subscriptions
Sent on account, trial, subscription, payment and invoice events.
How do I check that a request came from Upstack?
Recompute the signature with your Signing Secret and compare it withX-Upstack-Signature.
- Read the raw request body before you parse the JSON.
- Join the
X-Upstack-Timestampvalue, a dot, and the raw body. - Compute an HMAC-SHA256 of that text with your signing secret, as hex.
- Put
sha256=in front and compare it withX-Upstack-Signature. If they differ, reject the request. - To block replayed requests, also reject a timestamp more than 5 minutes old. Every retry gets a new timestamp and signature.
What happens when my endpoint returns an error?
Upstack tries the event up to 3 more times, about a minute apart, then drops it.Why did I get the same event twice?
Upstack sent it again after a failed try. A retry resends every request for that event, including ones your endpoint already accepted. Useid to drop events you have already processed.