@kawkab-oss/stcpay-node
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

STC Pay Node.js SDK

STC Pay direct payment implementation for Node.

Installation

npm install @kawkab-oss/stcpay-node
yarn add @kawkab-oss/stcpay-node

Usage

const stcpay = new STCPay({
  merchantId: YOUR_MERCHANT_ID,
  cert: readFileSync('cert.pem', 'utf8'),
  key: readFileSync('key.pem', 'utf8'),
  testing: true
});

const response = await stcpay.authorize(CUSTOMER_PHONE_NUMBER, PAYMENT_AMOUNT, {
  BranchID: 'string',
  TellerID: 'string',
  DeviceID: 'string',
  RefNum: 'string',
  BillNumber: 'string'
});

await stcpay.confirm(response.STCPayPmtReference, response.OtpReference, OTP_FROM_CUSTOMER);

Readme

Keywords

Package Sidebar

Install

npm i @kawkab-oss/stcpay-node

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

6.25 kB

Total Files

5

Last publish

Collaborators

  • elbourki
  • asimnet