Go to content

Stripe restricted key in Johku

When you create the secret key in Stripe yourself, it gets only the permissions that Johku needs. New Stripe accounts have no ready-made secret key, so the key is always created this way. On this page, you'll find the steps for creating the key and the permissions it needs. The whole Stripe setup: Enable Stripe in Johku.

Create the key

  1. In Stripe, go to Developers → API keys (direct link: dashboard.stripe.com/apikeys) and make sure you are in live mode: the top of the Dashboard must not show the text Sandbox or Test mode.
  2. Click Create secret key.
  3. Under Choose how you'll use this key, select Building your own integration and click Continue.
  4. Under Assign permissions to your key, select Custom permissions. Don't select Full access.
  5. Give the key the permissions below. Leave the other resources as None.
Resource (Stripe's name)PermissionWhat Johku needs it for
Checkout SessionsWritecreating the payment page, checking its status and closing an old payment page
Webhook EndpointsWritecreating the webhook automatically
PaymentIntentsWritecharging automatically renewing orders from a saved card
CustomersWritesaving the card for automatic renewals
PaymentMethodsReadthe details of the saved card (for example “Visa •••• 4242”)
SetupIntentsReadchanging the payment card of a renewing order
ChargesWriteold payment functions (to be on the safe side)

If you don't sell automatically renewing orders, the PaymentIntents, Customers, PaymentMethods and SetupIntents permissions are not necessary. It is still worth giving them so that you don't need to change the key later.

  1. Confirm with the code Stripe sends by email or text message, give the key a name (for example “Johku”) and click Create.
  2. Copy the key right away. Stripe shows a key you create yourself only once. The key can start with sk_live_ or rk_live_, and both work in Johku.
  3. In Johku, go to Settings → General settings → Paying.
  4. Open Stripe.
  5. Paste the key into the Secret key field.
  6. Click Save. Then continue with the guide Enable Stripe in Johku.

If you created the key earlier with the old Create restricted key button, it still works as long as it has the permissions listed above.

If something goes wrong

You can see a missing permission in Stripe: on the row of the key, select ⋯ → View request logs and look for requests with the status 403. Add the missing permission to the key and try again.

If saving gives an error right when you add the key, the key is usually missing the Webhook Endpoints permission.

Related topics