shahriar-shojib/bkash-payment-gateway — reverse-engineered prompt
Reverse engineered prompt
Build me a small Node.js library in TypeScript that lets my backend accept bKash payments easily. I want to initialize it once with my bKash credentials and base URL, then call simple methods for creating a payment, executing it with the payment ID, querying a payment, searching a transaction, refunding a transaction, and checking refund status.
Please make it feel clean and developer friendly, with good TypeScript types, autocomplete friendly request and response shapes, and readable errors when bKash sends back a failure. For execute payment, if the request takes more than about 30 seconds, stop waiting and return a useful error so I can query the payment afterward.
Include an example of how to use it in an Express backend, and make sure it works with the bKash sandbox URL. I’d like this to be packaged like a reusable library, not just a one off app. If anything in the API has changed, look up the current bKash docs online and use the right flow.
Want more depth? Deep Reverse