Integration

Netlify Functions with Meridian

Deploy serverless license validation at the edge. Meridian's lightweight handler verifies keys, sessions, and entitlements inside Netlify Functions — no external origin required.

Quickstart

  1. Install the Meridian Netlify helper: npm install @meridian/netlify
  2. Create netlify/functions/validate-license.js
  3. Set environment variables: MERIDIAN_API_KEY and MERIDIAN_PRODUCT_ID
  4. Deploy — your edge endpoint is live in seconds.

Handler skeleton

import { createValidator } from "@meridian/netlify";

const validate = createValidator({
  productId: process.env.MERIDIAN_PRODUCT_ID,
  apiKey: process.env.MERIDIAN_API_KEY,
});

export async function handler(event) {
  const { key, hwid } = JSON.parse(event.body);
  const result = await validate(key, hwid);
  return {
    statusCode: result.valid ? 200 : 403,
    body: JSON.stringify(result),
  };
}

Response shape

{
  "valid": true,
  "plan": "pro",
  "expires": "2026-08-01T00:00:00Z",
  "entitlements": ["premium_support", "api_access"]
}

Need on-prem or air-gapped validation? See self-hosted guide.