- Is chargebee/chargebee-php the official Chargebee SDK for PHP?
- The package is described as the official Chargebee PHP client library for the Chargebee API. However, repository provenance is listed as unknown and the package has a low star count, so verify with Chargebee that this Composer package is the supported SDK before relying on it for revenue-critical billing.
- How do I install chargebee/chargebee-php in a Laravel application?
- Install it with Composer using composer require chargebee/chargebee-php. In Laravel, put credentials in config/services.php and environment secrets, bind a configured client as a singleton, and expose only a small internal billing service to the rest of the app. Avoid calling the SDK directly from controllers, models, or jobs.
- Which PHP and Laravel versions does chargebee/chargebee-php support?
- The provided context does not specify supported PHP or Laravel versions, so check the package composer.json and Chargebee documentation before installing. Validate PHP version, Laravel version, Guzzle or HTTP dependencies, and required extensions such as cURL and JSON. Pin the SDK version explicitly and test against your target Laravel release in a sandbox.
- Should I call the Chargebee SDK directly from Laravel controllers?
- No. Treat the Chargebee SDK as a vendor API adapter behind a domain-owned billing service. Controllers and jobs should depend on your internal interface, not on Chargebee SDK objects, so credentials, retries, logging, error mapping, and API-version changes stay isolated.
- How do I verify Chargebee webhook signatures in Laravel?
- The context flags webhook signature verification as a key question rather than a confirmed feature, so confirm support in the SDK version you pin. In Laravel, verify signatures at the edge before dispatching queued handlers, deduplicate events, handle out-of-order delivery, and store raw payloads for replay and reconciliation.
- Does the Chargebee PHP SDK support idempotency keys and retries?
- Idempotency keys, retries and backoff, and typed errors are listed as items to verify rather than guaranteed capabilities. For revenue-critical writes, generate idempotency keys in your wrapper, use queued jobs with exponential backoff, map errors to your own exception types, and deduplicate webhook-driven operations.
- How should I manage Chargebee API versions and SDK upgrades in Laravel?
- Pin both the Composer SDK version and the Chargebee API version, and treat SDK upgrades like dependency upgrades with contract tests against a sandbox. Monitor Chargebee API changes, verify the anomalous last release date, and maintain internal ownership given the low star count and unknown repository provenance.
- What are the production risks of using chargebee/chargebee-php for billing?
- Main risks include billing correctness, webhook security, idempotency, API-version compatibility, credential leakage, rate limiting, duplicate or out-of-order webhooks, and SDK or API version drift. Design for reconciliation jobs and safe replay rather than assuming exactly-once delivery, and keep Chargebee outages from blocking core application traffic.
- How do I test a Chargebee integration in Laravel without hitting production?
- Start with sandbox customer creation, subscription checkout, and webhook ingestion before enabling production writes. Use contract tests against a sandbox, validate read-only calls first, then add writes with idempotency, webhook verification, and replay handling. Run a limited production pilot before broad rollout.
- Are there alternatives to chargebee/chargebee-php for Laravel billing?
- Alternatives are not evaluated in the provided context, so compare Laravel-native billing packages, direct Chargebee API clients, and other subscription billing providers against your requirements. If you keep chargebee/chargebee-php, isolate it behind a wrapper so you can replace the SDK or provider without rewriting domain logic.