['card'], 'line_items' => [[ 'price' => $price_id, 'quantity' => 1, ]], 'mode' => 'subscription', 'success_url' => 'http://' . $_SERVER['HTTP_HOST'] . '/index.php?payment=success', 'cancel_url' => 'http://' . $_SERVER['HTTP_HOST'] . '/pricing.php?payment=cancel', 'customer_email' => $user_email, 'client_reference_id' => $_SESSION['user_id'] ]); header("Location: " . $checkout_session->url);