I'm currently implementing a billing system using Laravel Cashier with Paddle and evaluating the best approach for user payment management features.
Initially, I planned to allow users to manage their subscriptions directly on my website, including actions like canceling and updating payment methods. However, Paddle provides a fully featured customer portal where users can handle these tasks securely.
Given the trade-offs between developing in-house subscription management features versus leveraging Paddle’s customer portal, which approach do you recommend for SaaS applications?
this is for developers who are curious about how I redirect the customers to their billing portals
because cashier paddle does not have the ability to redirect to the buillin portal
just create a endpoint
Route::get('/account/subscription',[SubscriptionController::class,'index'])->name('settings.subscriptions');
<?php
namespace App\Http\Controllers;
use Laravel\Paddle\Cashier;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\RedirectResponse;
use Filament\Notifications\Notification;
class SubscriptionController extends Controller
{
public function index()
{
$customerId = Auth::user()->customer()->first()->paddle_id;
if(blank($customerId)){
Notification::make()
->title('Subscription Required')
->body('You need an active subscription to access this feature. Please choose a plan to continue.')
->color('warning')
->duration(5000)
->send();
return new RedirectResponse(URL::route('app.pricing'));
}
$response = Cashier::api(
method: 'POST',
uri: "customers/{$customerId}/portal-sessions"
);
$url = $response['data']['urls']['general']['overview'] ?? null;
if ($url) {
return new RedirectResponse($url);
}
}
}