> ## Documentation Index
> Fetch the complete documentation index at: https://developers.perform.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Outgoing webhooks push a signed JSON shipment update to your HTTPS endpoint each time Perform.AI processes new tracking events for a shipment.

**Available to all Post-Purchase customers.**

## Summary

Outgoing webhooks send a shipment update to an HTTPS endpoint you own each time Perform.AI processes new tracking events for a shipment. Your order management, customer service or warehouse system receives the shipment with its latest event and full event history as soon as they are known, without polling the API.

## Who it’s for

Integration and engineering teams who need delivery status inside their own systems: updating an order status, opening a customer service case on a failed delivery, or feeding an internal dashboard. Webhooks replace scheduled API polling with an event notification on every update.

## Key benefits

* **One message per update cycle.** A single webhook is sent when a shipment receives new events, even if those events satisfy several activated triggers. The `trigger` field lists the triggers that were satisfied.
* **The whole shipment in each webhook payload.** The JSON body carries the shipment, its order and addresses, the latest event, the new events of this cycle and all events, so your system does not have to call back for context.
* **Signed messages.** Every request carries an HMAC-SHA256 signature of the body, computed with the Authentication Key from your webhook configuration, so you can verify that the message came from Perform.AI.
* **Retries when your endpoint is down.** If your endpoint does not confirm receipt, Perform.AI resends the webhook.
* **Triggers and filters you choose.** Send on every event or only on the milestones you select, and limit a notification to given carriers, Tracking Pages or shipment tags.

## How it works

### Webhook endpoint

| Setting | Rule |
| - | - |
| Webhook endpoint name | Required. |
| Endpoint URL | A valid HTTPS URL for outgoing webhooks. Before the endpoint is saved, Perform.AI sends a sample payload to it to validate that it can receive and process a message. |
| HMAC Authentication key | The key used to sign every webhook. HMAC is the default authentication method. |

By default an account has one outgoing webhook endpoint URL. Your account team can enable additional endpoints.

### Delivery

| Aspect | Rule |
| - | - |
| Method and format | HTTPS POST with a JSON body. |
| Expected response | HTTP 200. |
| Frequency | One webhook per shipment per update cycle, listing all triggers satisfied in that cycle. |
| Retries | If no 200 is received, the webhook is resent up to three times, five minutes apart. After the third retry it is not resent. |

Missed webhooks are not replayed after the last retry. To fill gaps, use the [List Shipments API](https://developers.perform.ai/guides/list-shipments.md) filtered by `updated_date`.

### Webhook authentication

Each request includes an `HTTP-X-Hmac-SHA256` header. Its value is the HMAC-SHA256 of the request body, keyed with the Authentication Key from your webhook configuration. To verify a message, compute the same HMAC over the raw body you received and compare it with the header. A match means the message was sent by Perform.AI. Code samples are in the Developers guide: [Receive webhooks](https://developers.perform.ai/guides/webhooks.md).

HMAC is the default method. If you need another method, such as OAuth or JWT, ask your account team. If you filter inbound traffic to your endpoint, allowlist by hostname rather than by IP address.

### Triggers and filters

A webhook is an event notification created in the Notification Center, with Webhook as the channel and your endpoint as the destination. The Notification Center also sends Email and SMS notifications; see [Delivery Notifications](https://developers.perform.ai/products/post-purchase/delivery-notifications.md).

| Setting | Rule |
| - | - |
| Notification name | Required. Up to 32 characters. |
| Trigger | A trigger category from the list, shown with its event types. |
| Filters | Optional. Carrier, Tracking Page or shipment tags. |
| Endpoint | The configured webhook endpoint to send to. |

One webhook is sent per update cycle. Its `trigger` array lists the activated triggers the cycle satisfied, so your system receives one message per update even when several triggers match.

Events you add through the [Create Events API](https://developers.perform.ai/guides/create-events.md) also start an update cycle, so each call delivers a webhook.

Beyond event-based triggers, your account may support time-based triggers, such as collection reminders, no-update alerts and post-delivery feedback requests, depending on its configuration. Ask your account team to enable them.

### Webhook payload formats

Your account is configured for one payload format version. Ask your account team which version your account is on.

| Format | What it carries |
| - | - |
| 5.0 | The shipment: identifiers, carrier, status, current phase, tags, notification contacts, Tracking Page reference, order, addresses, value and costs, dimensions and weight, linked shipments, expected delivery, documents, custom fields, and the `latest_event`, `new_events` and `all_events` views. Reference: [Shipment update v5.0](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-0.md). |
| 5.2 | Everything in 5.0 plus richer shipment objects: line items, delivery rating, returns and collection point details. Reference: [Shipment update v5.2](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-2.md). |
| 5.3 | Everything in 5.2 plus expected delivery split by source and Performance Aspiration results. Reference: [Shipment update v5.3](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-3.md). |

Every payload carries `notification_type`, `trigger`, `version` and `data`. Timestamps are ISO 8601; precision varies by carrier, see [Timestamps](https://developers.perform.ai/essentials/timestamps.md). Dimensions are returned in centimetres, weight in grams, and money as an amount with an ISO 4217 currency code. The `event_key`, `phase` and `phase_key` of an event can be null when the carrier sent an event that has not yet been mapped to a Perform.AI standard event. The `expected_delivery` object is left out of formats 5.0 and 5.2 when neither you nor the carrier provided an expected delivery.

## How to set it up

Configure the webhook endpoint first, then create a notification that sends to it.

1. Go to **Settings** > **Integrations** > **Webhooks** and select **Configure**.
2. Enter the **Webhook endpoint name**, the **Endpoint URL** and the **HMAC Authentication key**, then select **Save**. Perform.AI sends a sample payload to the URL to validate it, so the endpoint must be live and able to process it.
3. Select **Activate** on the endpoint.
4. Go to **Post-Purchase** > **Notification** and select **Add Notification**.
5. Select **Webhook** as the communication channel.
6. Enter a notification name (up to 32 characters) and choose the trigger category.
7. Optionally, add carrier, Tracking Page or tag filters.
8. Select the endpoint.
9. Select **Save**, then **Activate**.

### Test your webhook endpoint

The sample payload sent when you save the endpoint confirms that your URL is reachable and accepts the message. Before going live, check your HMAC verification against the header of a received webhook, and check your handling of retries by returning an error status for a short time. The Developers guide covers an end-to-end test in [Receive webhooks](https://developers.perform.ai/guides/webhooks.md).

## Use via API and MCP

* Developers guide: [Receive webhooks](https://developers.perform.ai/guides/webhooks.md), including signature verification, payload fields and testing.
* Payload reference: [Shipment update v5.0](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-0.md), [v5.2](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-2.md) and [v5.3](https://developers.perform.ai/api-reference/webhooks/shipment-update-v5-3.md).
* To fill gaps after an outage, query [List shipments](https://developers.perform.ai/guides/list-shipments.md) for shipments updated in the affected window.

## FAQ

### How do I set up a webhook URL?

Add the endpoint under **Settings** > **Integrations** > **Webhooks**, then create a notification with Webhook as the channel in the Notification Center. Both must be activated before webhooks are sent.

### How do I know which webhook payload version I receive?

The format is set on your account, not per endpoint. Ask your account team which version applies, and build your parser to ignore fields it does not know.

### Will I get one webhook per trigger?

No. When a shipment receives new events, one webhook is sent for that update cycle. The `trigger` field lists the triggers that were satisfied.

### What happens if my endpoint is down?

Perform.AI resends the webhook up to three times, five minutes apart. Missed webhooks are not replayed after that, so query [List shipments](https://developers.perform.ai/guides/list-shipments.md) filtered by `updated_date` for the window to recover the state.

### Can I use another webhook authentication method instead of HMAC?

HMAC is the default. Other methods, such as OAuth or JWT, can be requested through your account team.

### Can I receive webhooks only for certain shipments?

Filter the webhook notification by carrier, Tracking Page or shipment tags. To limit it to a set of shipments, give those shipments a tag and filter the notification by that tag.

### Can I connect webhooks to a marketing or messaging tool?

For Klaviyo, see [Klaviyo](https://developers.perform.ai/products/integrations/klaviyo.md).

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| The endpoint cannot be saved | The URL did not accept the sample payload | Make sure the endpoint is live, accepts an HTTPS POST and returns HTTP 200, then save again. |
| No webhooks arrive | The endpoint or the webhook notification is not activated | Activate the endpoint under **Settings** > **Integrations** > **Webhooks** and the notification under **Post-Purchase** > **Notification**. |
| Webhooks arrive for only some shipments | Carrier, Tracking Page or tag filters on the notification exclude the rest | Edit the notification filters or remove them. |
| The signature check fails | The HMAC was computed over a modified body, or with a different key | Compute HMAC-SHA256 over the raw request body with the Authentication Key from your webhook configuration. |
| Updates are missing after an outage | Retries were used up while the endpoint was down | Fix the endpoint, then query List shipments filtered by `updated_date` for the window. Missed webhooks are not replayed. |

## Related

* [Delivery Notifications](https://developers.perform.ai/products/post-purchase/delivery-notifications.md)
* [Klaviyo](https://developers.perform.ai/products/integrations/klaviyo.md)
* [Data Integration](https://developers.perform.ai/products/platform/data-integration.md)
* [Integrations overview](https://developers.perform.ai/products/integrations/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.