How to Use the Razorpay Generic Payments Smart Skill
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Table of Contents
This Smart Skill can be used by you if you are looking for payment use cases outside of utilities, subscriptions, insurance, and lending-related payments.
Name of the Skill on Conversation Studio: Razorpay Generic Smart Skill
Purpose of the Skill: This Smart Skill is designed to generate payment links which can then be used by your users to complete transactions during their conversational journeys with the bot.
What’s the design template going to look like?
This Skill is designed to provide quick resolution & a seamless payment experience to the user. Please reach out to your Haptik SPOC who will connect you with the Conversation Designer to get access to the design - Lucidchart or PDF.
Requirements
- Razorpay Merchant Account. You can read more about it here.
- A bot on Haptik. You can read this article to build your own bot.
- APIs for fetching necessary information from the CRM system.
Limitations
Currently, notifications are configured only on WhatsApp and Facebook, for sending out payment acknowledgment messages to the users on the bot.
You can read more about it here.
How to use the Skill
You can plug this Skill at a point of the bot flow where you would want to collect payments from the user.
For Example: During the cart checkout process.
For testing purposes, you can type the intent “Razorpay generic flow” for generating a payment link for a sample amount that has been preconfigured.
How to make changes to the Skill
Since this Smart Skill is for payment purposes specifically, which is why we focus on generating a payment link.
Step 1: You will have to make a few changes to the ‘Payment API Integration’ Code Step on the Smart Skill and pass the user details inside the payload of the Razorpay API. The user_details can be fetched from inside the conversation_details object. The Razorpay API being used is the ‘create payment link’ of the Standard Payment Link type. You can read more about it here.
Following is the list of functions used:
Function |
Description |
def generate_payment_link(env_variables, conversation_details) |
This function is used to call Razorpay create payment link API, and returns the payment link as a response. |
def get_auth_token(env_variables) |
This function returns an auth_token which is a base64 encoded format of - key_id:key_secret. |
def get_unix_date(due_date) |
This function returns the unix format of the due date that is passed. |
Step 2: For using the API, header parameters of key_id and key_secret are required which are merchant-specific and can be found easily on the Razorpay merchant dashboard, as shown. You can read more about it here.
Step 3: The key_id and key_secret that you have generated need to be configured under the Environment Variables in a Code Step. Click on any Code Step and open the Code Editor. Now, select the More option on the top right corner of the screen and select Variables, as shown below.
In the variables, you need to configure the key_id and key_secret, as shown below.
In this way, you can redirect the user to a page containing the payment mode of their choice.
Apart from the above steps, you can explore a few more capabilities. Check the following Step 4 and Step 5.
Step 4: For sending out the WhatsApp notifications on payment completion to the users, you will have to create a webhook on your Razorpay dashboard. You can read more about it here.
Step 5: A WhatsApp notification trigger solution provider like Interakt can also be used to trigger the WhatsApp notifications to users on receiving the webhook events. You can read more about it here.
How to analyze the Smart Skill post go-live
To track the usage of this Skill on your virtual assistant, you can create Smart Funnels on the Intelligent Analytics tool. You can learn more about Smart Funnels here.
Smart Funnel suggestion:
- Start point: Start lending
-
Endpoints:
- Display single invoice
- Display an invoice
- Display output