infobip/infobip-api-php-client
Official PHP client for the Infobip API, giving Laravel and PHP apps PSR-compatible access to SMS, WhatsApp, email, voice and 2FA messaging, with request builders, models and error handling for fast omnichannel integration.
Architecture fit — A plain Composer package with no Laravel coupling: no service provider, facade, config file, or notification channel is shipped. It is a transport library, not a framework integration, so the TPM must budget for an internal adapter layer regardless of adoption. It speaks PSR-18/Guzzle, which binds cleanly into Laravel's container as a singleton behind a config-driven factory.
Integration feasibility — High, with a wide effort band. First message in staging is roughly 1–2 days for a mid-level Laravel developer (Composer install, service provider binding, credentials, one send call). Production-grade is closer to 1–2 weeks once queueing, retry policy, delivery-report webhooks, idempotency, and observability are included.
The material decision is adopt vs. bypass. The current generation of this SDK is generated from Infobip's OpenAPI specification: broad endpoint coverage, but non-idiomatic PHP, a large generated surface, and noisy diffs between majors. For a narrow scope (transactional SMS plus delivery reports), calling Infobip's REST API directly through Laravel's Http client is defensible and lower total cost of ownership. For a multi-channel roadmap (SMS, WhatsApp, Viber, 2FA, email), the SDK's coverage pays for the ergonomics tax.
Technical risk
Key questions
SmsSender contract or notification-channel abstraction already exist to plug into?Stack fit — Laravel 9/10/11 on PHP 8.1+ with Guzzle 7; standard composer require, no known conflicts. Use a dedicated service provider with a singleton binding and a published config file holding base URL, API key reference, and timeout defaults. Cache config in production and never resolve credentials from env() at request time.
Adapter boundary — Wrap the SDK in an application-owned interface (e.g. SmsSender) with an InfobipSmsSender implementation. Build a custom Laravel notification channel over that adapter (~150 LOC) rather than depending on thin community channel packages. This keeps SDK majors isolated to one file, preserves a fallback provider path, and makes the DTO mapping testable with a fake PSR-18 client.
Migration path — Shadow/dual-send: route a defined slice of traffic (by country or percentage) through Infobip while the incumbent remains authoritative, then compare delivery receipts, latency, and cost for 2–4 weeks. Cut over per country. Keep the legacy code path behind a feature flag for one full release cycle before deletion.
Compatibility — Pin the major version, commit the lock file, and enable grouped dependency updates. Isolate all generated model usage inside the adapter; queue payloads and domain events should carry application-owned structs so an SDK bump cannot cascade into application refactors.
Sequencing
Maintenance — Low cadence (last release January 2025) and vendor-owned, so the burden is review, not repair. Realistic budget is a quarterly upgrade review at roughly half a day each, provided the adapter boundary holds. Generated diffs are noisy; plan to read changelogs rather than patch files.
Support — Infobip's account and support organization covers API behavior, deliverability, and carrier filtering escalation. The GitHub community is too small to rely on at 94 stars, so internal ownership must be explicit and named: one team owns the adapter, the webhook endpoint, and spend alerting. Absent that, the integration becomes orphaned infrastructure within two quarters.
Scaling — Workers are stateless and scale horizontally with queue depth. Real constraints are Infobip account-level rate limits, HTTP timeout and connection-reuse tuning, and bulk response handling. Use batch endpoints above ~100 messages, regional endpoints for latency-sensitive traffic, and enforce per-tenant limiters in the adapter — the SDK provides none of this.
Failure modes
| Mode | Impact | Mitigation |
|---|---|---|
| 401/403 from credential or region mismatch | Full send outage | Synthetic health-check job; alert on auth error rate |
| 429 rate limit | Queue backlog, delayed OTPs | Exponential backoff, token-bucket limiter, queue-depth alarm |
| Timeout on send (ambiguous outcome) | Duplicate SMS and double spend | Client-supplied idempotency key, dedupe window |
| Webhook replay or out-of-order delivery | Corrupted delivery state | Idempotent upsert keyed on message ID, timestamp ordering |
| Large bulk response parsing | Worker memory exhaustion | Streaming or chunked batches, worker memory caps |
| Regional provider outage | Delivery delay | Fallback provider behind a feature flag, per-region routing |
Ramp-up — A mid-level Laravel developer reaches a working staging send in 1–2 days and production readiness in about two weeks including webhooks and telemetry. The friction is concentrated in the generated SDK's ergonomics and the regional endpoint matrix, not in Laravel itself — which is the argument for containing both behind the adapter from day one.
How can I help you explore Laravel packages today?