Razorpay Payment Gateway Integration with Google Form

Dilip Kashyap
Level Up Coding
Published in
5 min readMar 26, 2022

--

We are going to learn about how to integrate a payment gateway with Google Forms in this article. For example, in today’s world, everything is moving towards the digital system, such as events, workshops, online orders for small stores, and more. There may be small fees for any of these categories or any subscription fees, so in that case, we would take the details in a Google Form and collect the payment in offline mode, but we might still miss some payments when we match client details with collected payments many times.

To avoid such problems, there is a very easy and reliable way to get online payments from clients or customers using the same Google Form.

Let’s see what we need to build such a reliable system

  1. To collect payments, you need a Razorpay payment gateway account.
  2. A Google Form with the required fields.
  3. A Google Form add-on that integrates Razorpay and Google form.

Step 1: Razorpay account creation — To create Razorpay account please click here and fill the required details. You may also use your google mail account to create account.

Razorpay Signup Screen

Step 2: API Key Generating — When you have an account with Razorpay, go to the dashboard and create API keys, for that please go to: Settings =>API Keys

Navigation Screen for API Key generation

In the above screen, you will need to generate API keys for both Test and Live modes and save the Key Id and Key Secret. Below you will find navigation for each mode.

Test and Live mode API Key generation screen

Now that we have completed Part I, we will move on to Part II, which will be the Google Form and add-on installation. Here are the steps.

Step 4: Create Google Form — Create a Google Form with your required fields. Refer to the screenshot for reference.

Google form screenshot

Step 4: Install add-on for Integration — In order to integrate your Razorpay payment account with your Google Form, you will just have to install the Payable Forms add-on on it once you have created the Google Form with the required fields. Please refer to the screenshot below for assistance.

Once you click on add-ons option, the screen of add-ons will appear and just type there Payable Forms and hit enter. The add-ons will come and install it. Please find the screenshot for your reference.

Payable Forms add-ons installation screen

After you install the Payable Forms add-on, it will ask you for some basic permissions; just allow them, and the Payable Forms settings window will appear on your Google form, as shown in the screenshot below.

Payable Forms Setting window screen

Let’s understand each settings in details step by step:

  1. Auto-configure Forms ans Sheet: The Payable add-on generates a Google Spreadsheet based on your Google form input fields, including payment id and status columns. This is nothing more than your response sheet.
  2. Add Sample Payments Section: This option is basically adding a sample section of some input fields to your Google form so that payments can be accepted. You can select the best-suited field for your business requirements from those fields and remove the rest.
  3. Sync Theme with Checkout: There is nothing more to it than styling your checkout form. If you have selected a theme for your Google form, Payable will use a similar theme for the checkout page.
  4. Connect a Payment Provider: This is an important part of your payment integration. You will see a list of various payment gateways, where you will need to select the Razorpay option and fill out some Razorpay related information like — Razorpay merchant ID (merchant ID is located in your Razorpay dashboard under your profile image icon), Email address, API key for Test and Live mode (we saved the API key when we created Razorpay account). Here is a screenshot for your reference.
Razorpay Setup Screen

YAY! We have completed the integration of Razorpay with Google Forms. Now there is a button called Make this form payable. Enable it and your integration is complete. Payments can be tested in the testing mode or processed live under the Payable Forms settings. You can enable testing mode and begin filling out the form and test the process up until checkout and then check the response in your Google response sheet.

I’m available for freelance opportunities and you may reach out via email at dilipkashyap.sd@gmail.com for further collaboration.

If you are interested to learn Google Apps Script and automate your Google Workspace ? must try this e-Book on “Google Apps Script: A Beginners Guide

I hope you found this article helpful in setting up your payment system with Google form. Thanks a lot, and happy learning!

--

--

My goal is to share solutions to the problems I have encountered during software programming.