Easy Node.js SDK
The Easy Node.js SDK provides a comprehensive, type-safe solution for server-side payment processing, customer management, and e-commerce functionality. Designed for Node.js applications, Express servers, Next.js API routes, and other backend environments.
📚 View Full Documentation & Examples →
Features
- Customer Management - Create, update, and retrieve customer information
- Payment Instruments - Securely handle cards and bank accounts
- Transfers & Payments - Process payments and manage transfers
- Products & Pricing - Manage products, prices, and subscriptions
- Orders & Settlements - Track orders and handle settlements
- Disputes - Manage payment disputes
- Checkout - Complete checkout flows with line items
- TypeScript-first API - Full type safety and IntelliSense support
- Server-side Security - PCI-compliant payment processing
Installation
npm install @easylabs/node
yarn add @easylabs/node
pnpm add @easylabs/node
Quick Start
Basic Usage
import { createClient } from "@easylabs/node";
const easy = await createClient({
apiKey: process.env.EASY_API_KEY,
});
const customer = await easy.createCustomer({
first_name: "John",
last_name: "Doe",
email: "john@example.com",
});
const order = await easy.checkout({
customer_creation: false,
identity_id: customer.data.id,
source: "pi_123",
line_items: [{ price_id: "price_abc", quantity: 2 }],
});
Express.js Integration
import express from "express";
import { createClient } from "@easylabs/node";
const app = express();
app.use(express.json());
const easy = await createClient({
apiKey: process.env.EASY_API_KEY,
});
app.post("/api/customers", async (req, res) => {
const customer = await easy.createCustomer(req.body);
res.json(customer);
});
app.listen(3000);
📖 See complete examples and API reference in the full documentation
Core Features
Customer Management
Create and manage customer profiles with full CRUD operations.
Payment Processing
Handle payment instruments securely with tokenization and process transfers.
Product Catalog
Manage products, prices, and subscription plans for your e-commerce platform.
Checkout Flows
Complete checkout with line items, supporting both new and existing customers.
TypeScript Support
The SDK is built with TypeScript and provides comprehensive type definitions for all methods and data structures.
import type {
CreateCustomer,
CreateTransfer,
CustomerData,
ApiResponse,
} from "@easylabs/node";
Contributing & Support
For issues, questions, or contributions, please open an issue or pull request on GitHub.
License
ISC