Overview
Webhooks notify your application when parcel events occur in real-time, eliminating the need to poll for updates.Setup
- Go to Dashboard → Settings → Webhooks
- Add your endpoint URL (must be HTTPS)
- Select the events you want to receive
- Save and test the webhook
Configure separate URLs for sandbox and production environments.
Webhook Format
All webhooks follow this structure:Event Types
parcel.status_changed
Triggered when a parcel’s status changes.parcel.delivered
Triggered when a parcel is delivered.parcel.exception
Triggered when a delivery exception occurs.manifest.submitted
Triggered when a manifest is successfully submitted.Webhook Handling
Basic Handler
Async Processing
Process webhooks asynchronously to respond quickly:Security
Signature Verification
All webhooks include a signature header for verification:IP Whitelist
Webhooks are sent from these IP addresses:Retry Policy
After all retries fail, the webhook is marked as failed. Check the dashboard for failed webhooks.
Best Practices
Respond Quickly
Respond Quickly
Return 200 within 5 seconds. Process asynchronously if needed.
Handle Duplicates
Handle Duplicates
Use the
id field to deduplicate webhooks. Same event may be sent multiple times.Verify Signatures
Verify Signatures
Always verify the webhook signature to prevent spoofing.
Log Everything
Log Everything
Store raw webhook payloads for debugging and audit purposes.
Testing
Send test webhooks from the dashboard:- Go to Webhooks → Test
- Select event type
- Click Send Test Webhook