Skip to content

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

  1. Log in to your Delhivery dashboard
  2. Go to API Setup or contact your Delhivery account manager
  3. 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

  1. Go to Admin Panel > Plugins
  2. Find Delhivery and click Enable
  3. Click Settings
  4. Fill in all the required fields (see table below)
  5. Click Save

Plugin Settings

SettingWhat to Enter
API TokenYour Delhivery API token from the dashboard
Use Staging APIToggle on to use the sandbox/test API. Turn off for live shipments
Pickup Location NameThe name of your warehouse/pickup location as registered with Delhivery
Pickup PhoneContact phone number for the pickup location
Pickup AddressFull address of the pickup location
Pickup CityCity of the pickup location
Pickup StateState of the pickup location
Pickup PincodePIN 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 ConfirmToggle 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:

  1. A customer places an order on your store
  2. You go to Admin Panel > Orders and change the order status to Confirmed
  3. The plugin sends the order and shipping details to Delhivery
  4. Delhivery creates the shipment and assigns a waybill number
  5. The waybill number and tracking URL are saved to the order
  6. 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.

Shop Craft Documentation