Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kratecms.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

KrateCMS uses Stripe to handle subscription billing, including plan creation, payment processing, renewals, and cancellations. Stripe processes all card data on its own secure infrastructure — KrateCMS never stores or handles raw payment information. Once the integration is configured, your members can subscribe to your Pro plan directly from your site and manage their billing through the Stripe customer portal.
Billing settings may be gated depending on your KrateCMS plan or tenant configuration. If you do not see a billing section in your admin settings, contact your platform administrator to enable it.

What Stripe handles

Once the integration is active, Stripe manages the full subscription lifecycle on your behalf:
  • Subscription creation — when a member completes checkout, Stripe creates the subscription and KrateCMS upgrades their account automatically
  • Renewals — Stripe charges the saved payment method at the end of each billing period; no manual action is required
  • Failed payment retries — Stripe retries failed charges according to your configured retry schedule before marking a subscription as past due
  • Cancellations — members can cancel through the customer portal; KrateCMS downgrades access when the subscription ends
  • Invoice generation — Stripe generates and emails invoices to your members automatically

Webhook events

KrateCMS listens for Stripe webhook events at POST /api/stripe/webhook. Stripe sends subscription and invoice events to this endpoint to keep your members’ access in sync with their billing status.
Every incoming webhook is verified using Stripe’s webhook signature. This ensures KrateCMS only processes legitimate events sent by Stripe, not spoofed requests.
KrateCMS extends Laravel Cashier’s webhook handler. The following events have explicit KrateCMS overrides; the rest fall through to Cashier’s default subscription/customer/invoice handling:
Stripe eventKrateCMS override
customer.subscription.deletedRemoves Pro access and refreshes the member’s status
invoice.payment_failedFlags the subscription as past due
The remaining events you typically need to receive — customer.subscription.created, customer.subscription.updated, invoice.payment_succeeded, payment_method.automatically_updated, invoice.payment_action_required — are processed by Cashier’s parent handler, which keeps the local subscriptions and subscription_items tables in sync with Stripe.

Configure the Stripe integration

1

Create your subscription products in Stripe

Log in to your Stripe Dashboard and go to Products → Add product. Create a product for your Pro Plan and add two prices — one for monthly billing and one for annual billing. Note the price_... ID for each price; you will need to provide these to your administrator.
2

Register the webhook endpoint

In the Stripe Dashboard, go to Developers → Webhooks → Add endpoint. Enter your webhook URL:
https://<your-domain>/api/stripe/webhook
Select at minimum these events to listen for:
  • customer.subscription.deleted
  • invoice.payment_failed
  • invoice.payment_succeeded
  • customer.subscription.updated
After saving, copy the Signing secret that Stripe generates (it starts with whsec_). Provide this to your administrator alongside your Stripe publishable and secret keys.
3

Configure the Stripe customer portal

In the Stripe Dashboard, go to Settings → Billing → Customer portal. Enable the portal and configure the options you want to offer your members — such as cancellation, payment method updates, and plan switching between monthly and annual. No code changes are required; KrateCMS redirects members to the portal automatically.
4

Verify your billing settings in KrateCMS

In your KrateCMS admin panel, navigate to /admin/settings/billing and confirm the integration is active. From here you can also link to the customer portal for testing.

Member billing experience

Once configured, members interact with Stripe entirely through KrateCMS:
  • Checkout — members subscribe by clicking upgrade prompts on your site; KrateCMS redirects them to a Stripe-hosted checkout page
  • Payment method updates — members can update their card from the billing section of their profile
  • Invoice history — past invoices are accessible through the Stripe customer portal
  • Cancellation — members can cancel their subscription at any time through the portal; access remains active until the end of the paid period

Test the integration

Before going live, use Stripe’s test mode and test card number 4242 4242 4242 4242 (any future expiry, any CVC) to complete a test checkout. Confirm that the member’s account upgrades to Pro and that a success page renders. You can also trigger test webhook events from the Stripe Dashboard under Developers → Webhooks → your endpoint → Send test event to verify KrateCMS processes them correctly.
Make sure to switch from test mode to live mode keys in your configuration before accepting real payments. Test and live keys are not interchangeable.