Documentation Index
Fetch the complete documentation index at: https://mintlify.com/blindpaylabs/blindpay-node/llms.txt
Use this file to discover all available pages before exploring further.
Installation
This guide covers everything you need to know about installing and setting up the BlindPay Node.js SDK in your project.Requirements
Before installing the SDK, ensure your environment meets these requirements:- Node.js: Version 18.x or higher
- Package Manager: npm, yarn, pnpm, or bun
- TypeScript (optional): Version 5.x or higher for TypeScript projects
The SDK is built with TypeScript and includes type definitions out of the box. You don’t need to install separate
@types packages.Package Manager Installation
Choose your preferred package manager and run the corresponding command:Package Information
The@blindpay/node package includes:
- CommonJS: For Node.js projects using
require() - ES Modules: For modern projects using
import - TypeScript Declarations: Full type definitions included
- Dependencies: Only
svixfor webhook signature verification
TypeScript Configuration
For TypeScript projects, no additional configuration is required. The SDK includes full type definitions. Optionally, ensure yourtsconfig.json has these settings for optimal experience:
tsconfig.json
Importing the SDK
The SDK supports both CommonJS and ES Module imports:Exported Types and Modules
The SDK exports the following main components:Core Client
Resource Types
Import types for type-safe development:Environment Setup
Create a.env file in your project root to store your credentials:
.env
Loading Environment Variables
For Node.js 20.6.0+, use the built-in.env support:
dotenv package:
Verifying Installation
Create a simple test file to verify the installation:test.ts
Framework Integration Examples
Express.js
Next.js (App Router)
app/api/payouts/route.ts
NestJS
blindpay.service.ts
Troubleshooting
Module not found: Can't resolve '@blindpay/node'
Module not found: Can't resolve '@blindpay/node'
This usually means the package wasn’t installed correctly. Try:
- Delete
node_modulesand lock file - Clear your package manager cache
- Reinstall dependencies
TypeScript errors about missing types
TypeScript errors about missing types
Make sure you have The SDK includes its own type definitions, but you need
@types/node installed as a dev dependency:@types/node for Node.js built-in types.Cannot use import statement outside a module
Cannot use import statement outside a module
If you’re using ES modules, ensure your Or use the
package.json includes:.mts file extension for TypeScript files.Error: Api key not provided
Error: Api key not provided
This error occurs when initializing the BlindPay client without credentials. Make sure:
- Your environment variables are loaded
- The variable names match exactly
- You’re not passing
undefinedvalues
Next Steps
Authentication
Learn how to get and manage your API credentials
Quickstart
Make your first API call in 5 minutes