Integration Steps
Steps to integrate your WordPress website using the Gravity Forms plugin.
Follow the steps given below to integrate Razorpay Payment Gateway with your Gravity Forms website.
Follow the steps given below:
Follow the steps given below:
- Download and install the Razorpay Gravity Forms Plugin. You can do this using either of these methods:
- and add the zip file to your WordPress website's Plugins folder.
- Add the plugin directly on your WordPress website from the Plugin page.
- On your WordPress site, activate the plugin in the WordPress Plugin Manager.
- Click Settings.
- Configure the following information and click Update Settings:
- Add in your [KEY_ID] and [KEY_SECRET] generated from the .
- Payment Action: Set this to Authorize and Capture.
- Select the currency in which the payment must be accepted.
- Navigate to Forms → Settings.
- Under General Settings, go to the Currency field and choose the relevant currency. For this example, we will select Indian Rupee.
To create a Gravity Form:
- Navigate to Forms → New Form and click Add New.
- Enter the form title and description in the Create a New Form dialog box.
- Click Create Form.
- Before entering the product details, you must select whether you are selling a subscription or a product/service. Navigate to Settings → Razorpay and configure the Razorpay Feed.
- In the Razorpay Feed settings, click Add New.
- Add a name for the feed. For example,
Ooty Green Tea
. - Select
Products and Services
as the Transaction Type. - Click Update Settings.
- Click Edit to start adding product details:
- Click Pricing Fields and select Product.
- Click the form to enter the product details and click Update.
- Field Label: Enter the product name. For example,
Ooty Green Tea
. - Description: Enter a description for the product.
- Field Type: Select the field type as required.
- Price: Enter the product price in INR. For example,
399.99
. - Disable Quantity Field: Do not select this option if your customer wants to choose a quantity.
- Rules: Enable the Required check box to make the quantity field mandatory.
- Field Label: Enter the product name. For example,
- Click Pricing Fields and select Product.
The form is now ready to be added to your web pages.
Handy Tips
Webhook is auto-configured when you enter and save the API key ID and secret on the plugin settings page. You need to
on your Razorpay Dashboard. However, for versions lower than 1.3.2, you need to .After the integration, Razorpay will appear as a payment option on your web page/app. You need to click the button and make a test transaction to ensure the integration works as expected. You can start accepting actual payments from your customers once the test is successful.
You can make test payments using one of the payment methods configured at the Checkout.
- No money is deducted from the customer's account as this is a simulated transaction.
- Ensure you have entered the API keys generated in the test mode in the Checkout code.
You can select any of the listed banks. After choosing a bank, Razorpay will redirect to a mock page where you can make the payment a success
or a failure
. Since it is the test mode, we will not redirect you to the bank login portals.
You can enter one of the following UPI IDs:
success@razorpay
: To make the payment successful.failure@razorpay
: To fail the payment.
Handy Tips
You can use Test Mode to test UPI payments, and Live Mode for UPI Intent and QR payments.
You can select any of the listed wallets. After choosing a wallet, Razorpay will redirect to a mock page where you can make the payment a success
or a failure
. Since it is the test mode, we will not redirect you to the wallet login portals.
You can use one of the test cards to make transactions in the test mode. Use any valid expiration date in the future and any random CVV to create a successful payment.
You can track the payment status from the Razorpay Dashboard or by polling APIs.
- Log in to the and navigate to Transactions → Payments.
- Check if a
payment_ID
has been generated and note the status. In case of a successful payment, the status is marked ascaptured
.
Follow these steps before taking the integration live:
You can perform an end-to-end simulation of funds flow in the Test Mode. Once confident that the integration is working as expected, switch to the Live Mode and start accepting payments from customers.
Watch Out!
Ensure you are switching your test API keys with API keys generated in Live Mode.
To generate API Keys in Live Mode on your Razorpay Dashboard:
- Log in to the and switch to Live Mode on the menu.
- Navigate to Account & Settings → API Keys → Generate Key to generate the API Key for Live Mode.
- Download the keys and save them securely.
- Replace the Test API Key with the Live Key in the Checkout code and start accepting actual payments.
After payment is authorized
, you need to capture it to settle the amount to your bank account as per the settlement schedule. Payments that are not captured are auto-refunded after a fixed time.
Watch Out
- You should deliver the products or services to your customers only after the payment is captured. Razorpay automatically refunds all the uncaptured payments.
- You can track the payment status using our or webhooks.
Authorized payments can be automatically captured. You can auto-capture all payments
on the Razorpay Dashboard. Know more about .Watch Out!
Payment capture settings work only if you have integrated with Orders API on your server side. Know more about the
.Is this integration guide useful?