{"id":25056384,"url":"https://github.com/devsonuyadav/one-react-native-upi","last_synced_at":"2025-06-28T17:06:56.290Z","repository":{"id":65578045,"uuid":"592809640","full_name":"devsonuyadav/one-react-native-upi","owner":"devsonuyadav","description":"This library uses intent to use UPI as a payment gateway without any payment fees. It communicates peer-to-peer which enables the application to support UPI payments by detecting the installed application on the user's phone. UPI application responds with a transcations summary in JSON format.","archived":false,"fork":false,"pushed_at":"2023-01-27T12:51:31.000Z","size":1453,"stargazers_count":16,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T14:43:23.050Z","etag":null,"topics":["android","payment","payments","react","react-native","upi"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsonuyadav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2023-01-24T15:31:07.000Z","updated_at":"2025-06-19T07:19:31.000Z","dependencies_parsed_at":"2023-02-15T09:16:35.924Z","dependency_job_id":null,"html_url":"https://github.com/devsonuyadav/one-react-native-upi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devsonuyadav/one-react-native-upi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsonuyadav%2Fone-react-native-upi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsonuyadav%2Fone-react-native-upi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsonuyadav%2Fone-react-native-upi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsonuyadav%2Fone-react-native-upi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsonuyadav","download_url":"https://codeload.github.com/devsonuyadav/one-react-native-upi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsonuyadav%2Fone-react-native-upi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262452946,"owners_count":23313545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","payment","payments","react","react-native","upi"],"created_at":"2025-02-06T13:23:38.233Z","updated_at":"2025-06-28T17:06:56.263Z","avatar_url":"https://github.com/devsonuyadav.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](https://img.fresherslive.com/assets-images/news/origin/2020/05/01/need-to-know-how-to-change-the-upi-pin-on-phone-through-payment-apps-like-googlepay-phonepe-and-paytm-here-is-the-step-by-step-method.jpg)\n\n# one-react-native-upi\n\nThis library uses intent to use UPI as a payment gateway without any payment fees. It communicates peer-to-peer which enables the application to support UPI payments by detecting the installed application on the user's phone. UPI application responds with a transcations summary in JSON format.\n\n## Features\n\n- Light weight ⚖️\n- Easy to integrate 🔌\n- Works on all UPI Apps 🚀\n\n## Badges\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n\n[![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/)\n\n[![AGPL License](https://img.shields.io/badge/license-AGPL-blue.svg)](http://www.gnu.org/licenses/agpl-3.0)\n\n## Screenshots\n\n![Demo](demo.gif)\n\n## Note\n\nThis library is currently supported by Android only. Please add feature request in order to update the library with iOS support.\n\n## Installation\n\nInstall one-react-native-upi with npm\n\n```bash\nnpm install one-react-native-upi\n```\n\nInstall one-react-native-upi with yarn\n\n```bash\nyarn add one-react-native-upi\n```\n\nAdd `\u003cqueries\u003e \u003c/queries\u003e` in AndroidManifest.xml within `\u003cmanifest\u003e \u003c/manifest\u003e` tag. You can add more application (UPI Apps) by knowing their packageName.\n\n```bash\n\u003cqueries\u003e\n   \u003cpackage android:name=\"com.phonepe.app\" /\u003e                        //Phonepe\n    \u003cpackage android:name=\"com.google.android.apps.nbu.paisa.user\" /\u003e // GPay\n    \u003cpackage android:name=\"net.one97.paytm\" /\u003e                        // Paytm\n    \u003cpackage android:name=\"in.org.npci.upiapp\" /\u003e                     // BHIM\n    \u003cpackage android:name=\"in.amazon.mShop.android.shopping\" /\u003e       // AmazonPay\n\u003c/queries\u003e\n```\n\n## Usage\n\n#### To get installed UPI apps\n\n```javascript\nimport OneUpi from 'one-react-native-upi'\nimport {Button} from 'react-native\n\n\nfunction App() {\n  return  \u003cButton\n          title=\"Get installed apps\"\n          onPress={() =\u003e\n           const apps =  OneUpi.getInstalledUPIApps()\n           console.log(apps)\n         }\n        /\u003e\n}\n```\n\n`OneUpi.getInstalledUPIApps()` returns `String[] ` of installed packageName. If the array is empty that means no apps are installed that supports upi payments\n\n#### To initiate payment\n\n```javascript\nimport OneUpi from 'one-react-native-upi'\nimport {Button} from 'react-native\n\n\n\nconst config =  {\n upiId: 'yourmechantid@paytm',\n name: 'Sonu',\n note: 'Test payment',\n amount: '100',\n targetPackage: \"in.org.npci.upiapp\",\n }\n\n const onSuccess = (success) =\u003e {\n     console.log({success})\n }\n const onFailure = (error) =\u003e {\n     console.log({error})\n }\n\nfunction App() {\n  return  \u003cButton\n          title=\"Pay now\"\n          onPress={() =\u003e\n            OneUpi.initiate(\n              config,\n              onSuccess,\n              onFailure,\n            )\n          }\n        /\u003e\n}\n```\n\n#### config\n\n| Field         | Type   | Default  | Required | Description                                             |\n| ------------- | ------ | -------- | -------- | ------------------------------------------------------- |\n| upiId         | String | \"\"       | ✅       | Upi id of merchant. Personal UPI will not be processed. |\n| name          | String | \"\"       | ✅       | Merchant name                                           |\n| note          | String | \"\"       | ✅       | Payment note                                            |\n| amount        | String | \"\"       | ✅       | Amount to be paid                                       |\n| targetPackage | String | \"\"       | Optional | If not passed then it will open chooser                 |\n| chooserText   | String | Pay with | Optional | if you pass targetPackage, it will not be reflected     |\n\n#### onSuccess response\n\n| Field         | Type   | Value         | Description                  |\n| ------------- | ------ | ------------- | ---------------------------- |\n| status        | String | `SUCCESS`     | Payment Status               |\n| txnId         | String | Dynamic value | transaction ID               |\n| code          | String | `00`          | success response code        |\n| approvalRefNo | String | Dynamic value | Transaction Reference Number |\n\n#### onFailure response\n\n| Field   | Type   | Value    | Description                   |\n| ------- | ------ | -------- | ----------------------------- |\n| status  | String | `FAILED` | payment status                |\n| message | String |          | Reason for the failed payment |\n\n## FAQ\n\n#### Will it work with ios?\n\nNo, it currently supports android\n\n#### Which apps are supported?\n\nI have tested on PayTM, PhonePe, GPay, AmazonPay as of now .\n\n## Author\n\n- [@devsonuyadav](https://github.com/devsonuyadav)\n\n## Support\n\nFor support, email sky32752@gmail.com.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsonuyadav%2Fone-react-native-upi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsonuyadav%2Fone-react-native-upi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsonuyadav%2Fone-react-native-upi/lists"}