title: How can I add the product ID and name in stripe session Laravel
body: <p>Im trying to make each session has it own product id based on my database products,
  so this is my blade.php:</p>
  <pre><code>&lt;?php
  require_once(__DIR__.'/../../../vendor/autoload.php');
  
  
  \Stripe\Stripe::setApiKey('sk_test_51xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
  
  $session = \Stripe\Checkout\Session::create([
      'payment_method_types' =&gt; ['card'],
  
      'line_items' =&gt; [[
  
        'price_data' =&gt; [
          'currency' =&gt; 'usd',
          'product_data' =&gt; [
            'name' =&gt; 'T-shirt',
          ],
          'unit_amount' =&gt; 2000,
        ],
        'quantity' =&gt; 1,
  
      ]],
      'mode' =&gt; 'payment',
      'success_url' =&gt; 'https://example.com/success',
      'cancel_url' =&gt; 'https://example.com/cancel',
    ]);
  
  ?&gt;
  main&gt;
  
      &lt;div id=&quot;hey&quot; class=&quot;alert alert-warning alert-dismissible fade show&quot; role=&quot;alert&quot;&gt;
          &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;alert&quot; aria-label=&quot;Close&quot;&gt;
            &lt;span aria-hidden=&quot;true&quot;&gt;&amp;times;&lt;/span&gt;
          &lt;/button&gt;
        &lt;/div&gt;
  
  &lt;div class=&quot;list-group&quot; style=&quot;    margin: 100px 120px;&quot;&gt;
      &lt;h3&gt;Account ID: #{{$product-&gt;id}}&lt;/h3&gt;
      &lt;h3&gt;Account ID: #{{auth()-&gt;user()-&gt;name}}&lt;/h3&gt;
    &lt;input type=&quot;submit&quot; id=&quot;submitBtn&quot; class=&quot;btn btn-primary&quot; data-bs-toggle=&quot;button&quot; autocomplete=&quot;off&quot;&gt;
  </code></pre>
  <p>my route</p>
  <pre><code>Route::post('webhook/payment/succeeded', function (Request $request){
       if($request-&gt;type === &quot;charge.succeeded&quot;){
           try{
   Payment::create([
      'stripe_id' =&gt; $request-&gt;data['object']['id'],
       'amount' =&gt; $request-&gt;data['object']['amount'],
       'email' =&gt; $request-&gt;data['object']['billing_details']['email'],
       'name' =&gt; $request-&gt;data['object']['billing_details']['name'],
   ]);         } catch (\Exception $e) {
              return $e-&gt;getMessage();
          }
          return 'ok';
       }
  
  });
  </code></pre>
  <p>all im trying to do is to add the product id inside the stripe session so I can delete that product when the payment is successful !, hope u will understand</p>