Skip to main content

Framework Integration Guide for SaaS Applications

Our JS SDK is written in a framework-agnostic way using standard APIs such as Request and Response.

This makes the SDK compatible with modern frameworks and runtimes such as Next.js, Hono, Deno, and Bun, as well as serverless platforms like Vercel and Cloudflare Workers.

Refer to the integration guide for a general overview of how to integrate the SDK with your SaaS application.

We also provide a React Starter Kit that includes components for checkout, pricing tables, and customer portals etc.

note

Other Node.js frameworks such as Express, Koa, and Fastify can also be used with the SDK. However, they may require additional polyfills or middleware to fully support the web standard APIs used by the SDK. We plan to add adapters for these frameworks in the future.

In this section, we provide specific guides for integrating the SDK with popular frameworks. Each guide covers the necessary steps to:

  1. Set up the SDK and the Starter Kit
  2. Protect or paywall features in your SaaS application
  3. Implement common use cases such as creating checkouts, rendering the customer portal, and handling webhooks

Common Integration Patterns

Every integration guide will cover the following common patterns:

  1. Two API endpoints at /api/checkout and /api/portal to facilitate checkout and customer portal operations
  2. One webhook listener endpoint at /webhook to handle incoming webhook requests from Freemius
  3. Starter Kit component to create paywalls and render pricing tables
  4. Starter Kit component to render the customer portal

At the end of every guide, you will have a fully monetized SaaS application with Freemius.

Framework Not Listed?

We recommend checking out the General Integration Guide, Starter Kit API Endpoints and React Starter Kit documentation to help you integrate the SDK with your preferred framework.