Subscriptions & Free Trials Management
GateFuz includes a dedicated subscription manager table (wp_gatefuz_subscriptions) that records customer plans, recurring renewal dates, and trial states.
Subscription Lifecycles
Section titled “Subscription Lifecycles”- Active: Customer is actively billed and entitlements are verified.
- Trialing: User has initiated a free trial without an upfront payment charge.
- Canceled: Subscription has been terminated by the customer or admin.
- Expired: Grace period has ended without a successful renewal charge.
Free Trial Handling
Section titled “Free Trial Handling”GateFuz supports trials through the action hook:
do_action( 'gatefuz_subscription_trial_started', $subscriptionId, $userId, $trialEnd, $data );When a customer begins a trial, GateFuz records trial_start and trial_end in the database without inserting a completed charge transaction. When the trial converts to a paid subscription, the gateway webhook fires gatefuz_subscription_renewed and records the first paid transaction.
Automatic Webhook Synchronization
Section titled “Automatic Webhook Synchronization”When Stripe, PayPal, or Paystack bills a renewal:
- The provider webhook posts to GateFuz REST API.
- GateFuz identifies the
gateway_sub_idinwp_gatefuz_subscriptions. - The next billing date (
current_period_end) is bumped forward. - An entry is recorded in the Transactions Ledger.
do_action( 'gatefuz_subscription_renewed', $subscriptionId, $transactionData );is triggered.

