title: Stripe: No such token.. a similar object exists in test mode, but a live mode key was used to make this request
body: <p>When using Stripe in live mode I get this PHP error: </p>
  
  <blockquote>
    <p>No such token tok_fgfhn.. a similar object exists in test mode, but a live mode key was used to make this request</p>
  </blockquote>
  
  <p>Everything works well in Stripe test mode, and and I've switched to a live API key.</p>
  
  <p>I create a new customer like this:</p>
  
  <pre><code>$token  = $_POST['stripeToken'];
      $email  = $_POST['email'];
  
  $customer = \Stripe\Customer::create(array(
        'email' =&gt; $email,
        'card'  =&gt; $token
      ));
  
      //charge for user ads
      $charge = \Stripe\Charge::create(array(
        'customer' =&gt; $customer-&gt;id,
        'amount'   =&gt; $amount,
        'currency' =&gt; 'eur'
      ));
  </code></pre>
  
  <p>I've tested many hours but I still get this error.  How can I fix it?</p>