# payway

> An unofficial client for ABA PayWay

Latest version **0.1.4** (published 2024-01-12) · 0 weekly downloads

## Install

```sh
npm install payway
pnpm add payway
yarn add payway
bun add payway
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2024-01-12 |
| First published | 2023-12-12 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Seanghay Yath |
| Maintainers | seanghay |
| Keywords | abapay, payway, ababank, abapayway |

## Links

- npm: https://www.npmjs.com/package/payway
- Repository: https://github.com/seanghay/payway-js
- Homepage: https://github.com/seanghay/payway-js#readme
- Issues: https://github.com/seanghay/payway-js/issues
- npm.io page: https://npm.io/package/payway

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^1.6.2
- [date-fns](https://npm.io/package/date-fns.md) ^2.30.0
- [formdata-node](https://npm.io/package/formdata-node.md) ^4.4.1

## Recent versions

- 0.1.4 (latest) — 2024-01-12
- 0.1.3 — 2024-01-02
- 0.1.2 — 2023-12-26
- 0.1.1 — 2023-12-20
- 0.1.0 — 2023-12-20
- 0.0.6 — 2023-12-14
- 0.0.5 — 2023-12-13
- 0.0.4 — 2023-12-13
- 0.0.3 — 2023-12-12
- 0.0.2 — 2023-12-12
- 0.0.1 — 2023-12-12

## README

## (Unofficial) Node.js Client for ABA PayWay

The implementation is based on https://www.payway.com.kh/developers/

[![test](https://github.com/seanghay/payway-js/actions/workflows/node-test.yml/badge.svg)](https://github.com/seanghay/payway-js/actions/workflows/node-test.yml)

> [!WARNING]  
> This is not a product of ABA Bank.

```shell
npm install payway
```

### Get started

```javascript
import { PayWayClient } from 'payway';

const client = new PayWayClient(
  'https://checkout-sandbox.payway.com.kh/',
  'your_merchant_id',
  'your_api_key',
);
```

### 1. Create Transaction

```javascript
const data = await client.create_transaction({
  tran_id: "example-01",
  payment_option: "abapay_deeplink",
  amount: 1,
  currency: "USD",
  return_url: "https://example.com/callback",
});
```

### 2. Check Transaction

```javascript
const data = await client.check_transaction("example-01");
```

### 3. List Transactions

```javascript
const data = await client.list_transaction({
  status: "PENDING"
});
```

## Supported Features

- [x] Create Transaction
- [x] Check Transaction
- [x] List Transactions
- [ ] Refund Transaction
- [ ] Pre-Authorization
- [ ] Account-On-File (AOF)
- [ ] Card-On-File (COF)
- [ ] Create Payment Link

--- 

### License

MIT

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