Recent Issues

387 views
Skip to first unread message

Carlos Arias

unread,
Aug 14, 2014, 12:44:22 PM8/14/14
to api-d...@lists.stripe.com
My checkout has been running great. Until the latest API release on August 5th .

Now I keep getting
Error: This API call cannot be made with a publishable API key. Please use a secret API key. You can find a list of your API keys at https://dashboard.stripe.com/account/apikeys.

So I realized, Stripe upgraded the API so I clicked upgrade in the dashboard, upgraded the API keys. so now i have pk_live_#########

When i use the Publisher Key all my jquery runs fine, and i get the above error message.  However, when i use Secret Key my jquery breaks.  Then i noticed, Stripe's sample form is now using
Stripe.card.createToken and note Stripe.createToken.  So i upgraded that.. and i'm still getting the same problem.

Here is where its crashing

  
   jQuery('#PlanForm').submit(function() {
     //  alert('Handler for .submit() called.');
       LoadBlockUI();
       
         // createToken returns immediately - the supplied callback submits the form if there are no errors
        Stripe.createToken({
            number: jQuery('.cardNumbz').val(),
            cvc: jQuery('.CVV').val(),
            exp_month: jQuery('.monthExpires').val(),
            exp_year: jQuery('.yearExpires').val()
        }, stripeResponseHandler);
       

       return false;
       });


Any ideas?


Matthew Arkin

unread,
Aug 14, 2014, 1:11:10 PM8/14/14
to api-d...@lists.stripe.com
Hey Carlos, 

Where in your stack are you getting that error?

Anything happening in your frontend, through Stripe.js or checkout.js should be happening with your publishable key (pk_).
Anything happening in your backend (basically code that only you can access), would be using your private/secret key (sk_). 
Your secret key is the one that has the ability to charge cards, create customers, plans, subscriptions, etc. Your publishable key can only create tokes.

Hope that helps,

Matt Arkin




--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Carlos Arias

unread,
Aug 14, 2014, 1:19:10 PM8/14/14
to api-d...@lists.stripe.com

Ohhhhhh lol that makes sense. I'm going to give that a try.

You received this message because you are subscribed to a topic in the Google Groups "Stripe API Discussion" group.

Brian Krausz

unread,
Aug 14, 2014, 1:28:46 PM8/14/14
to api-d...@lists.stripe.com
Hi Carlos,

Hopefully that explains the issue (thanks Matthew!), if you're still
running into issues/confusion please send me your login email
(off-list) and I'll dig into the logs.

Thanks,
Brian

Carlos Arias

unread,
Aug 14, 2014, 2:20:03 PM8/14/14
to api-d...@lists.stripe.com
I'm good.

I guess Stripe had a bug prior to the latest update.  I had PublishableKey on both the Front-End and Back-End   

Thank you again for the help. :)  
Reply all
Reply to author
Forward
0 new messages