title: How to use card token on stripe.handleCardPayment(clientSecret[, data])
body: <p>I am trying to pass a credit card token provided by the stripe payment gateway to the function stripe.handleCardPayment(clientSecret[, data]).
  In the documentation [<a href="https://stripe.com/docs/stripe-js/reference]" rel="nofollow noreferrer">https://stripe.com/docs/stripe-js/reference]</a> it says it's supposed to be integrated like card[token], and the token will be automatically converted into a PaymentMethod.
  But how do I implement this part of code into my code?
  I tried it like this but it hasn't worked...</p>
  
  <pre><code>            stripe.handleCardPayment(
                clientSecret,
                {
                  payment_method_data: {
                      card[token]: the_card_token
                  }
                }
              ).then(function(result) {
                console.log(result);
              });
  </code></pre>
  
  <p>At one point at trying I received this error:</p>
  
  <pre><code>A Card token may not be passed in as a PaymentMethod. Instead, use payment_method_data with type=card and card[token]=tok_xxxxxx
  </code></pre>