Stripe SCK Plugin invalid API Keys

Hi, I am trying to implement a simple Stripe Checkout Button for a single charge with the help of @jordanmerrick SCK Plugin. When trying to make a test payment, I always get the warning: “You did not set a valid Publishable Key…” Of course I doublechecked my Test and Live keys but they seem to be right. So I’m wondering if there is an issue in how the keys are passed from the plugins config file (sck.config.php) to the in the sck plugin folder. Is this configuration generally correct?


c::set('stripe_test_mode', true);
c::set('sk_test_xxxxxxxxxxxxxxxxxxxx', 'sk_test');
c::set('pk_test_xxxxxxxxxxxxxxxxxxxx', 'pk_test');
c::set('sk_live_xxxxxxxxxxxxxxxxxxxx', 'sk_live');
c::set('pk_live_xxxxxxxxxxxxxxxxxxxx', 'pk_live');


  if (c::get('stripe_test_mode')) {
    $pk = c::get('stripe_test_publishable_key');
    $sk = c::get('stripe_test_secret_key');
  } else {
    $pk = c::get('stripe_live_publishable_key');
    $sk = c::get('stripe_live_secret_key');

  $stripe = array(
    "publishable_key" => $pk,
    "secret_key"      => $sk



I also tried to invert the option/value pairs in the config file and also to set the value in the identical to the value in the config file (e.g. ‘stripe_test_publishable_key’ to ‘pk_test’) but it didn’t change anything. I also checked, if the sck.config.php is correctly included in the main config.php and it is…

Would be super helpful, if just somebody could confirm the above settings are correct?

Edit: I’m aware that the Plugin isn’t maintained anymore, but I thought it’s still a good starting point for the integration.

Your setup is not correct, if you put your key where. you have put the xxxx, should. be

c::set('stripe_test_mode', true);
c::set('stripe_test_secret_key', 'xxxxxt');
c::set('stripe_test_publishable_key', 'xxxxx');
c::set('stripe_live_secret_key', 'xxxxx');
c::set('stripe_live_publishable_key', 'xxxxx');

The first entry is the. key, the second the value you apply to each key.

1 Like

Thank you! This was exactly the problem and the Plugin works now as intended. Did the key/value order changed along previous Kirby Versions? Or is it just a “typo” in the plugins readme… Anyways, many thanks to @jordanmerrick as well for the plugin.

No, the. order hasn’t changed in Kirby and the readme is correct as well.

Oh :see_no_evil: I’m sorry, I misinterpreted the notation. Thanks for clarifying!