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

Adgower's avatar
Level 14

Adjustable Quantity Checkout Cashier Stripe

How can I do this? Ability to pass "adjustable_quantity" option: https://stripe.com/docs/payments/checkout/adjustable-quantity

error:

Received unknown parameter: adjustable_quantity
use Illuminate\Http\Request;

Route::get('/product-checkout', function (Request $request) {
    return $request->user()->checkout(['price_tshirt' => 1], [
        'success_url' => route('your-success-route'),
        'cancel_url' => route('your-cancel-route'),
        'adjustable_quantity' => true
    ]);
});

Any tips?

0 likes
2 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

If you check the example code for php, they nest it

'line_items' => [[
      'price' => '{{PRICE_ID}}',
      'adjustable_quantity' => [
        'enabled' => true,
        'minimum' => 1,
        'maximum' => 10,
      ],
      'quantity' => 1,
    ]],
1 like
Adgower's avatar
Level 14

@Sinnbeck thanks!

return auth()->user()->checkout(['price_tshirt'], [
        'success_url' => route('your-success-route'),
        'cancel_url' => route('your-cancel-route'),
        'line_items' => [[
            'price' => 'price_tshirt',
            'adjustable_quantity' => [
                'enabled' => true,
                'minimum' => 1,
                'maximum' => 10,
            ],
            'quantity' => 1,
        ]],
    ]);

Please or to participate in this conversation.