---
url: https://docs.corbitaltech.dev/products/whatsmark-saas/admin/payment-gateway.md
description: >-
  Connect Stripe, Razorpay, PayPal, Mollie, or Tap as payment gateways in
  WhatsMark SaaS. Step-by-step API key setup, webhook configuration, currency
  support, and test mode for accepting tenant subscription payments.
---

# Payment Gateway Integration

\[\[toc]]

Connects payment processors to your SaaS platform

Enables secure payment collection from customers

> **Location**: Admin Panel → Settings → Payment Gateways

::: warning Extended License Required
Online payment gateways **Stripe**, **Razorpay** etc are available with an [Extended License](https://codecanyon.net/item/whatsmarksaas-whatsapp-marketing-automation-saas-platform-with-bots-chats-bulk-sender-ai/58714968/support) only.
:::

## Accessing Payment Gateway Settings

### Navigation Path

1. Login to **Admin Panel**
2. Navigate to **Settings** → **Payment Settings**

## Stripe Integration

### Stripe Setup

**Location**: Admin Panel → Settings → Payment Gateways → Stripe

Stripe is the primary payment processor for WhatsMarkSaaS:

**Required Credentials**:

* **Publishable Key**: Client-side API key
* **Secret Key**: Server-side API key
* **Webhook Secret**: For webhook verification

**Configuration Steps**:

1. Create a [Stripe account](https://stripe.com)
2. Navigate to Developers → API keys in Stripe Dashboard
3. Copy the publishable and secret keys
4. Enter the keys in your admin panel
5. Enable Stripe as a payment method

### Stripe Webhook Configuration

**Webhook Setup**:

1. In Stripe Dashboard, go to Developers → Webhooks

2. Add a new endpoint with your SaaS URL:

   ```text
   https://yourdomain.com/stripe/webhook
   ```

3. Select events to listen for:
   * `customer.subscription.created`
   * `customer.subscription.updated`
   * `customer.subscription.deleted`
   * `invoice.payment_succeeded`
   * `invoice.payment_failed`
   * `checkout.session.completed`

4. Copy the webhook signing secret

5. Enter the secret in your admin panel

**Testing Webhooks**:

* Use Stripe's webhook tester in their dashboard
* Monitor webhook events in the system logs
* Verify proper event handling

### Stripe Payment Flow

Understanding the subscription payment flow:

1. Customer selects a plan
2. System creates Stripe Checkout Session
3. Customer completes payment on Stripe hosted page
4. Stripe sends webhook notification
5. System activates the subscription
6. Invoice is generated and emailed to customer

## Payment Settings Configuration

### Global Payment Settings

**Location**: Admin Panel → Settings → Payments

Configure general payment behavior:

**Available Settings**:

* **Default Currency**: Primary billing currency
* **Currency Format**: Symbol position and formatting
* **Tax Handling**: VAT/GST configuration
* **Invoice Generation**: Automatic or manual
* **Payment Reminders**: Notification schedule
* **Failed Payment Actions**: Retry strategy

### Currency Management

**Location**: Admin Panel → Setup → Currency

Configure multiple Currency:

**Currency Options**:

* Add/remove supported Currency
* Set exchange rates
* Configure display format
* Set default currency
* Enable/disable specific Currency

### Tax Configuration

**Location**: Admin Panel → Setup → Taxes

Configure tax collection:

**Tax Options**:

* **Tax Rates**: Percentage for different regions
* **Tax Names**: VAT, GST, Sales Tax, etc.
* **Tax Number Collection**: Customer tax IDs
* **Tax Exemptions**: Rules for exemptions
* **Tax Reporting**: Report generation

## Invoice Management

### Invoice Settings

**Location**: Admin Panel → System Settings → Invoices

Configure invoice generation:

**Invoice Options**:

* **Invoice Template**: Design and layout
* **Numbering Format**: Sequential numbering
* **Company Details**: Information on invoice
* **Payment Terms**: Due date calculation
* **Invoice Notes**: Default footer text

### Invoice Automation

**Automation Options**:

* **Auto-Generation**: Create on payment
* **Email Delivery**: Send automatically
* **PDF Attachment**: Include PDF version
* **Payment Reminders**: Before/after due date
* **Receipt Generation**: After payment

## Additional Payment Options

### Manual Payment Methods (Optional)

**Location**: Admin Panel → Settings → Payment Settings → Offline payment

**Configuration Options**:

* Payment instructions
* Description

## Security Considerations

### Payment Security

Ensuring secure payment processing:

* **PCI Compliance**: Using secure providers
* **Data Protection**: Minimal data storage
* **SSL Requirement**: Secure connections only
* **Fraud Prevention**: Basic screening measures
* **Access Control**: Restricted payment settings

### Audit Logging

**Location**: Admin Panel → Setup → System Logs

Monitor payment-related activities:

**Log Information**:

* User actions on payments
* Gateway API interactions
* Webhook events received
* System payment processing
* Error conditions and resolution

***
