1. Feature Overview
This connector generates Razorpay payment links directly from your LeadSquared account. Your leads can use these links to make payments (e.g., for registrations, purchases, etc.). This payment is posted as an activity against the lead in LeadSquared.
- You must be the Administrator of your LeadSquared account.
- You must have an active Razorpay account.
3. How it Works
- Install and configure the Razorpay(Payment link) connector
As part of the connector configuration, two custom activities are automatically created – Razorpay Payment Link Request (sends the payment activity details to your Razorpay account) and Razorpay Payment Link (generates the payment link). When the connector is enabled, a webhook URL is generated. Copy this URL.
- Create an automation
Use any activity trigger, and select the Razorpay Payment Link Request activity as the automation event trigger. Add a Webhook action to this automation, paste the connector’s webhook URL to this automation action, and publish the automation. This automation is used to generate the Razorpay payment link.
- Post the activity
Once the automation is published, post the Razorpay Payment Link Request activity on the lead. The Razorpay Payment Link Request activity is similar to a sales activity, and it can be used when the lead is about to make a payment for the services or products you offer.
Once the Razorpay Payment Link Request activity is posted, based on the automation you’ve set up, the Razorpay Payment Link activity is automatically posted on the lead. This activity contains the payment link URL which the lead can use to make the payment. Share this link with your lead, which they’ll use to complete the payment for the services or products you offer.
4. Install the Connector
- Navigate to Apps>Apps Marketplace.
- Search for Razorpay(Payment link), and click Install.
- Alternatively, you can find the connector on the left panel, under Payment Gateway.
- Once installed, hover your cursor over , and click Configure.
5. Configure the Connector
Once you’ve installed the connector, on the Configure Razorpay (Payment link) pop-up, configure the connector access for the non-Admin users in your account. Only those users for whom access is granted can view and access the connector (under the Apps main menu).
- Select if you want to grant Connector Access that’s Based on Role or Advanced (User Level).
- Based on Role – From the Specify Roles dropdown, select the LeadSquared user roles that can use the connector.
- Advanced (User Level) – From the Advanced (User Level) dropdown, select a user boolean field. Based on the value entered in the selected boolean field, the user can access the connector (e.g., for the user Sam, if the “Is Employee” boolean user field contains the value “Yes”, then this user can access the connector).
- Once you’re done, click Save Details. To continue the configuration, refer to the below sections.
6. Admin Configurations
To continue the connector configuration, navigate to Apps>Razorpay (Payment link).
6.1 Basic Details
Enter the following details –
|Key ID||Your Razorpay account’s API keys. To know how to obtain them, refer to Razorpay API Keys.|
|Lead Source||Enter the lead source through which the leads were captured (e.g., Razorpay, email campaign, etc.). This detail will be displayed on the Lead Details page, under Lead Source.|
|Default Country Code||If the lead’s mobile number is captured without a country code, then the default country code that’s selected from the dropdown will be added to the lead’s mobile number.|
|Select Time Zone||The time zone of your Razorpay account.|
|Lead Capture Search By Criteria||To avoid creating duplicate leads, you must select one unique lead field (e.g., email Id, mobile number, PAN number, etc.) as the search key.|
To know how to mark a LeadSquared lead field as unique, please refer to How to Make a Custom Field Unique.
|Lead Capture Secondary Search By Criteria||If lead identification and capture through the primary Search By Criteria fails, it will be re-attempted using the secondary Search By Criteria.|
|Select User to Notify on Failure||If there is an error in fetching leads, the selected user will receive a failure message via email. You can select a user from the list of all the users available in your LeadSquared account.|
To know more about the type of errors, please refer to Error Notifications.
|Enable Notification||To ensure notification emails are sent to the selected user when there’s a failed query, enable the checkbox.|
Once you’re done entering all the details, click Save & Next.
Once you’re done with the basic settings, click Entity Options. By default, all the Razorpay fields are mapped to the corresponding LeadSquared lead fields. You’ll have to complete two steps here –
- Enable Activity Creation* – Alongside Razorpay Payment Link and Razorpay Payment Link Request, click the Create Activity button.
- Edit Mapping – Alongside each action (Activity Entity, Payment Link Creation, and Lead/Contact Entity) click the Edit Mapping button to verify if the field mapping is accurate. Once verified, click Save & Close. This step is mandatory.
If required, on the Edit Mapping pop-up, you can edit the field mapping –
- To edit the Razorpay mapping field name, click , and under Mapping Key, edit the field name.
- To change the LeadSquared lead field to which the Razorpay field is mapped, click , and from the Lead Field dropdown, select the new lead field.
- To mark a unique lead field as the search key, click .
- To disable an existing field mapping, alongside the field, disable the slider .
- To map an additional field, click the Add Custom button, and add the new mapping field details.
- To edit the Payment Link Creation API details, click , and make the required changes.
- If you want to capture any additional API response as part of the activity that’s posted on the lead, alongside Activity Entity, click Edit Mapping, and add the response on the Default Mapping for Activity pop-up.
Once you’re done, click Save & Next.
- *Ensure you complete the Enable Activity Creation steps first, and only then complete the Edit Mapping steps.
- You must mandatorily verify the mapping for Lead/Contact Entity, Payment Link Creation and Activity Entity, and click Save & Close for each action type, in order to complete the Mapping.
- Since this connector is capturing the payment details as an activity, the Sync Behaviour is by default set to Do Nothing. It is recommended you don’t change this to any other setting.
6.3 Webhook URL
After you provide basic details and finish field mapping, a custom webhook URL is generated. Copy this webhook URL, and use it to create an automation that will generate the payment links.
7. Create an Automation
Use the Webhook URL from the previous step to create an automation that generates the Razorpay payment links.
- Navigate to Workflow>Automation, and click Create Automation, and select any Activity trigger. We’ve selected the New Activity on Lead trigger.
- On the Automation starts when an activity is added pop-up –
- From the Select an activity dropdown, select Razorpay Payment Link Request.
- Disable the checkbox alongside Run only once per lead. This is to ensure that if required, multiple payment links can be generated for the same lead.
- Once you’re done, click Save.
- Click , and under Custom, click Webhook.
- On the Webhook pop-up, enter the following details –
- Name – Enter a relevant name for the webhook. We’re calling it “Razorpay Payment Link Generation”.
- URL – Select the method as https://, and paste the connector’s webhook URL that was generated in the previous step. Before you paste the URL, ensure you remove “https://” from the URL.
- Content Type – Select application/json.
- Save Response – You can select either Yes or No.
- Custom Headers – You can skip this step.
- Notify on Failure – Select which user you want to notify if the webhook fails.
- Retry Count – The number of times you want to retry when the webhook fails.
- Once you’re done, click Save, and then click Publish.
8. Post an Activity
Once the webhook is configured in an automation, you can start posting the Razorpay Payment Link Request activity on leads, which will in turn automatically post the Razorpay Payment Link activity. This activity contains the –
- Payment link
- Payment amount (in INR/USD/Euro/SGD)
- Payment status
- Payment ID
- Navigate to Leads>Manage Leads, and click on any lead.
- On the Lead Details page, click the Activity button. On the Add Notable Activity pop-up, enter the following mandatory details –
- Activity Type – From the dropdown, select Razorpay Payment Link Request.
- Activity Date – Select a date and time for the activity.
- Amount – Enter the value of the transaction (e.g., 75,000).
- Currency – Only INR, USD, Euro and SGD are supported. Select either of these options.
- The Description and Reference ID fields are optional.
- Once you’re done, click Add. The Razorpay Payment Link Request is posted on the lead.
- You’ll see the Razorpay Payment Link activity has been posted on the lead (by the automation you set up). If you don’t see this, please refresh your page. This activity contains the Payment Link, along with the other details mentioned above. You can share this payment link with your leads.
9. View Logs
Here, you can view logs of all the sync jobs that have taken place.
- Navigate to Apps>Razorpay (Payment link), and click More Options, and then click View Logs.
- You can filter the logs by selecting a date range (Today, Last 7 Days, This Month, and Last Month), by selecting the Job Status (“All”, “Success” and “Failure”), and by selecting the Sync Status (All, Error, and Success).
- You can view the sync status of the following events –
- New Events – List of all the new payment activities posted in your account.
- Errors – The list of unsuccessful payment activities that have not been captured due to mapping errors (e.g., when a boolean field is mapped to an integer field, etc.).
- To view the Sync Response details, under Request ID/Sync Job ID, click the Id.
- Under the right panel, you can view the response status, the API URL, the request, and the response.
- The responses that are successful will contain the details of the leads that have been pushed by Razorpay.
- To view the lead capture response under Sync API Response, Leads Updated and Errors in Leads, click .
- For a response that contains an error, the reason for the error is listed in the response. Once you fix it, you can click the Retry button to perform the sync again.
- The current Lead/Activity Sync Behaviour will reflect in the Logs screen. This will help identify the sync that’s used (Capture or Update) for the selected Request/Sync Job Id.
Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!