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

Sell WordPress subscriptions & memberships with automated recurring billing, invoices & renewals via Stripe, PayPal, Razorpay & SSLCommerz.
== Description ==

**Turn any WordPress site into a recurring revenue machine — no third-party e-commerce plugin required.**

Subscription & Recurring Billing (formerly WPBillify) is a complete WordPress subscription plugin that lets you create, sell, and manage subscription plans directly from your dashboard. Build a SaaS platform, gym or fitness membership site, coaching business, ISP, software licensing portal, or any recurring-revenue business — with one plugin that handles pricing pages, checkout, automated invoicing, and subscriber management out of the box.

No coupling to WooCommerce. No third-party subscription add-ons. Just install, configure your payment gateway, and start billing customers on autopilot.

= Why site owners choose this plugin =

* **Launch in minutes, not weeks** — a guided setup wizard imports ready-to-use demo data (Gym Membership, ISP, Online Coaching, SaaS, Software License) so you can see a working subscription business before you build your own.
* **No coding required** — publish a complete pricing page with one click using the built-in shortcode generator.
* **Own your billing stack** — subscriptions, invoices, and payment tracking live in your WordPress database, not locked behind a SaaS billing tool.
* **Multiple ways to get paid** — automatic card billing via Stripe, or invoice/payment-link billing via PayPal, Razorpay, SSLCommerz, or manual bank transfer.
* **Built for global businesses** — gateway coverage spans North America, Europe, India, Bangladesh, and beyond.

= Core Features (100% Free) =

**Built-in billing engine**
* Create unlimited subscription plans with daily, weekly, monthly, yearly, or lifetime billing intervals
* Automated recurring invoices and payment tracking
* Free trials, plan features, and pricing tiers
* Public pricing pages with shortcodes and on-page checkout — no redirect to a separate cart

**Payment gateways included free**
* Stripe — automatic recurring card charges every billing cycle
* PayPal — Checkout / Orders API
* Razorpay — payment links (India & supported regions)
* SSLCommerz — hosted checkout (Bangladesh & supported regions)
* Manual / offline billing with emailed invoices

**Executive dashboard & reporting**
* Real-time MRR, ARR, active subscriptions, and churn rate
* Revenue growth trends and a 30-day performance snapshot
* Subscription lifecycle tracking: trialing, active, past due, canceled

**Customer & subscriber management**
* Full customer directory with search and status filters
* Multi-branch / multi-location support with images, amenities, and hours — ideal for gyms, clinics, and franchises
* Plan categories to organize offers by business type (gym, SaaS, ISP, coaching, and more)

**Frontend built for conversions**
* Responsive pricing tables with interval tabs (Day / Week / Month / Year / Lifetime)
* Optional hero banner, location grids, and FAQ accordion — build a full membership landing page with shortcodes alone
* Full appearance control: colors, fonts, and "Most Popular" badges under Settings → Frontend

= Perfect For =

* SaaS and software companies selling license subscriptions
* Gyms, fitness studios, and wellness memberships
* Online coaches, consultants, and course creators
* Internet service providers (ISPs) billing recurring plans
* Agencies and freelancers billing retainers or service subscriptions
* Any WordPress site that wants recurring revenue without WooCommerce Subscriptions or a third-party billing SaaS

= Go Further with Pro =

**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/)
* [Buy Subscription and Recurring Billing Pro](https://lucrativeit.com/wordpress-plugins/subscription-recurring-billing/)


== 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`)
* `template` — pricing layout: `list`, `cards`, or `grid` (overrides **Settings → Frontend → Plans template**)
* `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, plan templates, 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 — Cards plan template with interval tabs (Day/Week/Month/Year/Lifetime), 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, thumbnail, branch assignment, 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 — choose a plan template (List, Cards, or Grid), plus shortcodes, fonts, and colors for hero, plans, buttons, and badges.
25. Plan templates — public pricing page layouts: List, Cards, and Grid (with branch / type filters on Grid).
26. New Subscription entry — quick access via the + New Subscription button in the admin portal.
27. Pro: Advanced Reports — custom date range, branch/plan/customer filters, Search report, and CSV export.
28. Pro: Staff management & Roles & permissions — create roles with module-level view/manage access for Staff, Billing, Plans, Settings, and more.
29. Pro: Email branding — header logo, colors, alignment, and custom footer text on customer emails.
30. Pro: PDF invoices — branded PDF generation with logo, footer, notes, and email attachments.
31. 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.3 =
* Added plan templates for the public pricing page: choose List, Cards, or Grid under Settings → Frontend (also override per shortcode with `template`).
* Added assign branch to plan so each plan can be limited to a location or shown for all branches, with branch-aware filtering on the frontend grid/cards layouts.
* Added optional plan thumbnail image for richer card and grid displays.

= 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.
