\Stripe\Stripe::setApiKey(‘sk_test_4eC39HqLyjWDarjtT1zdp7dc’);

$session = \Stripe\Checkout\Session::create([
‘payment_method_types’ => [‘card’],
‘line_items’ => [[
‘price’ => ‘price_1HKiSf2eZvKYlo2CxjF9qwbr’,
‘quantity’ => 1,
]],
‘mode’ => ‘subscription’,
‘success_url’ => ‘https://example.com/success?session_id={CHECKOUT_SESSION_ID}’,
‘cancel_url’ => ‘https://example.com/cancel’,
]);