title: showing last 4 digits of stripe credit card
body: <p>I am trying to figure out how to show the last 4 digits of the users default card on file with Stripe. The code I came up with does not display it.</p>
  
  <p>Does anyone have a idea of how to fix what I have?</p>
  
  <p>controller:</p>
  
  <pre><code>  def last4
    customer = Stripe::Customer.retrieve(user.subscription.stripe_customer_token)
    card = customer.cards.retrieve(user.subscription.stripe_card_id)
    charge = Stripe::Charge.retrieve(user.subscription.stripe_charge_id)
    self.last_4_digits = charge.card.last4
    end
  </code></pre>