Offer Melhor Envio carriers at checkout and buy, print and track the labels from the order page, in reais.
Tested on 2 buildsUpdated Nov 25, 2026Version 1.0.1CS-Cart, Multi-Vendor 4.17.2 – 4.22.x No core file edits
Built for
Melhor Envio Shipping & Labels: overview1 of 9
What it does
Melhor Envio for Brazilian stores on CS-Cart and Multi-Vendor. Show the freight of your own Melhor Envio account at checkout, then add the label to the cart, pay it from your balance, generate and print it from the order page. You need a Melhor Envio account and an application of your own; Melhor Envio and the carriers charge their own fees.
How it works
Register an application in the sandbox, enter its Client ID and secret and approve it with one click. Add a shipping method for each Melhor Envio service. Customers see live prices and delivery times. On the order tab you add the label to the cart or buy it, print it and follow the tracking; webhook and cron update the order status. Failed jobs are retried and listed in the log.
Features
Live quotes from Melhor Envio at checkout, in reais converted to the store currency, with extra days, extra fee and free-shipping threshold
OAuth2 connection with your own application, separate sandbox and production, tokens renewed automatically and stored encrypted
Label flow on the order page: add to cart, pay from the balance, generate, print, cancel
CPF, CNPJ (also the alphanumeric one) and NF-e key checks, content declaration or invoice shipment
Tracking by webhook and cron, order statuses for posted and delivered, CS-Cart shipment with the tracking number
Safe against double payment, lost answers and double clicks
Job queue with automatic retries and a log with filters, CSV export and masked personal data
Multi-Vendor: one marketplace account (vendors view and print) or one account per vendor
What you get
Package
kv_melhor_envio-1.0.0.zip, installed through Add-ons → Manage add-ons
Updates & support
12 months included. Download new versions from your account and install them in Add-ons → Manage add-ons or the Upgrade Center.
License
1 production installation. Staging, dev and localhost are free and unlimited. The add-on keeps working after the update period ends. How licensing works
For developers
Uses 5 CS-Cart PHP hooks. No core files are changed.
Compatibility
We list only the builds we install and test on. “Tested” means the full test plan was run on that build; “Supported” means the build is inside the supported range and uses the same hooks.
CS-Cart version and edition compatibility
CS-Cart version
CS-Cart
CS-Cart Ultimate
Multi-Vendor
Multi-Vendor Ultimate
4.22 and later
Testing next
Testing next
Testing next
Testing next
4.21.2
Supported
Supported
Supported
Supported
4.20.x
Supported
Supported
Supported
Supported
4.19.x
Supported
Supported
Supported
Supported
4.18.x
Supported
Supported
Supported
Supported
4.17.2
Supported
Supported
Tested
Supported
Before 4.17.2
Not supported
Not supported
Not supported
Not supported
Last tested build: Multi-Vendor 4.17.2, Nov 25, 2026Tested on: Multi-Vendor 4.17.2
Requirements
Platform
CS-Cart and Multi-Vendor 4.17.2 or later
Requirement
Administrator access to the store's admin panel
Requirement
A Melhor Envio account. You register an application in your own account (Integracoes > Area Dev > Seus aplicativos) and get its Client ID and secret; the sandbox (a separate environment with a fictitious balance, Correios and Jadlog only) needs its own account and application
Requirement
Brazil, the real (BRL) as a store currency (it can be a secondary currency: prices are converted) and CEPs on the shipping and sender addresses
Requirement
A cron job on your server (see step 8)
Core changes
None. Hooks and template overrides only
1.0.0
Nov 25, 2026
Latest
Added 9
Initial release.
OAuth2 connection with the merchant's own Melhor Envio application (sandbox and production), tokens sealed in the database, one renewal under a lock after a 401, daily keep-alive, a rejected authorization pauses the connection.
Shipping services Correios PAC, SEDEX and Mini Envios and Jadlog .Package and .Com (the documented list); "Refresh services" adds the other services of the account.
Checkout quotes: one Melhor Envio request per package set serves every method, 5 second timeout, time cache, short negative cache, BRL to store currency conversion, extra days, extra fee, free-shipping threshold, optional fallback rate; a failure never blocks checkout.
Label flow on the order page: add to the Melhor Envio cart, pay from the balance, generate, print, cancel; CPF, CNPJ (also the alphanumeric one) and NF-e key checks; content declaration or invoice shipment; one label per order unless an additional package is chosen.
Money safety: per-order lock, row written before the cart request, lost answers reconciled with the official lookups before anything is paid or sent again, double clicks pay once.
Tracking by the signed webhook and by cron (20 labels per request), order statuses for posted and delivered, CS-Cart shipment with the tracking number.
Multi-Vendor: marketplace owner mode (vendors view and print, never create, pay or cancel; status automation skipped) or one account per vendor.
Job queue with retries and back-off, cron (command line and secret address), log viewer with CSV export and masked personal data.
Tested on Multi-Vendor 4.17.2. First release.
Does it work with CS-Cart and Multi-Vendor?
Yes, all four editions. In Multi-Vendor the marketplace owner can use one Melhor Envio account for everyone or let each vendor connect their own.
Which CS-Cart versions are supported?
4.17.2 to 4.21.x.
Do I need a Melhor Envio account?
Yes. You register an application in your own Melhor Envio account (and one in the sandbox to try it). The add-on never sees your Melhor Envio password: you approve the application in the browser and Melhor Envio hands the add-on a token.
Which carriers are supported?
The ones Melhor Envio quotes for you: the documented services are Correios PAC, SEDEX and Mini Envios and Jadlog .Package and .Com, and Refresh services adds the other services your account lists. Label purchase through the API depends on the carrier (for example Azul Cargo quotes, but its labels are bought in Melhor Envio).
Does it spend money by itself?
No. A label is paid only when someone presses Buy label or Pay and generate. The status automation only puts a label in your Melhor Envio cart.
Where are my credentials stored?
In your own database, encrypted. The key is derived from your store's secret in config.php, so a database dump alone does not reveal them. They are never shown again after saving.
Does it send data to Kavio Labs?
No. The add-on talks to Melhor Envio only. The license check sends your domain name to the Kavio Labs license server once a day (Kavio Labs downloads).
What data goes to Melhor Envio?
What a label needs: sender and recipient name, address and CPF or CNPJ, the package and the declared goods. Phone and e-mail are sent only if you turn that setting on.
What happens when Melhor Envio is down?
At checkout the methods are not offered (or your fallback rate is) after a short timeout. Background jobs wait and are retried automatically (5 minutes up to 12 hours). Labels are never paid twice.
What happens when the license expires?
New work stops (no quotes, no new labels). Tracking and work already under way are still finished.
How do I get updates?
Install the new package over the old one. See Installation.