title: Why Doesn't Stripe Checkout Add Customer Name to Customer Record?
body: <p>I am trying to retrieve various pieces of data from a Stripe Checkout form submission, where I am just using the Stripe Checkout code provided in my Stripe Dashboard.</p>
  
  <p>In my <code>checkout_submission_completed</code> event I have webhook where I am trying to retrieve <code>email</code>, <code>name</code> so that after successful purchase I can take other actions.</p>
  
  <p>It is surprisingly difficult.</p>
  
  <p>Here is how I can retrieve email (where <code>payload</code> is the response my webhook receives):</p>
  
  <pre><code> $cust = $payload['data']['object']['customer'];
   $custdata = \Stripe\Customer::retrieve($cust);
   $email=$custdata-&gt;email;
  </code></pre>
  
  <p>Ok, not a big deal. </p>
  
  <p>How about Name? Well, here is where things get really fun. After hitting the form payment submit button Stripe creates a customer, completes a successful charge. But in the Customer object there is no name. Yes, no name. During a chat today with Stripe they had no explanation and said they would look into it more.</p>
  
  <p>Turns out the only place where the name entered on the form shows up in a Stripe object is the Payment Details Object within the Payment Intent object.</p>
  
  <p>I am serious. So here is how I am getting the name (using <code>cust</code> from previous code:</p>
  
  <pre><code>   $piid = $cust = $payload['data']['object']['payment_intent'];
     $pi = \Stripe\PaymentIntent::retrieve($piid);
     $name = $pi['charges']['data'][0]['billing_details']['name'];
  </code></pre>
  
  <p>Is there a better way for me to do this?</p>
  
  <p>thanks,
  Brian</p>