title: Stripe API Invalid Request: Must provide source or customer
body: <p>I'm working on the Stripe API and building a custom checkout function - My error is specifically telling me I must provide a source or customer. This is my controller for creating charges:</p>
  
  <p>I thought I was successfully creating a source and/or customer with the following code (I also included the post logs on my stripe dashboard) </p>
  
  <pre><code> Stripe::Charge.create(
      :amount =&gt; @amount,
      :currency =&gt; 'usd',
      :source =&gt; params[:stripeToken],
  )
  Stripe::Customer.create(
      :email =&gt; params[:stripeEmail],
      :source =&gt; params[:stripeToken]
    )
    "error": {
      "code": "parameter_missing",
      "doc_url": "https://stripe.com/docs/error-codes/parameter-missing",
      "message": "Must provide source or customer.",
      "type": "invalid_request_error"
    }
  }
  </code></pre>
  
  <p>I did go through <a href="https://stripe.com/docs/sources/customers" rel="noreferrer">the docs</a> but I guess I'm still a little lost </p>
  
  <p>Thanks for any assistance!</p>
  
  <p>Update: here is the return of my API POST requests.
  <a href="https://i.stack.imgur.com/vCMwx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vCMwx.png" alt="my api requests"></a>
  Update2: I see that a customer is being created when I send a charge.
  <a href="https://i.stack.imgur.com/Bm5Js.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Bm5Js.png" alt="My events tab"></a></p>
  
  <p>Update 3: Source property is set to the stripeToken parameter, representing the payment method provided. The token is automatically created by Checkout. - this seems possibly connected to my issue - maybe it's not correctly posting?</p>