Stripe Gateway
Stripe payment gateway integration for SaaS subscriptions. This module enables accepting payments via Stripe for tenant subscription billing using Stripe Checkout.
Features
- Stripe Checkout: Redirect tenants to Stripe's hosted checkout page for secure payment
- Card Payments: Accept credit and debit card payments through Stripe
- Webhook Handling: Automatic payment status processing via Stripe webhooks
- Payment Success/Failure Handling: Automatic subscription activation on successful payment
Requirements
- Open Core Business Suite (Base System)
- MultiTenancyCore module (required)
- Stripe account with API keys (Publishable Key and Secret Key)
Installation
Enable via Admin Panel
- Log in as administrator
- Navigate to Settings > Addons
- Find Stripe Gateway and click Enable
- Run migrations if prompted
Enable via Command Line
php artisan module:enable StripeGateway
php artisan migrate
The Multi-Tenancy module must be installed and enabled before enabling this module.
Configuration
Enabling the Gateway
- Navigate to SaaS Management > SaaS Settings
- Toggle Stripe gateway to enabled
- Click the Stripe settings to configure API keys
Stripe Settings
The Stripe settings are accessible from the SaaS Settings page. Configure the following:
| Setting | Description |
|---|---|
| Publishable Key | Your Stripe publishable API key (starts with pk_) |
| Secret Key | Your Stripe secret API key (starts with sk_) |
| Webhook Secret | Your Stripe webhook signing secret (starts with whsec_) |
Webhook Setup
Configure webhooks in your Stripe Dashboard:
- Go to Stripe Dashboard > Developers > Webhooks
- Add endpoint URL:
https://yourdomain.com/stripegateway/webhook - Select events to listen for:
checkout.session.completedpayment_intent.succeededpayment_intent.payment_failed
- Copy the Signing secret and enter it in the Stripe settings
Usage
This module is a payment gateway addon for the Multi-Tenancy module. Once enabled and configured, Stripe appears as a payment option when tenants subscribe to or renew a plan. There is no separate admin interface for this module -- configuration is done through SaaS Settings.
Setup Steps
- Enable the module (see Installation above)
- Navigate to SaaS Management > SaaS Settings
- Toggle Stripe gateway to enabled
- Enter your Stripe Publishable Key and Secret Key
- Set up webhooks in your Stripe Dashboard (see Webhook Setup below)
Tenant Payment Flow
When a tenant selects Stripe at checkout, they are redirected to Stripe's hosted checkout page. After completing payment, they return to the application and the subscription is activated automatically.
How It Works
- A tenant selects a plan and chooses Stripe as the payment method
- The system creates a Stripe Checkout session with the plan details
- The tenant is redirected to Stripe's hosted checkout page
- After payment, the tenant is redirected back to the application
- On successful payment, the subscription is automatically activated
- Stripe webhooks provide a backup confirmation for payment status
Troubleshooting
Payment Not Processing
- Verify the Stripe Secret Key is correct
- Check that the gateway is enabled in SaaS Settings
- Review application logs for Stripe API errors
Webhook Not Receiving Events
- Verify the webhook URL is correctly set in Stripe Dashboard
- Check that the webhook signing secret is correct
- Ensure the server is accessible from Stripe's servers
- Review Stripe Dashboard webhook logs for delivery failures
Changelog: View version history