Introduction

Account

You need to create a Stripe account.

Test Mode and Secret Key

Ensure you are in Test Mode and retrieve your Stripe Secret Key from the Stripe Dashboard.

Configuration

site/config/config.php
<?php

return [
  'bnomei.klub.stripe.secret' => fn() => env('STRIPE_SECRET_KEY'),
  // other options
];

API Version

You might want to react to the session data sent from Stripe at some point in your business logic. Within the Stripe Developer Dashboard you can set the API Version your account uses. Ensure you use the same version set in the dashboard when browsing their API docs for both the API and SDK.

Since you install Klub with Composer, you have complete control over which Stripe PHP SDK version you want. You can either manually require a fixed version or allow updates as defined by Klub. You can run composer update to upgrade the Stripe PHP version used by Klub to the most current (within the current major version).

Demo

The Klub website has a demo that allows you to try out purchases and unlocking of content yourself.

Kirby Klub is not affiliated with the developers of Kirby CMS. We are merely standing on the shoulder of giants.
© 2025 Bruno Meilick All rights reserved.