Getting Started

Installation

Choose your integration path and install the right Nexa packages.

Prerequisites

  • Node.js 18+ (all packages)
  • Node.js 20+ if using @nexa-ed/next
  • A Nexa tenant account — grab your API key from the dashboard (it doubles as your webhook signing secret, see below)

Choose your path

My stackInstall this
Next.js 15 (App Router)@nexa-ed/next + @nexa-ed/react
Express / Fastify / Hono / raw Node@nexa-ed/node
React (Vite, Remix)@nexa-ed/react + @nexa-ed/node on server
Vue 3 / Nuxt / SvelteKit@nexa-ed/node on server
Any language (Python, PHP, Go, cURL)No package — REST API docs
Convex backend@nexa-ed/convex

The fastest integration. One file gives you upload, SSE progress, webhooks, and payments.

pnpm add @nexa-ed/next @nexa-ed/react
# npm
npm install @nexa-ed/next @nexa-ed/react

@nexa-ed/next re-exports everything from @nexa-ed/sdk — you do not need to install @nexa-ed/sdk separately.

Peer dependencies: Next.js 15+, React 19+

→ Continue with the Quickstart


Node.js

For any Node.js server — Express, Fastify, Hono, or raw http. Includes the full core SDK and framework-specific webhook adapters.

pnpm add @nexa-ed/node

Requirements: Node.js 18+

import { NexaClient } from "@nexa-ed/node";
 
const nexa = new NexaClient({
  apiKey: process.env.NEXA_API_KEY!,
  webhookSecret: process.env.NEXA_WEBHOOK_SECRET!,
});

→ Continue with the Node.js guide


React components

Drop-in UI for any React 19+ app. Works with Vite, Remix, or alongside @nexa-ed/next.

pnpm add @nexa-ed/react

Peer dependencies: react >=19, @tanstack/react-query >=5

import { NexaProvider, ResultsViewerSheet } from "@nexa-ed/react";
 
export default function App() {
  return (
    <NexaProvider basePath="/api/nexa">
      <ResultsViewerSheet />
    </NexaProvider>
  );
}

→ See all components and hooks


Convex

Schema fragments, mutations, queries, and webhook handlers for Convex backends.

pnpm add @nexa-ed/convex

Peer dependency: convex >=1.9.0

// convex/schema.ts
import { defineSchema } from "convex/server";
import {
  nexaPaymentsSchema,
  nexaFilesSchema,
  nexaStudentEmailsSchema,
} from "@nexa-ed/convex/schema";
 
export default defineSchema({
  ...nexaPaymentsSchema,
  ...nexaFilesSchema,
  ...nexaStudentEmailsSchema,   // optional — add if you use student email provisioning
});

→ See Webhooks → Convex integration


Environment variables

Add these to .env.local (or your framework's equivalent) regardless of which package you use:

# Required — both values come from the same API key in the Nexa dashboard
NEXA_API_KEY=nxa_live_...
NEXA_WEBHOOK_SECRET=nxa_live_...   # set to the SAME value as NEXA_API_KEY
 
# Optional — defaults to https://nexa-ed.com
NEXA_URL=https://nexa-ed.com

Warning

Never expose NEXA_API_KEY in client-side code or commit it to source control. All SDK packages route API calls through your server — the key never leaves it.

Info

Nexa signs every webhook with HMAC-SHA256 using your API key as the signing secret — there is no separate webhook secret to generate today. Set NEXA_WEBHOOK_SECRET to the exact same value as NEXA_API_KEY, and update both whenever you rotate the key.

On this page