I have a problem in stripe payment from using Plugin Stripe.js. We provided the exact Publishable and Secret Key similar to Stripe Dashboard into the stripe.js plugin.
When user provide card details ( Test Mode ) such as Card Number, Valid Expiry Month, Year and CVC, Card token is created successfully with the provided publishable key.
But when creating the payment, here I am using :
“Stripe.js: Seller - Charge Payment to platform customer” from the stripe.js plugin
One more thing, the application is working on Live Mode Publishable and Secret Keys,
but the problem exists with test secret key only
It response with the error - “Invalid API Key”, any help regarding the problem would be appreciated,
please see the screenshot attached!
You need to prepend ‘Bearer’ and a space to the Server Key provided by Stripe for both Development and Live environments; this is mentioned on the instructions section of Stripe.js’ plugin page. As a principle, you should always review a plugin’s instructions to know about what you need to do to get things working from setup to installation to usage.
You must provide your actual Secret Key in place of the <secret_key> for your Authorization headers. It looks like you already have your Secret Key in other fields, so replace and go!