Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincent15000's avatar

Cashier and Stripe payment links ?

Hello,

Has anyone already used Stripe payment links ?

I discover Cahier and I'd like to kwow if it's necessary to use Cashier with Stripe payment links ?

Is it better to develop all the interface or to use payment links instead ?

Well ... I don't have a real experience in payment, so any advice is good for me.

Thanks a lot.

V

0 likes
4 replies
LaryAI's avatar
Level 58

When deciding between using Stripe Payment Links and Laravel Cashier, it's important to understand the differences and use cases for each.

Stripe Payment Links

Stripe Payment Links are a quick and easy way to accept payments without having to build a custom checkout flow. They are ideal for:

  • Simple Transactions: If you have a straightforward product or service with a fixed price, payment links can be a great choice.
  • No Development Overhead: You don't need to write any code to create a payment link. You can generate them directly from the Stripe Dashboard.
  • Quick Setup: It's a fast way to start accepting payments without integrating a full payment system.

Laravel Cashier

Laravel Cashier is a package that provides an expressive, fluent interface to Stripe's subscription billing services. It is more suitable for:

  • Subscription Management: If you need to handle subscriptions, recurring billing, or complex billing logic, Cashier is the way to go.
  • Custom Checkout Experience: When you want to have full control over the checkout process and user experience.
  • Integration with Laravel: Cashier is tightly integrated with Laravel, making it easier to manage billing within a Laravel application.

Recommendations

  • Use Stripe Payment Links if you need a quick, no-code solution for simple, one-time payments. It's perfect for small projects or when you want to test the market without investing in a full payment system.

  • Use Laravel Cashier if you need to manage subscriptions, require a custom checkout process, or want to leverage Laravel's features for a more integrated solution.

Example of Creating a Stripe Payment Link

To create a payment link, you can do it directly from the Stripe Dashboard:

  1. Go to the Stripe Dashboard.
  2. Navigate to the "Payment Links" section.
  3. Click "Create Payment Link" and follow the prompts to set up your product and pricing.

Example of Using Laravel Cashier

To get started with Laravel Cashier, you would typically follow these steps:

  1. Install Cashier via Composer:

    composer require laravel/cashier
    
  2. Set up your Stripe keys in the .env file:

    STRIPE_KEY=your-stripe-key
    STRIPE_SECRET=your-stripe-secret
    
  3. Use Cashier's billing methods in your Laravel models:

    use Laravel\Cashier\Billable;
    
    class User extends Authenticatable
    {
        use Billable;
    }
    
  4. Create a subscription:

    $user = User::find(1);
    
    $user->newSubscription('default', 'premium-plan')->create($paymentMethod);
    

In summary, choose the solution that best fits your project's needs and complexity. If you're just starting out and need something simple, Stripe Payment Links are a great choice. For more complex billing needs, Laravel Cashier is the better option.

vincent15000's avatar

I specify that I need to keep informations in the database about which subscription is chosen by the user and the payments will only be monthly payments and the clients will be able to stop when they want to.

martinbean's avatar
Level 80

@vincent15000 Payment links are URLs for sending to customers to capture payment for something. They’re usually generated on an ad hoc basis and on demand. You’re also not going to be able to “link” any payments created as the result of a payment link to a user in your database.

If you’re just building a subscription-based application then you should use Cashier and create checkout sessions when a customer wishes to subscribe. Cashier also then has the webhook handler to handle webhooks and create and update subscriptions for your application’s users.

So, when a user is ready to subscribe, create a subscription and redirect them to a Stripe checkout session:

public function create(Request $request)
{
    return $request->user()
        ->newSubscription('default', 'price_id')
        ->checkout([
            'cancel_url' => url('cancelled'),
            'success_url' => url('success'),
        ]);
}
1 like

Please or to participate in this conversation.