Skip to content

v1.0.0

Latest
Compare
Choose a tag to compare
@bupd bupd released this 23 Mar 23:07
· 7 commits to main since this release
8091129

UPI Parser:

upi-parser is a TypeScript library for parsing UPI (Unified Payments Interface) links and creating UPI links from UPI objects. UPI links are commonly used for peer-to-peer payments and are supported by various payment apps in India.

Features:

Parsing UPI Links: Extract information such as recipient's UPI ID, amount, and transaction note from UPI links.
Creating UPI Links: Generate UPI links by providing a UPI object containing relevant details.
TypeScript Support: Written in TypeScript for enhanced type safety and developer experience.
Tested with Jest: Ensures reliability and stability with comprehensive test coverage.

import { parseUPI } from 'upiparser';

const upiLink = 'upi://pay?pa=johndoe@upi&pn=John%20Doe&am=100&cu=INR&tn=For%20dinner';

const parsedUPI = parseUPI(upiLink);

console.log(parsedUPI);
// Output: { pa: 'johndoe@upi', pn: 'John Doe', am: '100', cu: 'INR', tn: 'For dinner' }

Documentation

For detailed usage instructions and API reference, please refer to the Documentation.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Please refer to our Contribution Guidelines before contributing.

License

This project is licensed under the MIT License - see the LICENSE file for details.