Create Payment Link
You need to create a 'pay link' to receive fiat payments through Ninjapay UPI payment gateway. A pay link contains Payment info added in the dashboard by the merchant(you), capable of accepting payments through the UPI protocol or bank transfers from customers.
Method
POST https://prod.ninjapay.me/uapi/v1/p2p/paymentLink/create
Parameters
Body (application/json)
{
amount: int; // Add the amount in inr value
purpose?: string; // You can add invoice number or payment notes here
payment_mode?: string; // "upi" and "bank" supported currently. Default is "upi".
payment_mode_type?: string; // "primary" and "secondary" supported currently. Default is "primary".
callback_url?: string; // Your webhook url for getting response on successuful payment.
success_url?: string; // Redirected to this after success from hosted checkout
order_id?: string;
extra?: {} // You can add other extra details like customer name, etc.. here.
}
Other info
Parameters
Input options
payment_mode
upi, bank
payment_mode_type
primary, secondary
Response
Payment Success Response
Upon successful payment, the Ninjapay platform sends the fiat amount to the provided UPI ID and gives a success response to the callback_url.
Callback Response
Code Example
You can use Ninjapay's native checkout experience by redirecting your user to the checkout endpoint:
Production - https://checkout.ninjapay.me/{link_id}
Last updated