Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Correios Api

Correios Api Laravel Package

marcelofecchio/correios-api

Laravel/PHP package that provides a clean integration with the Correios API for Brazilian e-commerce applications. Simplifies shipping rate calculations, delivery tracking, and other Correios services through a configurable wrapper that reduces boilerplate.

View on GitHub
Deep Wiki
Context7

Componente PHP 8.4 para a API REST dos Correios (CWS) e etiquetas ZPL

Frequently asked questions about Correios Api
How do I install marcelofecchio/correios-api in a Laravel application?
Install it with Composer using composer require marcelofecchio/correios-api. The package requires PHP 8.4, so confirm your Laravel runtime meets that before adding it. After installation, follow the repository README for any service provider, configuration publishing, or credential setup steps.
Does this package support Laravel 10, 11, or 12?
The package is documented as a PHP 8.4 component, so PHP 8.4 is the hard requirement to verify first. The provided material does not list explicit Laravel version constraints, so check composer.json and the README for the supported Laravel range. It is pre-1.0 at v0.5.0, so pin a version and review minor releases before upgrading.
What Correios services can I use with this package?
It wraps the Correios REST API, CWS, for common Brazilian e-commerce flows such as shipping rate calculation, delivery tracking, pre-postagem, and DC-e emission. It also supports ZPL label output. The package is a configurable wrapper intended to reduce boilerplate, but you still need valid Correios credentials and contract data.
How do I generate ZPL labels for Correios shipping?
ZPL label support is one of the package's stated capabilities, alongside the Correios REST API integration. In practice you will create the pre-postagem or label data through the package and pass the resulting ZPL to your printer or label service. Check the README for the exact label methods and required fields, because the provided excerpt does not include method signatures.
What is contribuinteIcms and why does the package block emiteDCe?
contribuinteIcms is a Pessoa attribute that marks a sender as an active ICMS taxpayer. When it is true, the package fails fast on emiteDCe with ErroValidacao instead of calling Correios, because those senders must use chaveNFe emission. When it is false or omitted, existing DC-e flows remain unchanged. The flag is only as reliable as your cadastro or ERP data.
How does the package detect Correios Rejeição 812 for ICMS taxpayers?
The package exposes ErroContribuinteIcms, which subclasses ErroApi, and detection helpers on PrePostagemCriada and ProcessamentoAssincrono. Its reconhece() method currently matches rejection 812 by message and causa text rather than a stable rejection code. The maintainer indicates the exact Correios/SEFAZ output has not been observed, so treat this as provisional and monitor for generic ErroApi failures. If wording differs, the block can silently fail.
Do I need to change my database for Pessoa contribuinte_icms?
Yes, contribuinte_icms is a new attribute on Pessoa, so review any persisted sender records, fixtures, seeders, and API resources with strict validation or serialization. Plan a schema or column change if you store Pessoa locally, plus a backfill strategy for existing senders. Mis-flagging is costly in both directions, so tie the value to an authoritative inscrição estadual source.
How should I handle asynchronous Correios processing and late Rejeição 812?
Async failures can surface through ProcessamentoAssincrono::recusadaPorContribuinteIcms(), which means rejection 812 may appear long after submission in batch or webhook processing. Monitor those paths explicitly and alert on both ErroContribuinteIcms and generic ErroApi outcomes. Before the 02/11/2026 enforcement date, drain or reclassify queued pré-postagens that could straddle the cutover.
Is this package production-ready and how should I test it?
Treat it as pre-1.0 software: v0.5.0 is usable, but semver minor releases can carry behavioral nuance, including validation-refusal paths when you opt into contribuinteIcms. Pin the version, test the opt-in flag with realistic sender data, and add monitoring for rejection 812. For application tests, isolate Correios calls behind your own adapter and use HTTP fakes or a sandbox where available.
What are alternatives to marcelofecchio/correios-api?
Alternatives include integrating the Correios CWS API directly with Laravel's HTTP client, using a generic Correios SDK, or adopting another maintained Laravel shipping package. This package is a reasonable fit if you want a configurable wrapper with pre-postagem, DC-e, tracking, rates, and ZPL support plus the new ICMS taxpayer guard. Evaluate maintenance activity, PHP 8.4 and Laravel compatibility, and whether the provisional rejection 812 text matcher meets your production monitoring needs.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo