Cargus WooCommerce integration: API key, Ship & Go and AWBs
· The AYT team · 5 min read

You integrate Cargus, a Romanian courier, with WooCommerce using the free, official plugin Cargus, published by Cargus eCommerce on wordpress.org. You need an API key from the UrgentCargus developer portal and the username and password of your Cargus account. Once it's set up you have the "Livrare Cargus" method for home delivery and "Cargus Ship & Go" for pickup points and lockers, and you generate AWBs (the courier's waybills) from orders, one at a time or in bulk.
What you need first
- a Cargus customer account (username and password);
- an API key from the UrgentCargus developer portal, obtained as below;
- WordPress 5.0, WooCommerce 4.0 and PHP 7.4 or newer, plus a
max_execution_timeof 90 seconds, according to the recommended requirements on the plugin page.
If the old UrgentCargus plugin is on your site, Cargus asks you to uninstall it before installing the new plugin, which replaces it.
The plugin has few reviews on wordpress.org, and some of them report problems after updates. Set it up and test it on a staging copy first, then repeat the steps on the live store.
Step 1: get the API key
The steps are the ones in the plugin's description:
- Open the UrgentCargus developer portal and click Sign up. You can't use your WebExpress login (Cargus's shipping app).
- Confirm the registration from the email you receive (use a real address).
- In the PRODUCTS menu, choose UrgentOnlineAPI, then Subscribe and Confirm.
- Wait for the email in which the Cargus team confirms your API subscription.
- Click your name at the top right, then Profile. Both keys are masked; click Show next to Primary key and copy it.
Cargus recommends using the Primary key in the plugin.
Step 2: install the plugin
In wp-admin, go to Plugins → Add Plugin, search for "Cargus", check the author (Cargus eCommerce), install and activate.
Step 3: set up "Livrare Cargus"
Go to WooCommerce → Settings → Shipping. The plugin adds its sections there: Livrare Cargus, Cargus Ship & Go and, for special services, Cargus Saturday, Cargus Pre10, Cargus Pre12 and Livrare Cargus Export. In Livrare Cargus, for home delivery, first fill in the connection details:
- Titlu (title): the method's name shown to the customer in the cart and checkout;
- URL Webservice: keep the default,
https://urgentcargus.azure-api.net/api; - API Key: the primary key from the portal;
- Nume utilizator and Parola: your Cargus account's username and password.
Save so the plugin connects to Cargus, then fill in the rest of the settings (the labels are in Romanian):
- Punct de ridicare: where the courier collects the parcels;
- Plan tarifar, Tip expeditie and Platitor expeditie: rate plan, shipment type and who pays;
- Asigurare and Deschidere colet: insurance and opening the parcel on delivery;
- Mod Incasare ramburs: how cash on delivery is collected, if you offer it;
- Cost fix transport (separately for Bucharest, if you want) or, with Activeaza costul de transport pe baza greutatii, fixed prices per weight band;
- Plafon transport gratuit: the basket value from which shipping is free;
- whether VAT is included in the calculated shipping cost;
- Format printare AWB: the AWB print format;
- Status comanda dupa genereare AWB and Status comanda dupa stergere AWB (spelled that way in the plugin): the order status after an AWB is generated and after it's deleted.
The plugin can also change the checkout address form: Camp Oras dropdown (on by default) turns the town into a list from Cargus's nomenclature, and Camp Strada si camp Numar (off by default) replaces the address field with a street from the nomenclature and a number. The postal code is filled in from the address.
Step 4: turn on Cargus Ship & Go
The Cargus Ship & Go section sets up delivery to Cargus pickup points and lockers. Enable it, set the title and price, then check that the map of points shows at checkout. The plugin also adds a payment method, "Plata ramburs la Ship & Go", for customers who pay when they collect the parcel.
Place a test order on staging and check on a phone how the map loads at checkout, especially if many of your visitors are on mobile.
Step 5: generate, print and delete AWBs
For a single order, open it: in the Cargus Shipping box on the right, click "Genereaza AWB". For several orders, select them in WooCommerce → Orders and choose "Cargus Generează Awb" from the bulk actions. The same actions include "Cargus Printează Awb" (print) and "Cargus Șterge Awb" (delete).
With bulk generation, orders with invalid data are skipped, and the message tells you which orders got an AWB. Check the others one by one: usually the postal code, street or weight is missing.
Common problems
The AWB won't generate because of the postal code
The plugin needs a valid postal code. Check the address on the order and correct it before generating the AWB.
Bulk generation stops halfway
With many orders at once, the request to Cargus can take a while. That's why the plugin page lists a max_execution_time of 90 seconds: check the value in the site's PHP settings, or generate AWBs in smaller batches.
I don't see the Cargus methods at checkout
Check that you saved the API key and account details, that the methods are enabled in their sections and that the customer's address is in Romania.
Cargus on a store hosted at AYT
On AYT WordPress hosting you set max_execution_time to 90 seconds from the domain's PHP settings (php.ini) page, without editing files. You test the plugin on a staging site created from the WordPress Toolkit, and daily backups let you go back to the previous version if a plugin update breaks something. You see the site's errors in the panel, on the Errors page, which helps when an AWB won't generate and the message in wp-admin doesn't say why.
