Laravel eCommerce DHL Shipping helps Bagisto stores offer DHL shipping services to customers.
The module connects your Bagisto store with DHL APIs.
It calculates DHL shipping rates based on the shipment details.
Customers can then select an available DHL shipping service at checkout.
The module supports both DHL XML API and DHL REST API.
The XML API supports DHL shipping rate calculation and checkout rate display.
However, the XML API does not generate shipping labels or commercial invoices.
The REST API provides more shipment features.
It calculates shipping rates and automatically generates the DHL shipping label when the shipment is created.
Also, the REST API supports DHL Commercial Invoice generation for international shipments.
The admin can manage the DHL settings from the Bagisto admin panel.
These settings include the shipping method name, origin address, countries, and shipping methods.
The admin can also set weight units, dimension units, content type, API credentials, and ready time.
Note: You must install Bagisto before using this module.
Complete Features of Laravel eCommerce DHL Shipping
- The admin can enable or disable DHL Shipping.
- The admin can set the DHL shipping method name.
- The admin can configure shipping by country.
- The admin can choose the allowed DHL shipping methods.
- The admin can select the weight unit.
- The admin can select the dimension unit.
- The admin can select the content type.
- The module supports DHL XML API and DHL REST API.
- The XML API calculates DHL shipping rates.
- The REST API also calculates DHL shipping rates.
- The REST API automatically generates the DHL shipping label when the shipment is created.
- The REST API supports DHL Commercial Invoice generation for international shipments.
- The admin can enter DHL API credentials.
- The admin can set package ready time.
- The admin can allow sellers to save DHL details.
DHL API Support in Laravel eCommerce DHL Shipping
Laravel eCommerce DHL Shipping supports two DHL API options.
DHL XML API for Shipping Rates
The DHL XML API is mainly used for rate calculation.
When the admin selects XML API, the module sends shipment details to DHL.
DHL then returns the available shipping rates.
The module displays these rates during customer checkout.
Therefore, the XML API works well when the store only needs DHL shipping rates.
- Fetch DHL shipping rates.
- Display DHL rates at checkout.
- Calculate shipping costs from DHL services.
However, the XML API does not support automatic shipping label generation.
It also does not support DHL Commercial Invoice generation.
DHL REST API for Shipment Management
The DHL REST API provides additional shipment features.
It can calculate DHL shipping rates for the customer checkout.
More importantly, the REST API automatically generates the DHL shipping label when the admin creates the shipment.
The admin does not need to create the label as a separate step.
In addition, the admin can generate a DHL Commercial Invoice for eligible international shipments.
- Fetch DHL shipping rates.
- Display DHL rates at checkout.
- Automatically generate the DHL shipping label during shipment creation.
- Generate a DHL Commercial Invoice for international shipments.
XML API vs REST API in DHL Shipping
| Functionality | XML API | REST API |
|---|---|---|
| Fetch DHL Shipping Rates | ✓ | ✓ |
| Display Rates at Checkout | ✓ | ✓ |
| Automatic Shipping Label Generation | ✗ | ✓ |
| Generate DHL Commercial Invoice | ✗ | ✓* |
*Note: Commercial Invoice generation applies to international shipments.
How to Install Laravel eCommerce DHL Shipping
- Open the
composer.jsonfile. - Find the
psr-4section. - Add the following package path.
"Webkul\\DHLShipping\\": "packages/Webkul/DHLShipping/src"
Next, open the bootstrap/providers.php file.
Add the DHL Shipping service provider to the provider list.
use Webkul\DHLShipping\Providers\DHLShippingServiceProvider;
return [
DHLShippingServiceProvider::class,
]
After that, run the following commands.
composer dump-autoload php artisan dhl-shipping:install
Finally, execute the Bagisto project on your configured domain.
Admin Configuration for DHL Shipping
After installation, the admin can configure DHL Shipping from the backend.
Go to Configure → Sales → Shipping.

First, configure the origin address.
DHL uses this address for shipping rate calculation and shipment processing.

Shipping Method Name
Enter the shipping method name.
This name appears to customers during checkout.
API Type
Next, select the DHL API type.
- XML API: Use it for DHL rate calculation and checkout rates.
- REST API: Use it for rates, automatic label generation, and international Commercial Invoice generation.
XML API Configuration

When you select XML API, enter the required DHL XML API credentials.
- The XML API fetches DHL shipping rates.
- The module displays the rates during checkout.
- The XML API does not generate shipping labels automatically.
- The XML API does not generate DHL Commercial Invoices.
REST API Configuration

When you select REST API, enter the required DHL REST API credentials.
- The REST API fetches DHL shipping rates.
- The DHL label generates automatically when the shipment is created.
- The admin can generate a Commercial Invoice for international shipments.
Note: Use REST API when you need automatic label generation.
REST API is also required for DHL Commercial Invoice functionality.
Account Number

Enter the DHL account number provided by DHL.
Weight Unit
Select the weight unit for DHL shipments.
You can use Pounds or Kilograms.
Dimension Unit
Select the unit for product dimensions.
You can use centimeters or inches.
Content-Type
Select the content type for your DHL shipment.
The available options are document and non-document.
Allowed Methods
Select the DHL shipping methods that customers can use.
Ready Time
Set the package ready time after order submission.
Enter the time in hours.
Allow Save DHL Details
Select Yes to let sellers save DHL details.
Allow Shipping For Countries
Select the countries where DHL Shipping should be available.
After entering all details, click the Save button.
Customer Checkout with DHL Shipping
After configuration, customers can use DHL Shipping during checkout.

The checkout page shows the available DHL shipping methods.
The module also displays the shipping rate for each available method.
The customer can then select the preferred DHL shipping method.
For XML API, the module fetches and displays DHL rates.
For REST API, the module also supports shipment features for automatic label generation.
After placing the order, the customer can view the order details.

The order summary shows the selected DHL shipping method.
DHL Shipment Management
The admin can manage DHL shipments from the Bagisto admin panel.
Go to Sales → DHL Shipments.
The DHL Shipments page shows the shipment records.
It includes the order ID, shipment ID, tracking number, product code, and status.

Next, click the eye icon to open a DHL shipment.
The shipment details page shows the order and shipment information.
Automatic DHL Shipping Label Generation
Automatic DHL shipping label generation works with the REST API.
When the admin creates a shipment, the REST API automatically generates the DHL shipping label.
Therefore, the admin does not need a separate label-generation step.
After shipment creation, the admin can access the generated label from the shipment details page.

The generated DHL label can then support shipment processing and dispatch.
Important: Automatic label generation requires the REST API.
The XML API only supports DHL rate calculation.
DHL Commercial Invoice for International Shipments
The DHL Commercial Invoice feature works with the REST API.
This feature applies to eligible international shipments.
The admin can generate the invoice from the DHL shipment details page.
The invoice can support customs and international shipping documentation.
- Commercial Invoice functionality requires the REST API.
- The feature applies to international shipments.
- The XML API does not support Commercial Invoice generation.
DHL Shipping API Capability Summary
| Capability | XML API | REST API |
|---|---|---|
| DHL Shipping Rate Calculation | ✓ | ✓ |
| Display Shipping Rates at Checkout | ✓ | ✓ |
| Automatic DHL Shipping Label Generation | ✗ | ✓ |
| DHL Commercial Invoice | ✗ | ✓* |
*Note: Commercial Invoice generation is available for international shipments.
Important DHL Shipping Notes
- Use the XML API when you only need DHL shipping rates.
- Use the REST API when you need automatic DHL label generation.
- Use the REST API for Commercial Invoice generation.
- Commercial Invoice generation applies to international shipments.
- Enter the correct DHL credentials for the selected API.
- Shipping availability depends on the selected countries and DHL methods.
Support
That concludes our Laravel eCommerce DHL Shipping user guide for Bagisto.
If you have any questions or need help with the DHL Shipping module, please contact our support team at [email protected].
You can also raise a support ticket through our HelpDesk System.
For custom development needs, explore our Laravel Development Services.
You can also explore our Bagisto Extensions to add more features to your store.
Current Product Version - v2.4.10
Supported Framework Version - v2.4.10
Be the first to comment.