thatfiredev/mpesa-node-api ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Node.js library for the M Pesa Mozambique API that people can install and use right away in their own apps.
I want it to read configuration from a .env file, with an option to pass custom settings in code too, then expose simple functions for the main payment flows. At minimum, support customer to business and business to customer transactions, and have each call return a Promise so it works with both then and async await.
Please make the usage feel very simple, something like requiring the package and calling a single function with amount, phone number, transaction reference, and third party reference. The responses should come back in the same shape as the M Pesa API. If you can, include a few basic tests and clear examples in the README so someone can get it working quickly. If you need current API details, look them up online first.
Are you gonna build this?
make sure you review the code using coderabbit