title: Stripe error: "The card object must have a value for 'number'" when creating a Customer
body: <p>I am using Stripe's ruby gem to (try to) perform two steps:</p>
  
  <ol>
  <li>Collect a card using Stripe's "Checkout" form</li>
  <li>Create a Customer using the token provided by the redirect from the form submission</li>
  </ol>
  
  <p>The latter of these steps raises a <code>Stripe::CardError</code> whose message is:</p>
  
  <blockquote>
    <p>The card object must have a value for 'number'</p>
  </blockquote>
  
  <p>The API doc describes the process: <a href="https://stripe.com/docs/tutorials/subscriptions#subscribing-a-customer-to-a-plan">https://stripe.com/docs/tutorials/subscriptions#subscribing-a-customer-to-a-plan</a></p>
  
  <p><strong>My code (a Rails controller action)</strong></p>
  
  <pre><code>def receive_redirect
      customer = Stripe::Customer.create(
        plan: "stripe_plan_name",
        card: params[:stripeToken]
      )
  end
  </code></pre>
  
  <p><strong>params[:stripeToken] looks like this:</strong></p>
  
  <blockquote>
    <p>{"id"=>"tok_1044TY4GgNdNSosPXdAmIZdt", "livemode"=>"false",
    "created"=>"1400620581", "used"=>"false", "object"=>"token",
    "type"=>"card", "card"=>{"id"=>"card_1044TY4GgNdNSosPuDSuygow",
    "object"=>"card", "last4"=>"9424", "type"=>"Discover",
    "exp_month"=>"9", "exp_year"=>"2014",
    "fingerprint"=>"Lz5ASwlmyseG0gYo", "customer"=>"", "country"=>"US",
    "name"=>"manderson@pinneyinsurance.com", "address_line1"=>"",
    "address_line2"=>"", "address_city"=>"", "address_state"=>"",
    "address_zip"=>"", "address_country"=>""},
    "email"=>"&lt;my_email>@&lt;my_host>"}</p>
  </blockquote>
  
  <p>...As you can see, they don't give me a number, so what am I to do?</p>
  
  <p><strong>Stack</strong></p>
  
  <p>stripe 1.8.8 (ruby gem)<br>
  Rails 3.2.13<br>
  Ruby 1.9.3</p>