Por Oliver Servín en English

Show amount to pay in next billing cycle with Laravel Cashier (Stripe)

You can easily show how much a customer will pay in the next billing cycle with the upcomingInvoice method in Laravel Cashier (Stripe) to get the upcoming invoice details.

// torchlight! {"lineNumbers": false}
// routes/web.php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

// ...

Route::get('/profile/invoices', function (Request $request) {
    return view('/profile/invoices', [
        'upcomingInvoice' => $request->user()->upcomingInvoice(),
        'invoices' => $request-›user()->invoices(),