# anypay

> Anypay Enterprise Payments Platform

Latest version **0.8.1** (published 2025-01-14) · ISC license · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: maintenance-mode.

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

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.1 |
| Published | 2025-01-14 |
| First published | 2020-08-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 160.7 KB |
| Known vulnerabilities | 0 (+25 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | stevenzeiler |

## Links

- npm: https://www.npmjs.com/package/anypay
- Repository: https://github.com/anypay/anypay-sdk
- Homepage: https://github.com/anypay/anypay-sdk#readme
- Issues: https://github.com/anypay/anypay-sdk/issues
- npm.io page: https://npm.io/package/anypay

## Dependencies (17)

- [ws](https://npm.io/package/ws.md) ^8.13.0
- [joi](https://npm.io/package/joi.md) ^17.2.1
- [zod](https://npm.io/package/zod.md) ^3.22.4
- [chai](https://npm.io/package/chai.md) ^4.3.6
- [axios](https://npm.io/package/axios.md) ^0.27.2
- [mocha](https://npm.io/package/mocha.md) ^8.1.1
- [nconf](https://npm.io/package/nconf.md) ^0.12.0
- [dotenv](https://npm.io/package/dotenv.md) ^8.2.0
- [ts-node](https://npm.io/package/ts-node.md) ^9.0.0
- [@types/joi](https://npm.io/package/@types/joi.md) ^14.3.4
- [chai-spies](https://npm.io/package/chai-spies.md) ^1.0.0
- [superagent](https://npm.io/package/superagent.md) ^6.0.0
- [typescript](https://npm.io/package/typescript.md) ^4.0.2
- [@types/chai](https://npm.io/package/@types/chai.md) ^4.3.3
- [@types/node](https://npm.io/package/@types/node.md) ^14.6.0
- [@types/mocha](https://npm.io/package/@types/mocha.md) ^8.0.3
- [chai-as-promised](https://npm.io/package/chai-as-promised.md) ^7.1.1

## Recent versions

- 0.8.1 (latest) — 2025-01-14
- 0.7.0 — 2023-03-29
- 0.6.2 — 2023-03-29
- 0.6.1 — 2023-03-29
- 0.6.0 — 2023-03-29
- 0.5.1 — 2023-03-27
- 0.5.0 — 2023-03-27
- 0.4.0 — 2023-03-27
- 0.3.2 — 2022-11-28
- 0.3.1 — 2022-11-28
- 0.3.0 — 2022-11-28
- 0.2.0 — 2022-11-28
- 0.1.1 — 2022-11-18
- 0.1.0 — 2020-09-02
- 0.0.9 — 2020-09-02
- … 8 more at https://npm.io/package/anypay/versions

## README

# Anypay SDK For Typescript

## Payment Requests

You may request payment to any one or more addresses.

All payments are directly peer to peer meaning anypay
never receives nor possesses your funds, nor does any
other third party. All payments go directly to your desired
destination from the payer's wallet.

```
import anypay from 'anypay'

let paymentRequest = await anypay.request([{

  currency: 'BSV'

  to: [{
    address: '1C9jt1rdpjvhEgT7TirEnxrz2eVpS3vqfZ',
    amount: 52.00
    currency: 'USD'
  }, {
    address: '123AeiwXiYswoNrNRCvPekkKJYvoUzyxbC',
    amount: 8.00
    currency: 'USD'
  }]

}], {

  webhook_url: 'https://ecommerce.mystore.com/anypay-webhooks',

  redirect_url: 'https://mystore.com/checkout-complete/23if3oio',

  secret: 'my-shared-secret-for-webhook-verification',

  metadata: {

    merchantImageUrl: 'https://bico.media/95a49bbd42717a80d6986181a8a9e8ade30fb9284ef0fb81f61a7de6228108d1.jpg'

  }
})
```

## Multi-Coin Requests

```
import anypay from 'anypay'

let paymentRequest = await anypay.request([{

  currency: 'BSV'

  to: [{
    address: '123AeiwXiYswoNrNRCvPekkKJYvoUzyxbC',
    amount: 5200,
    currency: 'ARS'
  }]

}, {

  currency: 'BCH',

  to: [{
    address: 'bitcoincash:qz0umvn625yf3yqc3z0zzs86fly7ue7ejs0dkzrrak',
    amount: 2600,
    currency: 'ARS'
  }, {
    address: 'bitcoincash:qz0umvn625yf3yqc3z0zzs86fly7ue7ejs0dkzrrak',
    amount: 2600,
    currency: 'ARS'
  }]

}])

```

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