react-native-allinone-upi
UPI Payment using installed UPI Payment Apps in Mobile. Currently, supported only on Android.
Installation
npm install react-native-allinone-upi
Usage
import { initiateTransaction } from 'react-native-allinone-upi';
initiateTransaction({
upi: 'upi_id',
transactionId: 'transaction_id',
currency: 'INR',
merchantCategoryCode: 'Merchant Category Code',
payeeName: 'Name of the Payee',
amount: '1',
note: 'test',
})
.then((res) => {
console.log(res, 'RESPONSE');
})
.catch((e) => {
console.log(e.message, 'ERROR');
});
Response Props
Key | Value | Description |
---|
paymentStatus | -1 or 1 or 0 | -1 - DATA MISSING OR INVALID, 1 - SUCCESS, 0 - FAILURE |
txnId | String | Transaction ID return from the Payment App ( for Backend Process ) only return when the paymentStatus is 1 or 0 |
txnRef | String | Transaction Reference ID return from the Payment App ( only return when the paymentStatus is 1 or 0 ) |
missingData | Missing Data | Data which is missing or Invalid ( only return when the paymentStatus is -1 ) |
responseCode | String | Code return from the Payment App ( only return when the paymentStatus is 1 or 0 ) |
message | String | Message about Success or Failure or Invalid Data |
Missing Data
AMOUNT
, UPI_ID
, TRANSACTION_ID
, CURRENCY
, MERCHANT_CATEGORY_CODE
, PAYEE_NAME
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Would you like to support me?