Connecting mosques and communities
📖 Help Center & User Manual · Documentation Version 1.0

Kariahku.com User Manual & Help Center

Official step-by-step documentation for the Kariahku.com Multi-Tenant Mosque Management System.

Kariahku.com Multi-Tenant Mosque Management System

SECTION 11 — Section 11: Subscription and Billing Management

Official step-by-step documentation for the Kariahku.com Multi-Tenant Mosque Management System.

Documentation Version: 1.0
Generated On: 2026-12-05 00:43 UTC
Articles: 3

Table of Contents

  1. [SEC-11A] Free One-Month Trial, Subscription Plans & Annual Discounts (/mosque-admin/subscription) — Section 11: Subscription and Billing Management
  2. [SEC-11C] Payment Management, Invoices & Receipts PDF, Failed Payments & Reactivation — Section 11: Subscription and Billing Management
  3. [SEC-11D] Platform Billing Administration: Plans, Fees, Discounts, Payment Review & Revenue Reports (/admin/subscriptions & /admin/payments) — Section 11: Subscription and Billing Management
SEC-11A · Section 11: Subscription and Billing Management ✓ Fully Implemented

Free One-Month Trial, Subscription Plans & Annual Discounts (/mosque-admin/subscription)

Complete documentation of the free 1-month trial lifecycle (activation on approval, start/end dates, status, upgrade, expiration) and monthly/annual subscription plans with annual discounts.

Purpose of Function Explain the exact trial and subscription plan rules implemented in Kariahku.com.
Prerequisites An `active` mosque with `subscriptions.view` permission at `/mosque-admin/subscription`.
Required User Permissions Mosque Scope: subscriptions.view (/mosque-admin/subscription) | Institution Scope: subscription.view

A. Free One-Month Trial

  1. Mosque Registration & Trial Activation: When a mosque application is approved at /admin/mosques, subscription_start_mosque_trial() automatically provisions a billing customer (billing_customers) and activates a trialing subscription on the Mosque Standard Plan (mosque-standard).
  2. Trial Start & End Dates: The trial spans exactly 1 calendar month from approval (trial_starts_at to trial_ends_at), clamped accurately to month-end dates via subscription_add_month_count().
  3. One-Trial-Per-Mosque Rule: Setting mosques.trial_consumed = 1 ensures each mosque receives the free trial once.
  4. Subscription Upgrade: At any point during trialing, the Mosque Administrator can open /{lang}/mosque-admin/subscription, select a billing interval, and generate a paid invoice.
  5. Trial Expiration: When trial_ends_at passes without payment:
    • Subscriptions with an open invoice transition to past_due and then a 7-day grace_period before becoming expired.
    • When expired or suspended, paid management features (`microsite_customization`, `announcements`, `activity_publishing`, `committee_management`, `editorial_publishing`, `kariah_membership`) are write-locked while all existing data and prayer times remain preserved.

B. Subscription Plans & Annual Payment Discounts

The table below lists the seeded subscription plans and pricing intervals in subscription_plans and subscription_plan_prices (configurable by Super Admin at /admin/subscriptions):

  1. Viewing Current Plans: Visit /{lang}/mosque-admin/subscription (or /main/subscription / /jakim/subscription) to view current plan status, period end date, and interval pricing.
  2. Changing Plans or Renewing: Select a Plan and Billing Interval (monthly, quarterly, semiannual, or annual) and click Generate Renewal Invoice.
Free One-Month Trial Status, Subscription Plans, and Annual Discounts (/mosque-admin/subscription).
Free One-Month Trial Status, Subscription Plans, and Annual Discounts (/mosque-admin/subscription).

Input Fields & Options Reference

Plan CodeCustomer TypeBilling IntervalList PriceDiscountNet Payable
mosque-standardMosque (mosque)Monthly (monthly)RM 50.000%RM 50.00
mosque-standardMosque (mosque)Quarterly (quarterly)RM 150.000%RM 150.00
mosque-standardMosque (mosque)Semi-Annual (semiannual)RM 300.000%RM 300.00
mosque-standardMosque (mosque)Annual (annual)RM 600.0010% (RM 60.00)RM 540.00
main-standardMAIN (main)Monthly / AnnualRM 500.00 / RM 6,000.000% / 10%RM 500.00 / RM 5,400.00
jakim-standardJAKIM (jakim)Monthly / AnnualRM 2,000.00 / RM 24,000.000% / 10%RM 2,000.00 / RM 21,600.00
Expected Results: Mosque and institutional administrators understand trial dates, plan pricing, annual discounts, and how to generate renewal invoices.
Important Notes & Data Boundaries: Already-issued invoices lock in their subtotal, discount, and amount due at issuance time.

Common Errors & Troubleshooting

If paid mosque management forms return HTTP 402, open /mosque-admin/subscription and pay the open renewal invoice to immediately restore full access.

SEC-11C · Section 11: Subscription and Billing Management ✓ Fully Implemented

Payment Management, Invoices & Receipts PDF, Failed Payments & Reactivation

Step-by-step instructions for paying subscription invoices via toyyibPay (FPX, DuitNow QR, Card) or Manual Bank Transfer, downloading PDF invoices and receipts, and resolving failed or overdue payments.

Purpose of Function Guide Mosque Administrators and Institutional Officers through completing subscription payments and retrieving official billing documents.
Prerequisites An open invoice (`issued` or `overdue`) at `/mosque-admin/subscription`, `/main/subscription`, or `/jakim/subscription`.
Required User Permissions Mosque Scope: subscriptions.view | Institution Scope: subscription.view & subscription.renew

1. Available Payment Methods

Kariahku.com implements 5 payment methods configured in payment_methods:

  • FPX Online Banking (fpx — toyyibPay): Instant online banking checkout via https://toyyibpay.com (or https://dev.toyyibpay.com in sandbox mode).
  • DuitNow QR (duitnow_qr — toyyibPay): QR code payment via banking and e-wallet apps.
  • Credit / Debit Card (card — toyyibPay): Card payment processed by toyyibPay.
  • Manual Bank Transfer (manual_transfer — Internal): Direct bank transfer accompanied by proof-of-payment file upload (PDF, JPG, or PNG, max 5 MB) for platform verification.
  • Institutional Invoice (institutional_invoice — Internal): Purchase Order / credit terms workflow for MAIN and JAKIM government authorities.

2. Making Subscription Payments

  1. Open /{lang}/mosque-admin/subscription (or /main/subscription / /jakim/subscription).
  2. Locate your open invoice (status issued or overdue) in the Invoices and Payment History table.
  3. Online Gateway Checkout (toyyibPay): Select FPX, DuitNow QR, or Card and click Pay. After completing checkout on toyyibPay, you return to /payment/return while the server callback (/payment/toyyibpay-callback) verifies the MD5 signature and activates your subscription.
  4. Manual Bank Transfer (Mosque): Enter the Bank Reference, upload your Payment Proof (PDF/JPG/PNG ≤ 5 MB), and submit. The payment enters pending_verification until approved at /admin/payments.

3. Viewing Payment History & Downloading Invoices / Receipts

  • Download Invoice PDF: Click Invoice PDF (/payment/invoice?id={invoice_id}) on any invoice row.
  • Download Official Receipt PDF: Once an invoice is settled (paid), click Receipt PDF (/payment/receipt?id={receipt_id}) to download the official receipt numbered RCP-YYYYMMDD-....

4. Failed Payments, Outstanding Balances, Suspension & Reactivation

  • Failed Payments: If a gateway checkout fails or a manual transfer is rejected, the invoice remains open so you can initiate a fresh payment attempt.
  • Overdue & Grace Period: Unpaid invoices past due_at move the subscription through past_due → 7-day grace_period → expired.
  • Automatic Reactivation: As soon as payment is confirmed, payment_apply_settled_invoice() automatically transitions the subscription back to active and advances the service period dates.
Payment Methods (toyyibPay FPX/DuitNow QR/Card & Manual Transfer), Invoice PDF, and Receipt PDF.
Payment Methods (toyyibPay FPX/DuitNow QR/Card & Manual Transfer), Invoice PDF, and Receipt PDF.

Input Fields & Options Reference

Document EndpointSerial FormatAccess Authorization
/payment/invoice?id={id}INV-YYYYMMDD-XXXXXXCustomer owner (Mosque / Institution) or Platform Billing Admin.
/payment/receipt?id={id}RCP-YYYYMMDD-XXXXXXCustomer owner (Mosque / Institution) or Platform Billing Admin.
/payment/proof?id={id}Uploaded Proof FileCustomer owner or Platform Admin with payments.manage.
Expected Results: Subscription payments are processed securely, PDF invoices and receipts are downloadable on demand, and expired subscriptions reactivate upon settlement.
Important Notes & Data Boundaries: Invoices remain accessible even when a mosque or institutional subscription has expired so administrators can always download invoices and complete renewal.

Common Errors & Troubleshooting

If you uploaded a manual bank transfer proof and the subscription is not yet active, wait for a Platform Administrator to verify the transfer at /admin/payments.

SEC-11D · Section 11: Subscription and Billing Management ✓ Fully Implemented

Platform Billing Administration: Plans, Fees, Discounts, Payment Review & Revenue Reports (/admin/subscriptions & /admin/payments)

Step-by-step instructions for Super Administrators to manage subscription plans, configure fees and annual discounts, manage trial accounts, verify manual payments, and review revenue reports.

Purpose of Function Enable Platform Billing Administrators to govern pricing, verify bank transfer proofs, configure gateway credentials, and monitor billing revenue.
Prerequisites Signed in as `super_admin` (`subscriptions.manage` and `payments.manage`).
Required User Permissions Global Scope: subscriptions.manage (/admin/subscriptions) & payments.manage (/admin/payments)

1. Managing Subscription Plans, Fees & Annual Discounts (/admin/subscriptions)

  1. Open /{lang}/admin/subscriptions.
  2. In the plan pricing form, configure the list prices for monthly, quarterly, semiannual, and annual intervals and set the Annual Discount Percentage (0% to 90%, default 10%).
  3. Click Save Pricing.
  4. In the customer subscriptions table, you can inspect trial accounts, issue invoices, or apply administrative lifecycle transitions with a mandatory reason note. You can also run daily lifecycle maintenance via CLI:
    php database/manage.php subscription-maintenance

2. Reviewing Manual Payments & Gateway Settings (/admin/payments)

  1. Open /{lang}/admin/payments.
  2. In the Pending Payment Verification queue (`pending_verification`):
    • Click Proof to inspect the uploaded bank slip via /payment/proof?id={payment_id}.
    • Enter a Verification Note and click Verify (marks the invoice `paid`, generates an official receipt, and activates the subscription) or Reject.
  3. In the Payment Gateway Configuration panel, configure toyyibPay mode (`sandbox` or `production`), category code, and secret key (encrypted at rest using AES-256-GCM).

3. Generating Revenue Reports

At the top of /{lang}/admin/payments, the revenue summary cards report settled revenue (`paid_total`), pending verification total (`pending_total`), failed payments (`failed_total`), and overdue invoice balances (`overdue_total`).

Subscription Plan Administration (/admin/subscriptions) and Payment Verification & Revenue Reports (/admin/payments).
Subscription Plan Administration (/admin/subscriptions) and Payment Verification & Revenue Reports (/admin/payments).

Input Fields & Options Reference

Administrative CapabilityRouteRequired Permission
Configure Plan Fees & Annual Discounts/admin/subscriptionssubscriptions.manage
Manage Trial Accounts & Lifecycle Status/admin/subscriptionssubscriptions.manage
Verify Manual Transfers & Issue Receipts/admin/paymentspayments.manage
Configure toyyibPay & View Revenue Reports/admin/paymentspayments.manage
Expected Results: Subscription plans, fees, discounts, manual payment verifications, and revenue summaries are managed with full audit logging.
Important Notes & Data Boundaries: Gateway secret keys are encrypted at rest with AES-256-GCM via `payment_encrypt_secret()`.

Common Errors & Troubleshooting

Schedule php database/manage.php subscription-maintenance daily to automatically process trial expirations, overdue transitions, and 30/14/7/1-day renewal reminders.