// Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys $stripe = new \Stripe\StripeClient('sk_test_tR3PYbcVNZZ796tH88S4VQ2u'); $stripe->checkout->sessions->create( [ 'line_items' => [ [ 'price_data' => [ 'currency' => 'usd', 'product_data' => ['name' => 'Research and development services'], 'unit_amount' => 2000, ], 'quantity' => 1, ], ], 'mode' => 'payment', // 'success_url' => 'http://localhost:4242/success.html', // 'cancel_url' => 'http://localhost:4242/cancel.html', ] );