Complete Guide to Krayin SaaS Subscription

Updated 16 March 2026

Krayin SaaS Subscription lets you sell Krayin CRM access as plans (monthly/yearly), take payments via Stripe, and automatically activate/deactivate tenants based on subscription status,

and manage subscribers/invoices from the Super Admin panel.

Note: Krayin SaaS must be purchased and installed before you can use the Krayin SaaS Subscription module, since the subscription feature depends on the SaaS setup.

Recurring billing is currently allowing automatic subscription payments and seamless plan renewals.

With Krayin SaaS Subscription, you can publish subscription plans and let new tenants choose a plan, sign up, pay through Stripe Checkout,

and instantly get their own CRM tenant (subdomain/domain) without manual intervention.

Instead of creating tenants one-by-one and tracking payments manually, you configure Stripe once, create plans once,

and the rest of the flow—plan selection, tenant registration, checkout, activation, renewals, and invoices—runs automatically.

Key Benefits of Krayin SaaS Subscription

Installation

Follow these steps in your Krayin SAAS root project to install and enable the subscription module.

Step 1: Register Service Provider


Go to config/app.php and add this under providers:

Webkul\SaasSubscription\Providers\SaasSubscriptionServiceProvider::class,

Step 2: Add PSR-4 Autoload


Go to composer.json and add this under autoload → psr-4:

Webkul\\SaasSubscription\\": "packages/Webkul/SaasSubscription/src

Step 3: Add Daily Expiry Scheduler


Go to app/Console/Kernel.php and add this line in the schedule method:

$schedule->exec('php artisan subscribers:expiry')->daily();

Step 4: Add Global Middleware


Go to app/Http/Kernel.php and add this in the $middleware array:

\Webkul\SaasSubscription\Http\Middleware\AllowOnlySpecificUri::class,

Step 5: Exclude Stripe Webhook from CSRF


Go to app/Http/Middleware/VerifyCsrfToken.php and add this under the $except array:

'subscription/stripe/webhook',

Step 6: Install Stripe SDK + Rebuild Autoload


Run these commands from the project root:

composer require stripe/stripe-php
composer dump-autoload

Step 7: Publish Assets & Configurations


Run:

php artisan vendor:publish

When prompted, press 0 and then press enter to publish all assets and configurations.

Step 8: Run Migrations


Run:

php artisan migrate

Step 9: Create Jobs Table (Database Queue)


Run:

php artisan queue:table

Update .env and set:

QUEUE_CONNECTION=database

Step-by-Step: Configure SaaS Subscription with Stripe to Support Recurring Payments and Tenant Plan Purchases

Integrating Krayin SaaS Subscription with Stripe makes managing subscription payments much easier and more reliable. Stripe handles the entire recurring billing process automatically,

So you do not need to manually track tenant payments every month or year.

Step 1: Enable Subscription in Super Admin

Go to Super Admin ⇾ Dashboard ⇾ Settings ⇾ Configuration ⇾ General ⇾ Subscription ⇾ Subscription Settings and enable the Subscription toggle.

(Optional) Enable notification settings and add emails for subscription-related notifications.

Step 2: Add Stripe Credentials (Publishable Key, Secret Key, Webhook Secret)

Go to Super Admin ⇾ Dashboard ⇾ Settings ⇾ Configuration ⇾ General ⇾ Subscription ⇾ Stripe and enable Stripe. Then fill:

krayin-saas.com_super_configuration_general_subscriptionextension-1

Where to find Stripe Keys:

In your Stripe Dashboard, open Developers ⇾ API keys. Copy the Publishable key and the Secret key and paste them into Krayin’s Stripe configuration fields.

dashboard.stripe.com_acct_1SuDLlCOqPklNOUO_test_apikeysextension

How to fill Webhook Secret:

In Stripe Dashboard, go to Developers ⇾ Webhooks and create an endpoint with this URL:
https://YOUR_DOMAIN/subscription/stripe/webhook

dashboard.stripe.com_acct_1SuDLlCOqPklNOUO_test_workbench_webhooks_createextension


After creating the endpoint, click it and copy the Signing secret (looks like whsec_...) and paste it into Stripe Webhook Secret in Krayin.

dashboard.stripe.com_acct_1SuDLlCOqPklNOUO_test_workbench_webhooks_ed_test_61UJqmau7HWO8uC4w16U3bJ7L8SQ6wZXYFNNBvVAWLBoextension-1

Step 3: Create Subscription Plans (Super Admin)


Go to Super Admin ⇾ Subscription ⇾ Plans ⇾ Create and create your plans (example: Starter/Pro/Enterprise).

Fill plan details like name, billing validity (monthly/yearly), amount/discount, recommended flag, permissions, and restrictions (for example: max users, max webhooks, etc.)

krayin-saas.com_super_subscription_plans_createextension-1

After creating a plan in the SaaS admin panel, the plan is automatically created and visible in the Stripe dashboard as well.

dashboard.stripe.com_acct_1SuDLlCOqPklNOUO_test_products_activetrueextension-1

Step 4: Tenant Chooses a Plan (Public Plans Page)

Click Register Tenant, which will redirect you to the plan selection page.

krayin-saas.com_extension

Then click Select on the desired plan to begin the tenant signup process with that plan.

krayin-saas.com_company_plansextension-2

Step 5: Create Tenant (Company Signup)

Complete the tenant registration steps (email/password, profile details, and username). The username becomes the tenant subdomain (for example acme.yourdomain.com).

After submitting, Krayin creates the tenant and then redirects you to payment (when subscription is enabled).

krayin-saas.com_createextension

Step 6: Purchase the Plan (Stripe Checkout)


After signup, you’ll be redirected to Payment Gateways. Click Subscribe under Stripe to open Stripe Checkout and complete the payment.

krayin-saas.com_company_plans_payment-getways_company_id3planId69b3e6e18d271transactionId69b3f06b83c58extension
checkout.stripe.com_c_pay_cs_test_a1jxOCQOBuPqWs4benoAn6u0XFfHr2WfqmF1CMRe7ASdjgIaEygz72DoeVextension

Once the payment is successful, Stripe sends updates via webhook to Krayin at /subscription/stripe/webhook.

Krayin uses these events to renew subscriptions, handle failed payments, and process cancellations.

Step 7: Verify Tenant Access + Manage Subscription


After payment confirmation, the tenant can log in to their CRM domain. From the tenant admin panel, upgrade/downgrade, or cancel.

Go to Admin ⇾ Company ⇾ Plans to view the active plan

site3.krayin-saas.com_admin_company_plansextension

Invoices can be found under Admin ⇾ Company ⇾ Invoice.

site3.krayin-saas.com_admin_company_invoiceextension

Super Admin Monitoring:


Super Admin can monitor everything from Super Admin ⇾ Subscription menus (Plans, Subscribers, Invoices). This helps you track subscribers, plan usage, and payments centrally.

plans

krayin-saas.com_super_subscription_plansextension
krayin-saas.com_super_subscription_subscriberextension
krayin-saas.com_super_subscription_invoiceextension

Contact Us Section

After clicking Register Tenant on the plans page, users are redirected to the plan selection page on the storefront.


If they scroll down on this page, they will find a Contact Us section.

This section allows potential customers to send inquiries if they do not find a suitable plan or want more information about the CRM.

krayin-saas.com_company_plansextension-3

When a user submits the contact form, the message is stored in the SaaS admin panel.

The Super Admin can view these inquiries by navigating to Dashboard → Subscription → Contact Us.

krayin-saas.com_super_subscription_contact-usextension

From this section, the Super Admin can review customer messages, view contact details such as name, email, phone, and message, and respond to inquiries accordingly.

Conclusion

Krayin SaaS Subscription turns tenant onboarding into a complete self-serve flow: publish plans, accept

payments through Stripe, and automatically provision and control tenant access based on subscription state.

After configuring Stripe credentials and webhook secret, you can reliably handle renewals, failed payments, and cancellations—while tenants can manage upgrades and invoices from their own admin panel.

Hope this is helpful for you. If you have any issues, feel free to raise a ticket at https://webkul.uvdesk.com/en/.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home