taiatiniyara/mpaisa-js ? reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript SDK for the M PAiSA payments gateway so merchants can take wallet payments in a safe way.
I want one main server side client that can start a payment session, send the customer to the M PAiSA checkout page, then verify the return redirect and confirm the final payment status from the gateway. It should also include a browser safe client only helper for reading the redirect query string and showing a simple success or cancelled result, without exposing any secret values.
Please make the flow easy to use, with good TypeScript types, clear errors, support for staging and live, and sensible defaults for timeouts and token caching. I also want a small docs site or playground, tests, and example usage that shows the full payment flow from start to finish.
If you need anything from the current docs or API details, look them up online and follow the official behavior closely.
Are you gonna build this?
make sure you review the code using coderabbit