Appearance
Delhivery Plugin
The Delhivery plugin integrates your store with Delhivery, one of India's largest logistics and courier companies. When an order is confirmed, the plugin automatically creates a shipment, generates a waybill number, and updates the order with tracking information.
What It Does
- Auto-creates shipments on Delhivery when you confirm an order
- Generates waybill tracking numbers and stores them on the order
- Creates tracking URLs so customers can follow their deliveries
- Handles both prepaid and COD (Cash on Delivery) orders
- Supports staging/sandbox mode for testing before going live
Requirements
- An active Delhivery business account (delhivery.com)
- Your Delhivery API token
- A pickup location registered with Delhivery
Setting Up Delhivery
Step 1: Get Your API Token
- Log in to your Delhivery dashboard
- Go to API Setup or contact your Delhivery account manager
- Copy your API token
Step 2: Register a Pickup Location
Make sure you have a pickup/warehouse address registered with Delhivery. You will need the following details:
- Pickup location name
- Full address
- City and state
- PIN code
- Contact phone number
Step 3: Configure the Plugin
- Go to Admin Panel > Plugins
- Find Delhivery and click Enable
- Click Settings
- Fill in all the required fields (see table below)
- Click Save
Plugin Settings
| Setting | What to Enter |
|---|---|
| API Token | Your Delhivery API token from the dashboard |
| Use Staging API | Toggle on to use the sandbox/test API. Turn off for live shipments |
| Pickup Location Name | The name of your warehouse/pickup location as registered with Delhivery |
| Pickup Phone | Contact phone number for the pickup location |
| Pickup Address | Full address of the pickup location |
| Pickup City | City of the pickup location |
| Pickup State | State of the pickup location |
| Pickup Pincode | PIN code of the pickup location |
| Default Weight (grams) | Default package weight in grams (e.g., 500). Used when product weight is not specified |
| Auto-create Shipment on Confirm | Toggle on to automatically create shipments when orders are confirmed |
TIP
Start with the Use Staging API toggle enabled to test the integration without creating real shipments. Once everything works correctly, turn it off to go live.
How It Works
Once the plugin is configured and the auto-create toggle is enabled:
- A customer places an order on your store
- You go to Admin Panel > Orders and change the order status to Confirmed
- The plugin sends the order and shipping details to Delhivery
- Delhivery creates the shipment and assigns a waybill number
- The waybill number and tracking URL are saved to the order
- Customers can track their delivery using the provided link
WARNING
The plugin only triggers when an order status is changed to Confirmed. Changing to any other status will not create a shipment.
Tracking Information
When a shipment is created successfully, the plugin adds:
- Tracking ID -- the waybill number assigned by Delhivery
- Tracking URL -- a direct link to Delhivery's package tracking page
This information appears on the order in both the admin panel and the customer's order history.
Troubleshooting
Shipments are not being created
- Make sure the plugin is enabled and Auto-create Shipment on Confirm is toggled on
- Verify the order status was changed to Confirmed
- Check that the order has a complete shipping address
"API token not configured" error
- Open the plugin settings and make sure your Delhivery API token is entered correctly
"Pickup location not configured" error
- Fill in the Pickup Location Name field in the plugin settings
Shipment created but no tracking number
- The waybill may not have been assigned yet. Check your Delhivery dashboard
Testing with the staging API
- Enable the Use Staging API toggle to use Delhivery's sandbox environment. Remember to turn it off before going live with real orders
TIP
Check storage/logs/laravel.log for detailed error messages if shipments are failing. The plugin logs all API errors with helpful context.