Create Realtime Payment Link
You need to create a 'pay link' to receive fiat payments through Ninjapay payment plugin. 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://api.ninjapay.me/webextension/api/v1/fiat/realtime-payment-link/link
Parameters
type :
String- Type of link we are generating (1 for payment link, 2 for subscription) (required)title:
String- Title of the payment link(required)amount:
Number- Amount to be paid (required)allow_partial_payment :
Boolean- User can make partial payment to your linksingle_use : Boolean - Payment is single use or not
currency:
String- Currency of your amountredirect_url:
String- what url will be redirecting after payment successcust_email:
String- Pass email of customercust_full_name:
String- Pass name of customerask_during_payment:
string- Link will ask customer details, if you dont pass hereonly_phone:
String- Ask only phone number.phone_code:
String- Phone number code of custmer.only_email:
String- Phone number of customer without phone code.cust_phone:
String- Phone number of customer without phone codeonly_phone:
String- Link will only ask customer's emailis_sms:
Boolean- You will get SMS alert after paymentis_whatsapp:
Boolean- You will get message on whatsapp regarding paymentis_invoice_generate:
Boolean: Invoice generation will be given after payment or notenable_upi_qr:
Boolean- Upi link will be coming in responseinclude_order_id_in_redirect:
Boolean- order id will be added in redirect url, mus pass redirect urlcust_reference_id:
String- Id you can pass your custom reference idinclude_cust_ref_in_payment_link:
Boolean-Include customer reference in the payment linkcust_thanks_msg:
String- Message shown to customer after paymentcustom_logo_url:
String- Your personalise logocustom_pay_text:
String:- Text shown to customer during paymenttnc:
String- Terms and conditionsreference_notes:
String- Reference noteexpiry_id:
String- Pass Id according to expire time settingwebhook :
String- Webhook url on which you want to send payment link updatesreference_order_id:
String- User side order id to attach to orders.allow_tips:
Boolean- Tips field show to customer or not.
Other info
If no
expiry_idis passed then link will be having no expiry dateif
include_order_id_in_redirectis passed to true then you need to pass redirection url alsoIf
cust_phoneis passed, you also need to passphone_code(country phone number codes).We can only pass max 1 lakh amount If
allow_partial_paymentis false
Request body
Other info
type
Type of the payment link-
1 -> payment link 2 -> Subscription link
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 webhook.
Callback Response
Code Example
Last updated