Freemius Checkout + Stripe or Paypal

Freemius provides a seamless checkout experience for developers who want to offer their products via Stripe or PayPal. This documentation will guide you through the integration process.

Getting Started

  1. Create a Freemius Account: Visit Freemius and sign up.
  2. Connect Your Stripe/PayPal Account: Navigate to the Settings page in your Freemius dashboard and connect your payment processor.

Integration Steps

Step 1: Installation

To install the Freemius SDK, use Composer:

composer require freemius/freemius

Step 2: Configuration

You need to configure the SDK with your Freemius public key:

if ( ! function_exists( 'fs' ) ) {
    require_once dirname( __FILE__ ) . '/freemius/start.php';
}

fs()->init([
    'id' => 'YOUR_PLUGIN_ID',
    'slug' => 'your-plugin-slug',
    'public_key' => 'YOUR_PUBLIC_KEY',
    'is_premium' => false,
    'has_paid_plans' => true,
    'checkout' => [
        'provider' => 'stripe', // or 'paypal'
    ],
]);

Step 3: Testing

Make sure to test the checkout process thoroughly, using both sandbox accounts for Stripe and PayPal.