=== 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.1
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
* Stripe (automatic card charges each cycle) and Manual (invoice emailed each cycle)
* 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 Stripe 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)
* Additional payment gateways (SSLCommerz, Razorpay, Paypal)
* Advanced reports (custom date range, branch/plan/customer filters, CSV export)
* Advanced notification reminders

**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 and/or Manual in the free version).
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 uses Stripe Checkout to process payments.

It connects to the Stripe API when a customer initiates checkout. At that point, it sends order-related data (such as amount, currency, and product/line-item details) and, depending on your checkout configuration, customer information (such as name and email) needed to create the checkout session.

This connection happens whenever a user submits a purchase through the plugin's checkout flow.

This service is provided by Stripe, Inc.:
Terms of Service: https://stripe.com/legal/consumer
Privacy Policy: https://stripe.com/privacy


== 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 keys/webhook URL, Manual/Offline checkout, and invoice due days.
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.


== Frequently Asked Questions ==

= Which gateways charge cards automatically? =

Stripe supports automatic recurring billing. Manual is invoice-based: an invoice or payment link is emailed each cycle and the customer pays manually. SSLCommerz and Razorpay (invoice-based) are available in the Pro add-on.

= Do I need another e-commerce plugin? =

No. This plugin is self-contained with its own billing engine, checkout shortcodes, and Stripe/Manual gateways.

= 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.1 =
* Initial release: 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.
* Stripe and Manual payment gateways in the free version; Pro add-on (separate package) for staff, roles, PDF invoices, SSLCommerz, Razorpay, email branding, and advanced reports.
