title: Is it possible to pass custom data to stripe checkout?
body: <p>I'm following the documentation for Stripe Checkout with server integration: <a href="https://stripe.com/docs/payments/checkout/server" rel="noreferrer">https://stripe.com/docs/payments/checkout/server</a></p>
  
  <p>The code in the examples works fine, but the problem I'm having is being unable to track the user, or their order, when a purchase is complete.</p>
  
  <p>I have a webhook setup that Stripe pings when a payment is complete. But the response session from Stripe contains no information about the product ordered except for it's name, description, and image. I could use the product name to query the database but I'd much rather an ID, or a slug, of sorts.</p>
  
  <pre><code>$app-&gt;post("/stripe-pingback", function(Request $request, Response $response, array $args) {
      \Stripe\Stripe::setApiKey("xxxxx");
  
      // You can find your endpoint's secret in your webhook settings
      $endpoint_secret = 'xxxxx';
  
      $payload = $request-&gt;getBody();
      $sig_header = isset($_SERVER['HTTP_STRIPE_SIGNATURE']) ? $_SERVER['HTTP_STRIPE_SIGNATURE'] : null;
      $event = null;
  
      try {
          $event = \Stripe\Webhook::constructEvent($payload, $sig_header, $endpoint_secret);
      } catch(\UnexpectedValueException $e) {
          // Invalid payload
          http_response_code(400); // PHP 5.4 or greater
          exit();
      } catch(\Stripe\Error\SignatureVerification $e) {
          // Invalid signature
          http_response_code(400); // PHP 5.4 or greater
          exit();
      }
  
      // Handle the checkout.session.completed event
      if ($event-&gt;type == 'checkout.session.completed') {
          $session = $event-&gt;data-&gt;object;
          var_dump($session);
  
          // Possible to get custom data from session?
          $customer = $session-&gt;customer;
          $customerEmail = $session-&gt;customer_email;
  
          // Fulfill the purchase...
          $this-&gt;db-&gt;insertAudioPurchase();
      }
  
      http_response_code(200); // PHP 5.4 or greater
  });
  </code></pre>
  
  <p>Is it possible to pass an ID along with the checkout request that Stripe can ping back to allow me to lookup the order and generate a download link?</p>