# Billing & Plans

MailTrixy offers a flexible subscription model with four plan tiers designed to serve individuals, growing teams, and enterprises. The billing system supports multiple payment gateways, usage-based metering, promotional discounts, and detailed invoice management.

## Plan Tiers

MailTrixy provides four subscription tiers, each unlocking progressively more features and higher usage limits:

Feature | Free | Starter | Pro | Enterprise
--- | --- | --- | --- | ---
Monthly Price | $0 | $19 | $49 | $99
Annual Price (per month) | $0 | $15 | $39 | $79
Team Members | 1 | 3 | 10 | Unlimited
Email Accounts | 1 | 3 | 10 | Unlimited
Contacts | 500 | 5,000 | 50,000 | Unlimited
Emails per Month | 1,000 | 10,000 | 100,000 | 500,000
Campaigns | 5/month | Unlimited | Unlimited | Unlimited
Workflows | 3 | 10 | Unlimited | Unlimited
Pipelines | 1 | 3 | 10 | Unlimited
AI Features | Basic | Standard | Advanced | Full
AI Tokens/Month | 10,000 | 100,000 | 1,000,000 | 5,000,000
A/B Testing | No | Yes | Yes | Yes
Custom Domains | No | 1 | 5 | Unlimited
API Access | No | Read-only | Full | Full
Priority Support | No | No | Yes | Dedicated
White Label | No | No | No | Yes

## Stripe Integration

MailTrixy uses Stripe as its primary payment processor, providing secure, PCI-compliant payment handling:

- Checkout Flow: When a user selects a plan, they are redirected to a Stripe-hosted checkout page (or an embedded checkout form, depending on configuration). Credit card details are entered directly on Stripe's secure form and never touch the MailTrixy server.
- Subscription Management: Stripe handles recurring billing, payment retries (failed payments are retried up to 4 times over 3 weeks), and subscription lifecycle events.
- Webhook Integration: MailTrixy listens to Stripe webhooks for real-time billing events: `invoice.paid`, `invoice.payment_failed`, `customer.subscription.updated`, `customer.subscription.deleted`, and more. These events trigger corresponding actions in the MailTrixy system (activate plan, suspend account, send payment failure email).
- Payment Methods: Supports credit/debit cards (Visa, Mastercard, Amex, Discover), ACH bank transfers (US), SEPA direct debit (EU), and region-specific methods via Stripe.
- Customer Portal: Users can access the Stripe Customer Portal to update payment methods, view billing history, and download invoices without leaving MailTrixy.

## 40+ Payment Gateways

For self-hosted deployments and regions where Stripe is not available, MailTrixy supports over 40 payment gateways through the admin panel configuration:

- Global Gateways: Stripe, PayPal, Braintree, Square, Adyen, Authorize.Net, 2Checkout (Verifone).
- Regional (Asia): Razorpay (India), Paytm (India), PhonePe (India), Instamojo (India), Mollie (EU/Asia), PayU (India/LATAM), SSLCommerz (Bangladesh), bKash (Bangladesh).
- Regional (Africa): Flutterwave (Africa), Paystack (Africa), M-Pesa integration (Kenya/Tanzania).
- Regional (LATAM): MercadoPago (Latin America), PagSeguro (Brazil), Conekta (Mexico).
- Regional (Middle East): Tap Payments, HyperPay, Moyasar (Saudi Arabia), Fawry (Egypt).
- Crypto: Coinbase Commerce, BitPay for cryptocurrency payments.
- Manual/Offline: Bank transfer, check, and manual payment recording for enterprise customers.

The super admin configures available gateways in Admin Panel > Settings > Payment Gateways. Multiple gateways can be active simultaneously, giving end users a choice at checkout.

## Usage Metering

MailTrixy tracks usage against plan limits in real time. When a limit is approached or exceeded, the system takes appropriate action:

- Contact Limit: When the contact count reaches 80% of the plan limit, a warning banner appears. At 100%, new contacts cannot be created (existing contacts are unaffected). Upgrade prompt is shown.
- Email Send Limit: Monthly email sends are counted and reset on the billing cycle date. At 80%, a warning notification is sent. At 100%, campaign sends are paused (one-to-one emails continue for critical communication). Overage charges may apply on Enterprise plans.
- AI Token Limit: AI token usage is tracked per billing period. At 90%, a warning is shown. At 100%, AI features are disabled until the next billing cycle or an upgrade. Unused tokens do not roll over.
- Team Member Limit: Attempting to invite members beyond the plan limit shows an upgrade prompt. Existing members are never removed.
- Usage Dashboard: A dedicated usage page in Settings > Billing > Usage shows current consumption vs. limits for all metered resources with progress bars and trend charts.

## Coupon and Discount Codes

The admin panel supports creating and managing promotional discount codes:

- Coupon Types:
  - Percentage Discount: Reduce the subscription price by a percentage (e.g., 20% off).
  - Fixed Amount: Reduce the price by a fixed dollar amount (e.g., $10 off).
  - Free Trial Extension: Extend the free trial period by a specified number of days.
- Duration: Apply the discount once (first payment only), for a set number of months (e.g., 3 months), or forever (recurring discount for the lifetime of the subscription).
- Restrictions: Limit coupons to specific plans, set a maximum redemption count, set an expiration date, or restrict to first-time subscribers only.
- Redemption: Users enter the coupon code on the checkout page. The discount is applied and displayed before payment confirmation. Coupons sync with Stripe Coupons for proper accounting.
- Tracking: View coupon usage analytics including total redemptions, revenue impact, and which users redeemed each code.

## Invoice Management

MailTrixy generates and manages invoices for all billing transactions:

- Automatic Invoices: An invoice is generated automatically for every successful payment. Invoices include: invoice number, date, plan name, billing period, amount, tax (if applicable), payment method, and transaction ID.
- Invoice History: Access the full invoice history from Settings > Billing > Invoices. Invoices are listed chronologically with status (paid, pending, failed, refunded).
- PDF Download: Each invoice can be downloaded as a professionally formatted PDF. The PDF includes the workspace's billing address, the SaaS provider's details, and line-item breakdown.
- Email Delivery: Invoices are automatically emailed to the workspace Owner and any additional billing email addresses configured in billing settings.
- Tax Configuration: Configure tax rates (VAT/GST — government sales taxes that may apply depending on your customer's location) in the admin panel. Tax is calculated based on the customer's billing address and the applicable rate. Tax-exempt status can be set for individual workspaces.

## Plan Upgrade and Downgrade

Users can change their subscription plan at any time from Settings > Billing > Plan:

### Upgrading

- Upgrades take effect immediately. The new plan's features and limits are available right away.
- Billing is prorated: the remaining value of the current billing period is credited, and the new plan is charged proportionally for the remaining days.
- A confirmation screen shows the prorated amount before the user confirms the upgrade.

### Downgrading

- Downgrades take effect at the end of the current billing period. The user retains their current plan's features until the period expires.
- Before downgrading, MailTrixy checks if the workspace's current usage exceeds the target plan's limits. If so, a warning lists what needs to be reduced (e.g., "You have 8 team members but the Starter plan allows only 3. Please remove 5 members before downgrading.").
- Workflows, campaigns, and other resources that exceed the new plan's limits are paused (not deleted) upon downgrade. They can be reactivated after upgrading again.

### Cancellation

- Canceling a subscription moves the workspace to the Free plan at the end of the current billing period.
- All data is retained for 90 days after cancellation. After 90 days, data exceeding Free plan limits is permanently deleted.
- A cancellation survey is presented asking for the reason (too expensive, missing features, switching to competitor, no longer needed, other). This feedback is logged for product improvement.
- Users can reactivate at any time within the 90-day retention window without data loss.

> Important: Cancellation does not trigger an immediate refund. The workspace remains on the paid plan until the end of the billing period. For refund requests, contact support within 14 days of the last payment.

## Admin Billing Management

Super admins managing the MailTrixy SaaS platform have access to comprehensive billing administration tools:

- Plan Builder: Create and configure subscription plans with custom names, prices, features, and limits. Toggle features on/off per plan.
- Revenue Dashboard: View total MRR (Monthly Recurring Revenue — total predictable income per month from active subscriptions), ARR (Annual Recurring Revenue), churn rate, ARPU (Average Revenue Per User), and LTV (Lifetime Value — estimated total revenue from a customer over their entire subscription) metrics.
- Subscription Overview: List all active subscriptions with filtering by plan, status, and payment gateway. Manually extend, upgrade, or cancel subscriptions.
- Payment Logs: Complete log of all payment transactions with status, amount, gateway, and error details for failed payments.
- Dunning Management: Configure the behavior for failed payments: number of retry attempts, retry intervals, grace period before suspension, and custom notification emails for each dunning stage.