Weave Code
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
Recurly Client

Recurly Client Laravel Package

recurly/recurly-client

Official PHP client for Recurly API v3. Install via Composer, create a Client with your API key (supports EU region), and optionally plug in a PSR-3 logger. Provides a single entry point for all Recurly operations with semver releases.

View on GitHub
Deep Wiki
Context7

The PHP client library for the Recurly API

Frequently asked questions about Recurly Client
How do I securely store and inject the Recurly API key in Laravel?
Store the API key in Laravel’s `.env` file (e.g., `RECURLY_API_KEY`) and inject it into the Recurly client via a service provider or Laravel’s binding system. Avoid hardcoding keys in source files. For enhanced security, use Laravel’s `env()` helper or a secrets manager like AWS Secrets Manager.
Does this package support Laravel’s HTTP client (Guzzle) for shared configurations?
Yes, the package uses Guzzle under the hood, which Laravel already bundles. You can leverage Laravel’s HTTP client configurations (e.g., timeouts, middleware) by binding the Recurly client to Laravel’s service container and using dependency injection.
Can I handle Recurly webhooks asynchronously in Laravel?
Absolutely. Use Laravel’s queue system to process webhooks asynchronously. Create a job (e.g., `RecurlyWebhookJob`) to handle payloads, then dispatch it from your webhook route. This ensures scalability and avoids timeouts for high-volume events.
What Laravel versions are officially supported by this package?
The package is compatible with Laravel 8+ due to its PHP 8.x requirement. Laravel 10+ (PHP 8.2+) is recommended for full feature parity. Always pin the package version in `composer.json` (e.g., `^4.0`) to avoid unexpected breaking changes.
How do I mock Recurly API responses for testing in Laravel?
Use Laravel’s `Http::fake()` or PestPHP’s `fake()` helper to mock HTTP requests. Stub the Recurly client’s HTTP adapter (Guzzle) or override the client instance in your test’s service container. For webhook testing, use Laravel’s `Queue::fake()` to assert job dispatches.
What’s the best way to handle rate limits in high-traffic Laravel apps?
The package exposes `getRateLimitRemaining()` to check limits. Implement retries with exponential backoff using Laravel’s `retry()` helper or a package like `spatie/laravel-retryable`. Cache paginated responses (e.g., with Laravel’s cache) to reduce API calls.
How do I validate Recurly webhook signatures in Laravel?
Recurly provides a `Recurly-Signature` header for webhook validation. Use Laravel middleware to verify the signature against your API key before processing. The package doesn’t include built-in validation, but you can use Recurly’s [webhook validation guide](https://developers.recurly.com/api/latest/#webhooks) as a reference.
Can I use this package with Laravel’s Scout for observability?
Yes. Log HTTP metadata (e.g., `getRequestId()`) using Laravel’s logging system or Scout-compatible services like Datadog. The package’s PSR-3 logger can be configured to output structured logs, which Scout can then ingest for monitoring.
What are the alternatives to this package for Laravel subscription billing?
Alternatives include Stripe’s PHP SDK (`stripe/stripe-php`) for Stripe Billing, Chargebee’s PHP client (`chargebee/chargebee-php`), or Paddle’s API wrapper. Recurly’s package is ideal if you need advanced subscription management features like dunning, tax handling, or multi-entity billing.
How do I handle failed payments or subscription cancellations in Laravel?
Use Recurly’s webhooks to trigger Laravel events or queue jobs for failed payments (e.g., `SubscriptionFailed`). Dispatch custom events (e.g., `subscription_cancelled`) to notify your business logic. Store subscription statuses in your Laravel database for reconciliation.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope