# @kawkab-oss/stcpay-node

> STC Pay direct payment implementation for Node.

Latest version **1.1.2** (published 2021-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kawkab-oss/stcpay-node
pnpm add @kawkab-oss/stcpay-node
yarn add @kawkab-oss/stcpay-node
bun add @kawkab-oss/stcpay-node
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2021-04-10 |
| First published | 2021-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Kawkab |
| Maintainers | elbourki, asimnet |
| Keywords | stcpay |

## Links

- npm: https://www.npmjs.com/package/@kawkab-oss/stcpay-node
- Repository: https://github.com/kawkab-oss/stcpay-node
- Issues: https://github.com/kawkab-oss/stcpay-node/issues
- npm.io page: https://npm.io/package/@kawkab-oss/stcpay-node

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.21.1
- [@types/node](https://npm.io/package/@types/node.md) ^14.14.37

## Recent versions

- 1.1.2 (latest) — 2021-04-10

## README

# STC Pay Node.js SDK

STC Pay direct payment implementation for Node.

## Installation
```sh
npm install @kawkab-oss/stcpay-node
yarn add @kawkab-oss/stcpay-node
```

## Usage
```ts
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);
```

---
_Source: https://npm.io/package/@kawkab-oss/stcpay-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
