Answers for "stripe laravel usage-based metered billing"

PHP
0

stripe laravel usage-based metered billing

use Illuminate\Http\Request;

Route::post('/user/subscribe', function (Request $request) {
    $request->user()->newSubscription('default')
        ->meteredPrice('price_metered')
        ->create($request->paymentMethodId);

    // ...
});
Posted by: Guest on October-25-2021

Browse Popular Code Answers by Language