LinkStacked
🔌API & integrations 4 min read

Webhooks setup and events

Webhooks send real-time HTTP POST requests to your server whenever specific events occur on your LinkStacked account — no polling required.

Registering a webhook

json
POST /v1/webhooks
{
  "url": "https://your-app.com/webhook",
  "events": ["link.clicked", "product.sold"]
}

Verifying webhook signatures

Every webhook request includes an X-LinkStacked-Signature header. Verify this signature to ensure the request came from LinkStacked:

javascript
const crypto = require("crypto");

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(payload)
    .digest("hex");
  return `sha256=${expected}` === signature;
}

Webhook events

  • link.clicked — a visitor clicked one of your links.
  • product.sold — a digital product was purchased.
  • tip.received — a tip was charged successfully.
  • profile.viewed — your profile page was loaded.
  • subscriber.created — a visitor submitted your email capture form.
  • ab_test.winner_declared — an A/B test reached statistical significance.

Retry policy

If your endpoint returns a non-2xx status code, LinkStacked retries with exponential backoff: after 1 min, 5 min, 30 min, 2 hours, and 12 hours. After 5 failures, the webhook is disabled and you'll receive an alert email.

Was this article helpful?

More in API & integrations

View all

Still need help?

Our support team is available Monday – Friday, 9am – 6pm EST.