loading..
< View all articles in Forms and Processes.

How to Add a Payment Gateway to a Form

1. Feature Overview

You can integrate a payment gateway directly into your forms to process transactions from leads. We currently support the following payment gateways –

If you’re new to the forms feature, see How to Create a Form.

 

2. Prerequisites

  • You must be an administrator user of your LeadSquared account to access the forms feature.
  • You must have an account with a supported payment gateway provider.
  • Your form must contain First Name and Email Address fields. It is good practice to make these fields mandatory.

 

3. Adding a Payment Field to a Form

While creating a form, on the left pane click Special Fields, then drag and drop the Payment field into your form.

adding a payment field

 

3.1 Setting Field Properties

Now click the Payment field in your form and choose a provider from the drop-down.

payment fields in forms

Based on the payment provider you select, you’ll have to enter the corresponding field properties that appear.

 

3.1.1 RazorPay

Razorpay form payment

Field PropertyDescription
KeyThe API keys associated with your payment provider account.
Secret

 

3.1.2 PayUMoney

PayUMoney form fields

Field PropertyDescription
KeyThe API keys associated with your payment provider account.
Salt
Transaction ID GeneratorLets you generate a transaction ID using a particular convention.

 

3.1.3 PayTM

Paytm for fields

Field PropertyDescription
Merchant IDThe Merchant Id associated with your PayTM account.
Merchant KeyThe Merchant Key associated with your PayTM account.
Industry Type Id
Industry ID (MCC) which the Tenant has registered with Paytm
WebsiteURL of the tenant registered with PayTM.
Test Mode
Allows you to test payments on staging rather than production.

 

3.1.4 PayUBiz

PayUBiz Payments in Forms

Field PropertyDescription
KeyThe API keys associated with your payment provider account.
Salt
Test Mode
Allows you to test payments on staging rather than production.

 

3.2 Setting Product Properties

After setting the field properties, click Product Properties on the right pane.

product properties

Field PropertyDescription
Product InformationDetails on the product.
CurrencyChoose between Indian Rupee (INR), US Dollar (USD), European Euro (EUR) and Singapore Dollar (SGD).
Set Amount ViaYou may either enter an exact amount or set the amount via API.
  • If you select Fixed, you must enter the amount in the field below.
  • If you select API, you must enter the API URL.
Currency UnitThe currency unit you’d like to utilize. For example, Rupee or Paise, Dollars or Cents, etc.

In addition to the field and product properties, you can use the validation properties to make the payment field mandatory and/or hide the field by default (the field will only appear if there is an explicit ‘Show’ form rule associated with it).

 

3.3 Setting the Payment Value Dynamically via Rules

You can set the value of the payment dynamically using form rules –

  1. After adding the payment field to your form, navigate to the Rules tab.
  2. Create a rule with the conditions and actions as per your requirements.

In this example, we’re setting the value of the payment through API depending on the insurance product being purchased –

setting payment value dynamically

Once you’re done you can Save and Exit. For more information on forms, see How to Create a Form.

 

4. Demo

Once you’ve published your form and created a process, you’ll be ready to receive payments through your selected payment provider.

Paytm payment in forms

Paytm payment page

 

Any Questions?

If you have any doubts related to this article, please contact us at support@leadsquared.com or leave us a comment below.