# react-native-upi

> A react native module for handling payment through UPI

Latest version **1.0.6** (published 2018-12-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-upi
pnpm add react-native-upi
yarn add react-native-upi
bun add react-native-upi
```

## 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.6 |
| Published | 2018-12-12 |
| First published | 2018-09-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Abhishek gupta |
| Maintainers | webtaculars |
| Keywords | react-native, react-native-upi, react, native, upi |

## Links

- npm: https://www.npmjs.com/package/react-native-upi
- Repository: https://github.com/webtaculars/react-native-upi
- Homepage: https://github.com/webtaculars/react-native-upi#readme
- Issues: https://github.com/webtaculars/react-native-upi/issues
- npm.io page: https://npm.io/package/react-native-upi

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2018-12-12
- 1.0.5 — 2018-09-14
- 1.0.4 — 2018-09-14
- 1.0.3 — 2018-09-14
- 1.0.2 — 2018-09-14

## README

# react-native-upi

A react native module for handling payment through UPI and handling response from the UPI app.

## Getting started

`$ npm i react-native-upi --save`

`$ react-native link react-native-upi`

## Usage

```javascript
import UPIModule from "react-native-upi";

const transactionId = "transactionId";
const message = `message`;
const payTo = "9XXXXXXXXX@upi";
const payName = "Name";
const amount = XXX;

UPIModule.openUPIClient(
  `upi://pay?pa=${payTo}&pn=${payName}&tr=${transactionId}&tn=${message}&am={amount}`
)
  .then(res => {
    if (res !== null) {
      let result = {};
      let response = res.split("&").forEach(property => {
        let temp = property.split("=");
        result[temp[0]] = temp[1];
      });
      return result;
    }
  })
  .then(res => {
    console.log(res);
  });
```

### UPI Guidelines

To learn more about deep linking in UPI, checkout [NPCI Guidelines](https://www.npci.org.in/sites/all/themes/npcl/images/PDF/UPI_Linking_Specs_ver_1.5.1.pdf "NPCI Guidelines")

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