# node-rdcw-slipverify

> RDCW Slip Verify SDK v3 for Node.js — verify Thai bank slips via /v2/inquiry (JSON payload or multipart file)

Latest version **4.0.1** (published 2026-05-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-rdcw-slipverify
pnpm add node-rdcw-slipverify
yarn add node-rdcw-slipverify
bun add node-rdcw-slipverify
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2026-05-20 |
| First published | 2025-03-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 35 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | nightkungz |
| Keywords | thai-bank, slip-verify, qr-code, payment-verification, promptpay, rdcw, slipverify, bank-transfer, payment, thailand |

## Links

- npm: https://www.npmjs.com/package/node-rdcw-slipverify
- Repository: https://github.com/ArtifactyNight/node-rdcw-slipverify
- Homepage: https://github.com/ArtifactyNight/node-rdcw-slipverify#readme
- Issues: https://github.com/ArtifactyNight/node-rdcw-slipverify/issues
- npm.io page: https://npm.io/package/node-rdcw-slipverify

## Dependencies (2)

- [date-fns](https://npm.io/package/date-fns.md) ^3.6.0
- [promptparse](https://npm.io/package/promptparse.md) ^1.5.0

## Recent versions

- 4.0.1 (latest) — 2026-05-20
- 4.0.0 — 2026-03-25
- 3.0.0 — 2025-10-09
- 2.0.1 — 2025-03-21
- 2.0.0 — 2025-03-21
- 1.1.0 — 2025-03-20
- 1.0.0 — 2025-03-07

## README

# node-rdcw-slipverify

> **Deprecated** — This package is no longer maintained. Use **[slipverify](https://github.com/maythiwat/slipverify)** instead: a unified SDK for Thai bank & e-wallet slip verification (including RDCW) with a single `inquiry` API and multiple providers.

[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)

## Migrate to slipverify

```bash
npm install slipverify
```

```typescript
import { inquiry } from "slipverify";
import { rdcw } from "slipverify/providers";

const provider = rdcw({
  clientId: "your-client-id",
  clientSecret: "your-client-secret",
});

const result = await inquiry({
  provider,
  payload: "0038000600000101030060217Bf870bf26685f55526203TH9104CF62",
});

if (result.valid) {
  console.log(result.data);
} else {
  console.log("Slip is invalid.");
}
```

| This package | [slipverify](https://github.com/maythiwat/slipverify) |
| ------------ | ------------------------------------------------------- |
| `createSlipVerify({ clientId, secret })` | `rdcw({ clientId, clientSecret })` |
| `verifyFromPayload(payload)` | `inquiry({ provider, payload })` |
| `Result<T, E>` (`{ data }` / `{ error }`) | `result.valid` + `result.data`; API errors throw `SlipVerifyError` |

**Other providers** (SCB, KBank, SlipOK, Thunder, EasySlip, TrueMoney, etc.) use the same `inquiry` flow — see the [slipverify README](https://github.com/maythiwat/slipverify#usage).

**Requirements:** Node **>= 18** or Bun **>= 1.0** (native `fetch`). Server-side only.

---

## Legacy documentation (v4)

The sections below describe this deprecated package only. Do not start new projects on `node-rdcw-slipverify`.

Unofficial SDK for [RDCW Slip Verify](https://slip.rdcw.co.th/). Requests use **`POST {baseUrl}/v2/inquiry`** with **`fetch`** — JSON body for a payload string, or **`multipart/form-data`** (`file`) for slip images.

### Installation

```bash
npm install node-rdcw-slipverify
```

### Quick start

```typescript
import { createSlipVerify } from "node-rdcw-slipverify";

const slip = createSlipVerify({
  clientId: "your-client-id",
  secret: "your-client-secret",
});

const result = await slip.verifyFromPayload(
  "0038000600000101030060217Bf870bf26685f55526203TH9104CF62"
);

if (result.error) {
  console.log(result.error.message, result.error.code);
} else {
  console.log(result.data);
}
```

### Verify from slip image (multipart)

```typescript
import fs from "node:fs";
import { createSlipVerify } from "node-rdcw-slipverify";

const slip = createSlipVerify({
  clientId: process.env.RDCW_CLIENT_ID!,
  secret: process.env.RDCW_SECRET!,
});

const buf = fs.readFileSync("./slip.jpg");

const result = await slip.verifyFromSlipFile({
  data: buf,
  fileName: "slip.jpg",
  contentType: "image/jpeg",
});
```

### Validation (optional second argument)

```typescript
const result = await slip.verifyFromPayload(payload, {
  expectedAccount: "1234567890",
  expectedBank: "014",
  expectedAmount: "100.00",
  maxAgeDays: 1,
  rejectCached: true,
});
```

### Development

```bash
ni
nr build
```

## License

ISC

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