devajmeireles/paghiper-for-laravel
Seamless Laravel integration for PagHiper, the Brazilian payment gateway, letting you quickly generate boleto and PIX charges, manage transactions, and handle payment notifications directly within your PHP applications through a clean, fluent API.
Architecture fit. devajmeireles/paghiper-for-laravel is a conventional Laravel package: a service provider, publishable configuration, facade-style entry point, and an HTTP client layer wrapping PagHiper's REST API. For a Laravel application in the Brazilian market, this fits the framework's idioms cleanly — configuration in config/, credentials in .env, and calls made through a container-bound client rather than raw cURL scattered through controllers. The package is therefore a reasonable fit for teams that already run Laravel and need boleto and/or PIX issuance without building a PagHiper client from scratch. It is not an architectural centerpiece; it is an outbound integration adapter. That distinction matters for the TPM: treat it as a replaceable dependency behind an application-owned interface (PaymentGateway / BoletoIssuer), not as a domain layer.
Integration feasibility. Composer install, credential configuration, and a first sandbox transaction are realistically a one-to-two-day task for a Laravel developer familiar with payment flows. The hard parts are not the package — they are PagHiper-specific: account onboarding, API key/token provisioning, boleto vs. PIX product selection, fee/settlement rules, and webhook registration. The package's small surface area is an advantage here; there is little to learn and little to misconfigure. Feasibility is high for a single-tenant Laravel app and moderate for multi-tenant SaaS, where per-tenant credentials, token isolation, and webhook routing must be designed on top of the package rather than assumed from it.
Technical risk. The dominant risk is vendor and maintainer concentration, not code quality. With ~21 stars, zero dependents, and a single maintainer, the package has no meaningful community redundancy. A breaking PagHiper API change, an abandoned release cadence, or a maintainer stepping away would leave the team owning a fork. The stated last release date of 2026-10-20 is a positive signal on recency but should be verified against the actual tag history and changelog. Secondary risks: undocumented Laravel/PHP version support boundaries, unclear test coverage, webhook signature verification behavior, and whether idempotency keys are exposed to callers. None of these are disqualifying for a low-to-moderate volume integration, but they must be validated in a sandbox before production commitment.
Key questions.
composer.json, and is there a CI matrix proving it?Stack fit. The package assumes a standard Laravel stack: Composer, PHP 8.x, Laravel's service container, HTTP client, and queue system. It slots naturally into monoliths and modular Laravel applications using Blade, Livewire, or Inertia front ends. It is a poor fit for non-Laravel PHP services, polyglot architectures where payments are owned by a separate service, or teams standardizing on a payment orchestrator (Stripe, Adyen, EBANX) that already abstracts Brazilian methods. In those cases the package should be skipped in favor of a thin internal client or the orchestrator's native boleto/PIX support.
Migration path. For teams currently issuing boletos via raw cURL, SOAP-era scripts, or manual bank integrations, the migration is incremental: introduce the package behind an application-owned PaymentGateway contract, implement that contract with the package, and route existing call sites through the contract. This preserves the option to swap to another PagHiper client or gateway without touching domain code. For teams on another gateway, do not rip and replace in one step — run PagHiper in parallel for a defined cohort, reconcile settlement reports, then cut over. Persist gateway payloads and responses (with sensitive fields redacted) so reconciliation and dispute handling remain possible after migration.
Compatibility. Verify three axes before committing: Laravel/PHP version support, PagHiper API version (v1 vs. v2 endpoints differ materially), and dependency footprint (Guzzle version, PSR compliance). Because the package has no dependents, there is no ecosystem evidence of compatibility in exotic setups — multi-database, Octane, or queued workers with long-running containers. Test under the actual runtime (Octane, Horizon workers) rather than only under php artisan serve, since singleton credential binding and HTTP client reuse behave differently in long-lived processes.
Sequencing.
Maintenance. Expect to own the integration more than the star count suggests. Pin the package to an exact version, wrap it behind an internal interface, and budget a recurring review (quarterly is reasonable) of upstream tags, PagHiper API changes, and Laravel major-version compatibility. The MIT license and small codebase make forking viable, which is the real mitigation: the team should be able to vendor the package in an afternoon if upstream goes quiet. Treat any upstream change to credential handling or webhook verification as a security-relevant review, not a routine bump.
Support. Support is community-only: GitHub issues, the maintainer's availability, and PagHiper's own documentation and account support. There is no vendor SLA, no paid support tier, and no evidence of a second maintainer. Escalation for production incidents is effectively internal. This is acceptable for a supplementary payment method in a Brazilian product; it is not acceptable as the sole revenue path for a high-volume business without an internal owner and a tested fallback (manual boleto issuance or a secondary gateway).
Scaling. The package itself is stateless and scales with the application; the constraints are PagHiper's API rate limits, boleto/PIX issuance latency, and webhook delivery behavior. Issue charges asynchronously where the UX allows, queue webhook processing, and decouple reconciliation into scheduled jobs. Watch for HTTP client timeouts and retries without idempotency — these are the classic source of duplicate boletos. For multi-tenant products, ensure credentials and webhook secrets are resolved per tenant at call time; a singleton config binding is a latent cross-tenant leak.
Failure modes.
Ramp-up. Developer ramp-up is low — a Laravel engineer is productive in a day. Domain ramp-up is the real cost: boleto lifecycle (registration, due dates, cancellation, payment notification, settlement timing), PIX expiration and refund semantics, fee structures, and Brazilian reconciliation practices. Assign a product/ops owner for payment reconciliation, not just an engineer for the integration. Budget roughly one to two weeks of combined engineering and finance/ops time to reach confident production operation, and document the runbook — credential rotation, webhook replay, duplicate charge remediation, and gateway failover — before go-live.
How can I help you explore Laravel packages today?