Installing the package:
npm install hitpay --save
# or
yarn add hitpay
The hitpay client needs to be configured with your API key and API salt, which are available in the Hitpay Dashboard.
const HitpayClient = require('hitpay');
const hitpay = new HitpayClient({
apiKey: process.env.HITPAY_API_KEY,
apiSalt: process.env.HITPAY_SALT,
environment: 'sandbox',
});