👩💻Get Started
Last updated
Last updated
The NinjaUPI is designed to allow applications or businesses to request a quote ID by passing a fiat amount, fiat currency, UPI ID, Ninjatag, and wallet type. The Ninjapay Exchange then responds with a quote ID, which can be used to request a Lightning invoice and on-chain address. Upon payment, the Ninjapay platform sends the fiat amount to the provided UPI ID and returns a success response with a transaction ID.
Please note that this would require the UPI ID and a verified account with the Ninjapay exchange to support this functionality, which might not be the case currently. It would also require a secure and reliable way of handling the conversion and transfer of funds. Additionally, there would be a number of regulatory considerations to take into account, especially around anti-money laundering (AML) and know your customer (KYC) requirements.
The implementation of this function would involve a number of steps:
The web application calls Request Invoice for Quote
API with the quote ID and the callback URL.
The Ninjapay backend initiates a UPI payment to the UPI ID, and sends the BOLT-11 invoice and the callback URL in the quote request response.
The Ninjapay platform receives the lightning payment, converts the BTC to INR, and sends the INR to the UPI address specified in during the quote creation.
The Ninjapay platform sends a notification to the callback URL to inform the web application that the payment has been processed.