1. Feature Overview
This connector generates Juspay payment links (that support UPI, DC, CC, Net banking, Wallets, and BNPL payment methods) directly from your LeadSquared account. Your leads can use these links to make payments (e.g., for registrations, purchases, etc.). This connector also enables you to split large payments into multiple, affordable payment amounts, which leads can utilize. This payment is posted as an activity against the lead in LeadSquared.
Note:
- This connector only generates payment links, which can be used by existing leads in your LeadSquared account. This connector DOES NOT capture and create new leads in your LeadSquared account.
- Once a payment link is generated, you can check the payment status using the Juspay Payment Status Connector.
2. Prerequisites
- You must be the Administrator of your LeadSquared account.
- You must have an active Juspay account.
- This is a paid feature. To enable it, reach out to your account manager, or write to support@leadsquared.com.
3. How it Works
- Install and configure the Juspay Payment link connector
As part of the connector configuration, two custom activities are automatically created – Request Juspay Payment Link (sends the payment activity details to your Juspay account) and Juspay Payment Link (generates the payment link). When the connector is enabled, a webhook URL is generated. Copy this URL. - Create an automation
Use the New Activity on Lead Trigger, and select the Request Juspay Payment Link 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 Juspay payment link. - Post the activity
Once the automation is published, post the Request Juspay Payment Link activity on the lead. The Request Juspay Payment Link 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 Request Juspay Payment Link activity is posted, based on the automation you’ve set up, the Juspay 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 Juspay 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 Juspay 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>Juspay Payment link.
6.1 Basic Details
Enter the following details –
Property | Description |
Authorization | Your Juspay-merchant unique key. To obtain this, please contact your Juspay account manager. |
Client ID | Your Juspay account’s Client ID. To obtain this, please contact your Juspay account manager. |
Gateway reference id | Your Juspay gateway reference ID. To obtain this, please contact your Juspay account manager. |
Product Name | The product (e.g., Aligner Kit) for which you’re generating payment links. |
Lead Source | Enter the lead source through which the leads were captured (e.g., Juspay, 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 Juspay 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.
6.2 Mapping
Once you’re done with the basic settings, click Entity Options. By default, all the Juspay fields are mapped to the corresponding LeadSquared lead fields. You’ll have to complete two steps here –
- Enable Activity Creation* – Alongside Juspay Payment Link and Request Juspay payment link, 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 Juspay mapping field name, click , and under Mapping Key, edit the field name.
- To change the LeadSquared lead field to which the Juspay 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.
Note:
- *Ensure you complete the Enable Activity Creation steps first, and only then complete the Edit Mapping steps.
- On the Default Mapping for Activity screen, ensure the default activity is set to Juspay Payment Link.
- You must mandatorily verify the mapping for Lead/Contact Entity, Payment Link Creation and Activity Entity, and click Save & Close for each action type (including alongside Lead/Contact Entity), 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 Juspay 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 the Request Juspay payment link activity.
- 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 “Request Juspay payment link”.
- 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 Request Juspay Payment Link activity on leads, which will in turn automatically post the Juspay Payment Link activity. This activity contains the –
- Order Amount
- Customer Phone
- Transaction Type
- Transaction Amount
- Send Payment Link to Customer
- 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 Request Juspay Payment Link.
- Activity Date – Select a date and time for the activity.
- Amount – Enter the value of the transaction (e.g., 75,000).
- The other fields are optional.
- Once you’re done, click Add. The Juspay Payment Link Request is posted on the lead.
- You’ll see the Juspay 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>Juspay 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 Juspay.
- To view the lead capture response under Sync API Response, Leads Updated and Errors in Leads, click .
Note:
- 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.
Any Questions?
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!