Skip to content

Subscriptions & Free Trials Management

GateFuz includes a dedicated subscription manager table (wp_gatefuz_subscriptions) that records customer plans, recurring renewal dates, and trial states.

  • 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.
GateFuz Subscriptions and Trials Management

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.


When Stripe, PayPal, or Paystack bills a renewal:

  1. The provider webhook posts to GateFuz REST API.
  2. GateFuz identifies the gateway_sub_id in wp_gatefuz_subscriptions.
  3. The next billing date (current_period_end) is bumped forward.
  4. An entry is recorded in the Transactions Ledger.
  5. do_action( 'gatefuz_subscription_renewed', $subscriptionId, $transactionData ); is triggered.