laravel/cashier-paddle
Laravel Cashier Paddle adds a fluent Laravel interface for Paddle subscriptions, handling common billing boilerplate like subscription creation and management, plan swaps, quantities, pauses, cancellations, and grace periods.
User model subscriptions via hasOne relationships).SubscriptionCreated, InvoicePaid) for extensibility, aligning with modern Laravel architectures.Cashier facade or service provider binding.PaddleWebhookHandler trait for validation.actingAs, assertPaid) and mockable HTTP clients for CI/CD pipelines.globalScope or package-specific middleware.users table with stripe_id; Paddle uses paddle_customer_id.)PaddleWebhookHandler but requires HMAC setup.)subscriptions table may need indexing for user_id + status.)Billable trait.Cashier assertions..env or Laravel vault).laravel/cashier-stripe if migrating from Stripe.cashier-mollie) via Laravel’s service container..env.composer require laravel/cashier-paddle.php artisan vendor:publish --provider="Laravel\CashierPaddle\CashierPaddleServiceProvider".use Laravel\CashierPaddle\Billable; to user model.stripe_id column to paddle_customer_id (or add new column).PaddleWebhookHandler (e.g., POST /paddle/webhook).subscriptions table exists (created via php artisan migrate if using Cashier).cURL and OpenSSL for API calls.config/cashier.php).newSubscription() and subscription() methods.subscription_canceled).Paddle\Paddle facade.laravel/cashier and paddle/sdk-php for breaking changes.composer why-not to audit dependency conflicts.config/cashier.php['debug'] = true).Paddle::debug() to log API requests/responses.failed_jobs table.php artisan cashier:sync to reconcile database with Paddle.subscriptions table on user_id, status, and trial_ends_at.Cache::remember.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Paddle API downtime | Failed subscription updates | Queue retries with exponential backoff; notify admins via Slack/PagerDuty. |
| Webhook delivery failures | Unprocessed subscription events | Monitor failed_jobs; implement dead-letter queue for webhooks. |
| Database corruption | Inconsistent subscription states | Use Laravel’s database transactions; backup subscriptions table. |
| Paddle API breaking changes | Package incompatibility | Test against Paddle’s sandbox pre-release; have fallback to direct API calls. |
| High cancellation volume | Revenue loss | Implement cancellation grace periods; analyze churn trends. |
| Payment fraud | Chargebacks | Use Paddle’s fraud detection tools; log disputes in Laravel. |
CashierPaddle facade methods (How can I help you explore Laravel packages today?