Installation
Install the AccruPay Node.js SDK using your preferred package manager.
Requirements
- Node.js >= 18
- TypeScript >= 4.5 (optional but recommended)
Install
NPM
npm install @accrupay/node
Yarn
yarn add @accrupay/node
PNPM
pnpm add @accrupay/node
TypeScript Support
The SDK includes full TypeScript definitions. No additional type packages are required.
import AccruPay from '@accrupay/node';
const sdk = new AccruPay({
apiSecret: process.env.ACCRUPAY_API_SECRET,
environment: 'production',
});
Authentication
To use the SDK, you'll need an API secret from the AccruPay Merchant Portal.
- Log in to the Merchant Portal
- Navigate to API Settings
- Generate or copy your API Secret
- Store it securely in your environment variables
Environment Variables
# .env
ACCRUPAY_API_SECRET=your-api-secret-here
NODE_ENV=production
Next Steps
- Quick Start - Get started with your first payment
- Authentication - Learn about authentication options