# @payus/payus-sdk

> Payment Gateway API to process crypto currency.

Latest version **1.0.5** (published 2019-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @payus/payus-sdk
pnpm add @payus/payus-sdk
yarn add @payus/payus-sdk
bun add @payus/payus-sdk
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-12-27 |
| First published | 2019-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 13.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Rajvant Chahal |
| Maintainers | rajvant.chahal |
| Keywords | payus, payment, crypto, crypto-payment-gateway, payus-sdk |

## Links

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

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.88.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2019-12-27
- 1.0.4 — 2019-10-05
- 1.0.3 — 2019-10-04
- 1.0.2 — 2019-09-24
- 1.0.1 — 2019-08-22
- 1.0.0 — 2019-08-05
- 0.0.9 — 2019-07-30
- 0.0.8 — 2019-07-17
- 0.0.7 — 2019-07-17
- 0.0.6 — 2019-07-17
- 0.0.5 — 2019-07-16
- 0.0.4 — 2019-07-16
- 0.0.2 — 2019-07-16
- 0.0.1 — 2019-07-16
- 0.0.3 — 2019-07-15

## README

## Payus API SDK
Payment Gateway API to process crypto currency.

## Documentation
This page describes how to use this package.

## Usage

Run `npm install @payus/payus-sdk`

const PayusAPI = require('@payus/payus-sdk')

const payus = new PayusAPI('Access token pass here')

#### Get Address Balance

var balance = payus.getAddressBalance({coin: 'BTC', address: 'put coin address here'})

For `XRP`

var result = payus.getAddressBalance({coin: 'XRP', address: 'put coin address here', destination_tag: 'put here'})

result.then(res => {

    console.log(res)

}).catch(err => {

    console.log(err)

})

### All methods

| method  | params | description |
| ------------- | ------------- | ------------- |
| getAccountBalance  | coin_code (comma separated for multiple coins, example: "BTC,ETH,BCH")  | Get merchant account balance |
| getAddressBalance  | coin, address, destination_tag(only for [XRP, BNB, XLM])  | Get address balance |
| paymentCryptoRest  | currency, return_url, coin_code, product_amount, invoice_id  | To create new customer transaction |
| getBalance  | transaction_id  | Get balance |
| getDepositTransactions  | coin_code, limit(default: 10), page(default: 1), time or transaction | Get deposite transactions example: ({ "coin_code": "ETH", "limit": 10, "page": 1, "time": { "start": 1557324618, "end": 1557809939 }, "transaction": { "txhash": "transaction hash", "condition": "after" } }) |
| withdraw  | apikey, coin_code, amount, withdraw_address, order_id(unique id: like as unix timestamp)  | Withdraw |
| getWithdrawTransaction  | order_id(unique id sent previously with withdraw request)  | Getting the details for withdraw transaction |
| generateAddress  | coin_code | Generate address |
| saveAddress  | coin_code, m_id, request_data, response_data, coin_address | Save address |
| isValidAddress  | coin, address | Address valid check |
| isGreenAddress  | coin, address | Green address check |
| isGreenTransaction  | coin_code, transaction_id | Green transaction |
| getMyAddresses  | coin | Get address |
| getMycoinlist  | (No need to pass data) | Get coin list |
| getRawTransaction  | coin, transaction_id | Get Raw transaction |
| trackPayment  | id | Track payment |
| sendEmail  | status, to_email, transaction_id | Send email |
| getPaymentButtonCoin  | merchant_id, button_type | Get payment button coin |
| payusModelApi  | app_id, api_key | Payus model API |
| getDepositCoinAddress  | coin_code, customer_address | get deposit coin address |
| getDepositToken  | coin_code, customer_address, deposit_transaction, destination_tag(only for [XRP, BNB, XLM]), amount | get deposit token |
| getWithdrawTokenAddress  | coin_code, customer_address, amount | get withdraw token address |
| getWithdrawCoin  | coin_code, customer_address, token_transaction, destination_tag(only for [XRP, BNB, XLM]), amount | get withdraw coin |

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