Signatures Added to All Webhook Events

Leap now signs all webhook events (including both dispatch and portfolio events) sent to your webhook endpoint. Each webhook event includes an x-leap-signature header containing a timestamped HMAC-SHA256 signature. Verifying it confirms three things: the webhook event came from Leap, the payload wasn't modified in transit, and an old webhook event isn't being replayed.

Same signature scheme as dispatch webhooks

Portfolio webhook events use the same signature scheme as dispatch webhook notifications, so you can reuse your verification code for both. Each webhook still has its own signing secret.

When you create a webhook with the Create Webhook endpoint, the response now includes a signing_secret. You can also create webhooks, get the signing secret, and rotate it in the Partner Portal. Each webhook has its own secret. Store it securely because Leap only returns it once and can't show it again. See step 2 of the Webhooks guide for details on the signing secret. See step 4 for how to verify signatures, including a test vector for checking your implementation.

  • Existing webhooks: Webhooks created before signing was introduced don't have a secret. Their webhook events are sent without the x-leap-signature header. To start receiving signed webhook events, update your webhook with rotate_secret=true or rotate the secret in the Partner Portal. When updating through the API, include the full webhook configuration, including any custom headers you want sent with the webhook events.
  • Rotating secrets: Updating a webhook with rotate_secret=true generates a new secret, which replaces the old one immediately. To avoid failed verifications during the switch, you can accept both the old and new secret for a short time. You can also rely on Leap's retries, which are re-signed and continue for up to 8 hours.
  • Testing: Webhook events sent with the Test Webhook endpoint are signed the same way as real webhook events. Use them to validate your implementation before going live.

Signature verification is now the recommended way to authenticate webhook events from Leap. Custom headers in the headers array are still supported and can be used alongside it, for example to reject requests earlier at your API gateway.