Skip to main content

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

  1. Log in as administrator
  2. Navigate to Settings > Addons
  3. Find Stripe Gateway and click Enable
  4. Run migrations if prompted

Enable via Command Line

php artisan module:enable StripeGateway
php artisan migrate
note

The Multi-Tenancy module must be installed and enabled before enabling this module.

Configuration

Enabling the Gateway

  1. Navigate to SaaS Management > SaaS Settings
  2. Toggle Stripe gateway to enabled
  3. Click the Stripe settings to configure API keys

Stripe Settings

The Stripe settings are accessible from the SaaS Settings page. Configure the following:

SettingDescription
Publishable KeyYour Stripe publishable API key (starts with pk_)
Secret KeyYour Stripe secret API key (starts with sk_)
Webhook SecretYour Stripe webhook signing secret (starts with whsec_)

Webhook Setup

Configure webhooks in your Stripe Dashboard:

  1. Go to Stripe Dashboard > Developers > Webhooks
  2. Add endpoint URL: https://yourdomain.com/stripegateway/webhook
  3. Select events to listen for:
    • checkout.session.completed
    • payment_intent.succeeded
    • payment_intent.payment_failed
  4. 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

  1. Enable the module (see Installation above)
  2. Navigate to SaaS Management > SaaS Settings
  3. Toggle Stripe gateway to enabled
  4. Enter your Stripe Publishable Key and Secret Key
  5. 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

  1. A tenant selects a plan and chooses Stripe as the payment method
  2. The system creates a Stripe Checkout session with the plan details
  3. The tenant is redirected to Stripe's hosted checkout page
  4. After payment, the tenant is redirected back to the application
  5. On successful payment, the subscription is automatically activated
  6. 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