title: Get last 4 digits of credit card after successful Stripe subscription
body: <p>For compliance reasons I am generating tokens on the client side and sending those details to stripe. I want to display the <strong>last four digits and the type of card</strong> on my confirmation page</p>
  
  <p>I am creating a customer</p>
  
  <pre><code>// Create a Customer:
  $customer = \Stripe\Customer::create([
  
    'source' =&gt; $token,
  
    'email' =&gt;  $current_user-&gt;user_email,
  
  ]);
  </code></pre>
  
  <p>than adding them to a subscription</p>
  
  <pre><code>//create the subscription for the customer
    $subscription = \Stripe\Subscription::create(array(
  
          'customer' =&gt; $customer-&gt;id,
  
          "items" =&gt; array(
                        array(
                           "plan" =&gt; "dpc-standard",
                        ),
           )
      ));
  </code></pre>
  
  <p>The subscription returns <a href="https://stripe.com/docs/api#subscription_object" rel="nofollow noreferrer">https://stripe.com/docs/api#subscription_object</a>
  a ton of data including the invoice_id that is generated for the subscription but doesn't return any CC details</p>