=== Lucrativeit - Subscription & Recurring Billing ===
Contributors: lucrativeit
Tags: subscriptions, billing, recurring payments, membership, invoices
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A complete WordPress subscription and recurring billing plugin with flexible plans, automated renewals, and subscriber management.
== Description ==

Lucrativeit - Subscription & Recurring Billing(WPBillify) is a powerful WordPress subscription and recurring billing plugin that helps you create, sell, and manage subscription plans directly from your WordPress website.

Whether you're building a SaaS platform, membership website, fitness club, coaching business, digital service, or any subscription-based business, WPBillify provides everything you need to automate recurring billing and manage subscribers without relying on third-party eCommerce platforms.

Create unlimited subscription plans, manage subscribers, automate recurring invoices, track payments, and grow your recurring revenue with an intuitive admin dashboard.

**Built-in billing engine (free)**

* Subscriptions, invoices, and recurring billing
* Payment gateways: Stripe (automatic card charges each cycle), Manual, SSLCommerz, Razorpay, and PayPal (invoice / payment-link based)
* Public pricing pages with shortcodes and on-page checkout

**Admin modules**

* Executive dashboard (MRR, ARR, active subscriptions, churn, revenue growth)
* Customers with branch assignment and filtering
* Branches (regional offices with images, amenities, and opening hours)
* Plan categories (group plans for gyms, SaaS, ISP, coaching, and more)
* Plans (pricing tiers, daily/weekly/monthly/yearly/lifetime intervals, trials, features)
* Subscriptions (lifecycle: trialing, active, past_due, canceled)
* Billing & invoices (mark paid, payment links)
* Reports (last 30 days overview; custom ranges and CSV export in Pro)
* Settings: General, Payment Gateways, Email/SMTP, Notifications, Email Templates, Frontend

**Public frontend**

Sell subscriptions on any WordPress page with shortcodes and on-page checkout:

* Responsive pricing-table layout with interval tabs (Day, Week, Month, Year, Lifetime)
* Optional hero banner, branch locations grid, and FAQ accordion
* Customer checkout collects name, email, and phone; redirects to the selected gateway or emails a manual invoice
* Appearance controls for colors, fonts, and badges under **Settings → Frontend**

**Setup wizard & demo data**

After activation, a setup wizard lets you import sample categories (Gym Membership, Internet ISP, Online Coaching, SaaS Software, Software License) with plans, customers, subscriptions, invoices, and public pages — or start with a blank workspace.

**Pro add-on**

Premium features ship in a separate add-on (not included in this free plugin):

* Staff management and module-based roles
* Email header logo and footer branding
* PDF invoices (download and email attachments)
* Advanced reports (custom date range, branch/plan/customer filters, CSV export)
* Automated notification reminders (renewal, payment failed, overdue)

**Explore the demo:**

* [Live Demo](https://wpbillify.lucrativeit.com/)
* [Online Documentation](https://docs.lucrativeit.com/subscription-recurring/)


== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` and keep the folder name intact.
2. Activate the plugin through the **Plugins** menu in WordPress. Database tables and default settings are created automatically.
3. Complete the **Setup** wizard: import selected demo categories or choose **Start with empty data**.
4. Open **Recurring Billing** in the admin menu.
5. Configure gateways under **Settings → Payment Gateways** (Stripe, Manual, SSLCommerz, Razorpay, and/or PayPal).
6. Create plans under **Plan Categories** and **Plans**, then publish public pages:
   * Use **Plan Categories → Create public pages** to generate WordPress pages with `[lucrsure_locations_plans]` shortcodes, or
   * Place shortcodes manually on any page (see below).
7. Customize the public layout under **Settings → Frontend** (hero, locations, plans heading, FAQ, appearance).

== Shortcodes ==

`[lucrsure_locations_plans category="your-category-slug"]`
Full membership page: hero section + branch locations + pricing table + FAQ. Use the category **slug** (recommended), not the numeric ID.

`[lucrsure_plans category="your-category-slug"]`
Pricing table and checkout only.

`[lucrsure_hero title="Your headline" image_path="https://example.com/hero.jpg"]`
Hero section only. Pass `title` and `image_path` (or `image`) to override the global settings. Optional: `subtitle`, `button_text`, `button_url`, `image_id`.

`[lucrsure_locations]`
Branch locations grid only. Optional: `heading`, `subtitle`, `branches` (comma-separated branch IDs).

`[lucrsure_faq]`
FAQ accordion only. Optional: `heading`, `subtitle`. FAQ items come from **Settings → Frontend**.

**Common attributes**

* `category` — plan category slug (required for plan shortcodes)
* `interval` — default billing tab: `day`, `week`, `month`, `year`, or `lifetime` (default: `month`)
* `show_intervals` — `yes` or `no` (default: `yes`)
* `popular` — plan ID to highlight with a “Most Popular” badge
* `show_hero`, `show_locations`, `show_faq` — `yes` or `no` (override **Settings → Frontend** defaults)
* `branches` — comma-separated branch IDs for the locations section
* `title`, `image_path` — hero title and image URL (for `[lucrsure_hero]` or `[lucrsure_locations_plans]`)

Section headings, FAQ items, and colors are configured under **Settings → Frontend**.

== External services ==

This plugin can connect to third-party payment providers when the corresponding gateway is enabled under **Settings → Payment Gateways**. No payment API calls are made unless that gateway is configured and a customer starts checkout (or a webhook/IPN is received).

**Stripe**

Used for Stripe Checkout and automatic recurring card charges.

* When a customer checks out with Stripe, the plugin sends order data (amount, currency, line items) and, depending on configuration, customer details (such as name and email) to create a Checkout Session.
* Stripe may also send webhook events to your site to confirm payment status.
* Provider: Stripe, Inc.
* Terms of Service: https://stripe.com/legal/consumer
* Privacy Policy: https://stripe.com/privacy

**SSLCommerz**

Used for invoice-based / hosted payment sessions in Bangladesh and supported regions.

* When a customer pays an invoice via SSLCommerz, the plugin sends transaction details (amount, currency, invoice reference, and customer contact fields required by the gateway) to create a payment session and redirect the buyer.
* SSLCommerz may send Instant Payment Notifications (IPN) to your site to confirm payment status.
* Provider: SSLCOMMERZ (Software Shop Limited)
* Terms of Service: https://sslcommerz.com/terms-and-conditions/
* Privacy Policy: https://sslcommerz.com/privacy-policy/

**Razorpay**

Used for invoice-based payment links in India and supported regions.

* When a customer pays via Razorpay, the plugin sends payment-link data (amount, currency, invoice reference, and customer contact fields) to create a Razorpay payment link.
* Razorpay may send webhook events to your site to confirm payment status.
* Provider: Razorpay Software Private Limited
* Terms of Service: https://razorpay.com/terms/
* Privacy Policy: https://razorpay.com/privacy/

**PayPal**

Used for PayPal Checkout (Orders API) payment flows.

* When a customer pays via PayPal, the plugin sends order data (amount, currency, invoice reference, and return/cancel URLs) to create a PayPal order and redirect the buyer.
* PayPal may send webhook events to your site to confirm capture/payment status.
* Provider: PayPal, Inc.
* Terms of Service: https://www.paypal.com/us/legalhub/paypal/useragreement-full
* Privacy Policy: https://www.paypal.com/us/legalhub/privacy-full


== Screenshots ==

1. Executive Overview dashboard — MRR, ARR, active subscriptions, churn, revenue trend, recent subscriptions, and invoices.
2. Setup wizard — import sample categories (Gym, ISP, Coaching, SaaS, Software License) or start with empty data.
3. Demo category picker — choose which sample categories to import with plans, customers, subscriptions, and public pages.
4. Public membership plans page — interval tabs (Day/Week/Month/Year/Lifetime), pricing cards, Most Popular badge, and FAQ.
5. Subscriptions list — search and filter by status; track customer, plan, MRR, status, and start date.
6. New Subscription wizard (Step 1) — choose a plan across daily, weekly, monthly, yearly, and lifetime tiers.
7. New Subscription wizard (Step 2) — search and select a customer, or add a new customer on the fly.
8. New Subscription wizard (Step 3) — billing details with Stripe automatic recurring payments and auto-renew.
9. New Subscription wizard (Step 3) — manual/offline invoice-based billing with emailed payment links each cycle.
10. Customers list — manage subscriber profiles with search and status filters.
11. Add Customer — create a customer with name, email, phone, company, and branch assignment.
12. Branches list — multi-location offices with images, amenities, and opening hours.
13. Add Branch — configure branch details, amenities, and hours for public location pages.
14. Plan Categories — organize plans into categories and create public pages with one click.
15. Add Plan — create pricing tiers with interval, price, trial, features, and popular badge options.
16. Billing & invoices list — track invoice status (paid, unpaid, overdue, void) and open payment links.
17. Invoice details — view line items, amounts, due dates, and mark invoices paid.
18. Reports — last 30 days revenue, new subscriptions, cancellations, MRR, and breakdowns by gateway and plan.
19. Settings → General — company name, support email, default currency, timezone, and footer text.
20. Settings → Payment Gateways — Stripe, Manual, SSLCommerz, Razorpay, and PayPal configuration and webhook/IPN URLs.
21. Settings → Email — SMTP and outbound mail configuration for invoices and notifications.
22. Settings → Notifications — toggle invoice sent, payment received, and subscription activated emails.
23. Settings → Email Templates — customize subjects and bodies for customer and admin emails.
24. Settings → Frontend — shortcodes, fonts, and colors for hero, plans, buttons, and badges.
25. New Subscription entry — quick access via the + New Subscription button in the admin portal.
26. Pro: Advanced Reports — custom date range, branch/plan/customer filters, Search report, and CSV export.
27. Pro: Staff management & Roles & permissions — create roles with module-level view/manage access for Staff, Billing, Plans, Settings, and more.
28. Pro: Email branding — header logo, colors, alignment, and custom footer text on customer emails.
29. Pro: PDF invoices — branded PDF generation with logo, footer, notes, and email attachments.
30. Pro: Automated reminders — renewal, payment failed, and overdue reminder notification settings.


== Frequently Asked Questions ==

= Which gateways charge cards automatically? =

Stripe supports automatic recurring billing. Manual, SSLCommerz, Razorpay, and PayPal are invoice-based: an invoice or payment link is emailed each cycle and the customer pays manually.

= Do I need another e-commerce plugin? =

No. This plugin is self-contained with its own billing engine, checkout shortcodes, and built-in payment gateways (Stripe, Manual, SSLCommerz, Razorpay, and PayPal).

= How do I display plans on my site? =

Create a plan category, add active plans, then either click **Create public pages** on the Plan Categories screen or add `[lucrsure_locations_plans category="your-slug"]` to any WordPress page. Customize the hero, locations, and FAQ under **Settings → Frontend**.

= Can I sell daily, weekly, or lifetime plans? =

Yes. Plans support daily, weekly, monthly, yearly, and lifetime billing intervals. The public pricing table shows interval tabs for every interval that has at least one active plan in the category.

= What does the demo import include? =

For each selected category it creates the category, sample plans (all billing types), customers, subscriptions, invoices, a public WordPress page with the full shortcode layout, and a hub page linking all category pages.

== Changelog ==

= 1.0.2 =
* Added SSLCommerz, Razorpay, and PayPal payment gateways to the free plugin (including settings UI, checkout, and webhook/IPN handlers).
* Added billing address in the checkout process.
= 1.0.1 =
* Stripe and Manual payment gateways; Pro add-on remains available for staff, roles, PDF invoices, email branding, reminders, and advanced reports.
* Initial release features: admin portal, built-in billing engine, setup wizard, and demo data import.
* Plan categories, branches (with amenities and images), and flexible billing intervals.
* Public shortcodes (`[lucrsure_plans]`, `[lucrsure_hero]`, `[lucrsure_locations]`, `[lucrsure_faq]`, `[lucrsure_locations_plans]`) with pricing table, hero, locations, FAQ, and on-page checkout.
* Frontend appearance settings and automatic public page creation.
