Webhooks

Real-time HTTP notifications for shipment status changes, e-commerce events, and billing surcharges.

The platform can notify your systems in real time whenever something important happens to a shipment or billing record. These notifications are called webhooks — outbound HTTP calls sent to a URL you configure.

Register one or more webhook endpoints through the API or the dashboard. Each endpoint is associated with a webhook type that determines which events it receives and what information is included.

Webhook types

IDNameDescription
1onShipmentStatusUpdateSimple notification when a shipment changes status (e.g. picked up, in transit, delivered). Includes carrier name, tracking number, and new status.
2statusUpdateWithEcommerceInfoSame as type 1 but adds e-commerce context: shop ID, order identifier, order number, and order name. Useful when you need to correlate shipment events with online store orders.
3simpleTrackingSecond-generation (v2) version of the simple status update. Uses a standardized envelope, HMAC signature for security, and reliable queued delivery with retries.
4ecommerceTrackingSecond-generation (v2) version of the e-commerce update. Same v2 envelope and security as type 3, plus order data fields.
5surchargeNotifies when a new surcharge or refund is applied to a shipment. Includes the surcharge amount, currency, category, reason, and whether it is a charge or a refund.

Key benefits

  • Real-time awareness — Learn about status changes and billing events as they happen, without polling.
  • Flexible configuration — Register multiple endpoints for different event types.
  • Security — v2 webhooks include HMAC-SHA256 signatures so you can verify that requests genuinely come from the platform.
  • Reliability — v2 webhooks are delivered through a queue with automatic retries and deduplication, reducing the chance of missed or duplicate notifications.

Version differences (v1 vs v2)

  • v1 (types 1 and 2) — Legacy format. Simple JSON body sent directly with optional Bearer-token authentication. Fire-and-forget delivery.
  • v2 (types 3, 4, and 5) — Modern format. Standardized JSON envelope (type, created_at, data), HMAC-signed headers, queued delivery with retries and deduplication.

We recommend migrating from v1 to v2 for better security and reliability.


Payload reference

Type 1 — onShipmentStatusUpdate

AttributeValue
Versionv1 (legacy)
EventShipment changes status
DeliveryDirect HTTP POST (fire-and-forget)
AuthOptional Bearer token

Fires every time a shipment transitions to a new status (e.g. picked up, in transit, out for delivery, delivered, exception).

FieldTypeDescription
carrierNamestringName of the shipping carrier (e.g. "fedex", "estafeta").
trackingNumberstringThe carrier's tracking number for the shipment.
statusstringThe new shipment status.
{
  "carrierName": "fedex",
  "trackingNumber": "100000",
  "status": "Delivered"
}

When to use: Basic integrations that only need carrier, tracking number, and current status. No order or e-commerce context.


Type 2 — statusUpdateWithEcommerceInfo

AttributeValue
Versionv1 (legacy)
EventShipment changes status (with e-commerce context)
DeliveryDirect HTTP POST (fire-and-forget)
AuthOptional Bearer token

Same trigger as type 1 — any shipment status change — but the payload includes e-commerce order information.

FieldTypeDescription
carrierNamestringCarrier name.
trackingNumberstringTracking number.
statusstringNew shipment status.
movementDatenullReserved for future use. Currently always null.
orderDataobjectE-commerce order context (see below).

orderData fields:

FieldTypeDescription
shopIdnumberID of the e-commerce shop.
orderIdentifierstringFull order identifier from the shop (may include suffixes for split orders).
orderNumberstringOrder number in the shop.
orderNamestringDisplay name of the order in the shop.
{
  "carrierName": "Paquetexpress",
  "trackingNumber": "123456789",
  "status": "Delivered",
  "movementDate": null,
  "orderData": {
    "shopId": 12345,
    "orderIdentifier": "2345678923456-1",
    "orderNumber": "2345678923456",
    "orderName": "923456"
  }
}

When to use: E-commerce integrations that need to match shipment events back to specific store orders. Recommended over type 1 when order correlation is required.

If the shipment record is missing order_number or order_name, the system automatically looks them up before sending.


Type 3 — simpleTracking

AttributeValue
Versionv2
Event nametracking.simple
DeliveryQueued with retries and deduplication
AuthHMAC-SHA256 signature

Same trigger as type 1 — shipment status change — but uses v2 infrastructure.

FieldTypeDescription
typestringAlways "tracking.simple".
created_atstring (ISO 8601)Timestamp of the event.
data.shipment_idnumberInternal shipment ID.
data.tracking_numberstringCarrier tracking number.
data.statusstringNew shipment status.
data.carrier_namestringCarrier name.
{
  "type": "tracking.simple",
  "created_at": "2025-01-15T10:30:00.000Z",
  "data": {
    "shipment_id": 12345,
    "tracking_number": "ABC123",
    "status": "Delivered",
    "carrier_name": "fedex"
  }
}

v2 HTTP headers:

HeaderExample value
X-Webhook-Eventtracking.simple
X-Webhook-Signaturev1=a3f2...
X-Webhook-Timestamp1705312200
X-Webhook-Idshu-12345-8
X-Webhook-Version2025-09-01

When to use: Recommended replacement for type 1. Same shipment data but with signature verification, reliable delivery, and a standardized envelope.


Type 4 — ecommerceTracking

AttributeValue
Versionv2
Event nametracking.ecommerce
DeliveryQueued with retries and deduplication
AuthHMAC-SHA256 signature

Same trigger as type 2 — shipment status change for e-commerce orders — using v2 infrastructure.

FieldTypeDescription
typestringAlways "tracking.ecommerce".
created_atstring (ISO 8601)Timestamp of the event.
data.shipment_idnumberInternal shipment ID.
data.tracking_numberstringCarrier tracking number.
data.statusstringNew shipment status.
data.carrier_namestringCarrier name.
data.order_dataobjectE-commerce order context (see below).

order_data fields:

FieldTypeDescription
shop_idnumberE-commerce shop ID.
order_identifierstringFull order identifier.
order_numberstringOrder number.
order_namestringDisplay name of the order.
{
  "type": "tracking.ecommerce",
  "created_at": "2025-01-15T10:30:00.000Z",
  "data": {
    "shipment_id": 12345,
    "tracking_number": "ABC123",
    "status": "Delivered",
    "carrier_name": "fedex",
    "order_data": {
      "shop_id": 12345,
      "order_identifier": "2345678923456-1",
      "order_number": "2345678923456",
      "order_name": "923456"
    }
  }
}

When to use: Recommended replacement for type 2. E-commerce integrations that need order context with v2 security and reliability.

If the shipment record is missing order_number or order_name, the system automatically looks them up before sending.

v2 uses snake_case (order_data, shop_id) while v1 uses camelCase (orderData, shopId).


Type 5 — surcharge

AttributeValue
Versionv2
Event namesurcharge
DeliveryQueued with retries and deduplication
AuthHMAC-SHA256 signature

Fires when a surcharge (extra charge) or refund is applied to a shipment.

FieldTypeDescription
typestringAlways "surcharge".
created_atstring (ISO 8601)When the surcharge was created.
data.surcharge_idnumberUnique ID of the surcharge record.
data.shipment_idnumberShipment the surcharge applies to.
data.tracking_numberstringTracking number of the shipment.
data.carrier_namestringCarrier name.
data.surcharge_dataobjectSurcharge details (see below).

surcharge_data fields:

FieldTypeDescription
surcharge_typestringCategory of surcharge (e.g. "Overweight", "Address correction").
reasonstringHuman-readable reason for the surcharge. Empty if not provided.
amountnumberMonetary amount of the surcharge.
currencystringCurrency code (e.g. "MXN", "USD").
transaction_typestringEither "surcharge" (a charge) or "refund" (money returned).
{
  "type": "surcharge",
  "created_at": "2025-01-15T10:30:00.000Z",
  "data": {
    "surcharge_id": 100,
    "shipment_id": 12345,
    "tracking_number": "ABC123",
    "carrier_name": "fedex",
    "surcharge_data": {
      "surcharge_type": "Overweight",
      "reason": "Package exceeded weight limit",
      "amount": 150.00,
      "currency": "MXN",
      "transaction_type": "surcharge"
    }
  }
}

When to use: Billing and finance integrations that need real-time notification of extra charges or refunds applied to shipments.

Each surcharge notification uses a unique event ID for deduplication, so the same surcharge can be delivered to multiple endpoints without duplicates.


Comparison matrix

FeatureType 1Type 2Type 3Type 4Type 5
NameonShipmentStatusUpdatestatusUpdateWithEcommerceInfosimpleTrackingecommerceTrackingsurcharge
EventStatus changeStatus changeStatus changeStatus changeSurcharge/refund
Order dataNoYesNoYesNo
Versionv1v1v2v2v2
EnvelopeFlat JSONFlat JSON{type, created_at, data}{type, created_at, data}{type, created_at, data}
NamingcamelCasecamelCasesnake_casesnake_casesnake_case
AuthBearer tokenBearer tokenHMAC-SHA256HMAC-SHA256HMAC-SHA256
DeliveryFire-and-forgetFire-and-forgetQueued + retriesQueued + retriesQueued + retries
DeduplicationNoNoYesYesYes
RecommendedLegacyLegacyYesYesYes