Create Template
Template API helps us to create custom payment page template which we are going to show to the user, example is shared below.
Here your payment link will looks like this, you can customize it according to your needs like logo, button color etc and also functionality wise, you need tip text box or not.
Method
Parameters
logo:
String
- Logo which you want to show on the template (required).brand_color:
String
- Brand color of template (required).accent_color:
String
- Accent/Button color of template (required).enable_tips:
Boolean
- Tips should be enable or not to customers.include_order_id:
Boolean
- order id will be added in redirect url, mus pass redirect urldefault_currency:
String
- Currency of your amountredirect_url:
String
- What url will be redirecting after payment success.webhook :
String
- Webhook url on which you want to send payment link updates.tnc_url:
String
- What url will be show in term and condition link..default_thanks_msg:
string
- What thanks message will be shown to the user.default_btn_text:
String
- What default btn text message will be shown to the user.donation_text:
String
- donation text to show to user..donation_percent:
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 responsecust_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 personalize 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 settingreference_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_id
is passed then link will be having no expiry dateif
include_order_id_in_redirect
is passed to true then you need to pass redirection url alsoIf
cust_phone
is passed, you also need to passphone_code(country phone number codes)
.We can only pass max 1 lakh amount If
allow_partial_payment
is false
Request body
Other info
Parameters | Input options |
---|---|
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