Skip to main content

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.

  1. Log in to the Merchant Portal
  2. Navigate to API Settings
  3. Generate or copy your API Secret
  4. Store it securely in your environment variables

Environment Variables

# .env
ACCRUPAY_API_SECRET=your-api-secret-here
NODE_ENV=production

Next Steps