Back to Top

User Guide for Magento 2 Razorpay Magic Checkout

Updated 19 June 2026

Magento 2 Razorpay Magic Checkout module helps merchants accept secure online payments through Razorpay. It also provides a faster and more optimized checkout experience..

This module supports multiple payment methods. It also provides QuickBuy, autofill, coupon integration, webhook synchronization, and online refund management.

Built on Razorpay Magic Checkout, this module delivers a secure checkout experience. In addition, it helps reduce cart abandonment and improve conversions.

Features- Razorpay Magic Payment

  • Supports Razorpay Standard Checkout and Magic Checkout.
  • Autofills customer details, including email, phone number, and saved addresses.
  • Supports UPI, Cards, Wallets, Net Banking, EMI, and Pay Later.
  • Smart COD optimization and risk-based COD filtering.
  • Automatic order synchronization between Magento and Razorpay.
  • Automatic order synchronization between Magento and Razorpay.
  • Secure webhook integration for real-time payment updates
  • Guest checkout and logged-in customer checkout support.
  • QuickBuy functionality for faster order placement.
  • Comprehensive logging and debug mode for easier troubleshooting.
  • Multi-store and multi-currency compatibility.
  • Auto invoice generation and payment status management.

Installation Download Module

Firstly, you need to log in to the Webkul Store, go to My Account>My Purchased Products section, verify, and then download and extract the contents of this zip folder on the system.

Upload Folder

Once the module zip is extracted, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:

Razorpay Magic Checkout download file

Run Commands

You need to run the following commands:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush

After running the commands, you have to flush the cache from the Adobe Commerce Cloud admin panel by navigating through->System->Cache management as shown below.

Razorpay Magic Checkout Cache-Management

Language Translation

To translate the module language, go to src/app/code/Webkul/RazorpayMagicCheckout/ and modify the en_US.csv file.

After editing, rename the file to en_SA.csv and translate all content on the right side of the comma into Arabic, then save the changes.

Razorpay Magic Checkout Translate file

Then upload it to the path src/app/code/Webkul/RazorpayMagicCheckout/ where Magento 2 is install on the server.

The module gets translated into the Arabic Language. It supports both RTL and LTR languages.

The user can edit the CSV like the image below, the configuration of Razorpay

Razorpay Magic Checkout  env file

Generate API Key and Secret Key

To get the API Key and Secret Key click here.

Razorpay Magic Checkout generate key

Register for Webhook details

Webhooks automate communication between apps. Events trigger them and send data about the event to the specified URL.

Navigate to the “My Account & Settings” section in your Razorpay dashboard.

In the “Developer Controls” section, you’ll find options related to webhooks. Click on “Edit Webhooks.”

To add a webhook, you need to find the webhook URL, create a secret key, choose the event, and click a button.

Add “payout.processed” and “payout.reversed” as active events.

Razorpay Magic Checkout webhooks

Admin Configuration: Razorpay Magic Checkout

Go to the Magento 2 admin panel and navigate
to Stores > Configuration > Sales > Payment Methods.

Razorpay Magic Checkout admin configuration
  • Enable: Admin can enable or disable the Razorpay Magic Checkout payment method.
  • Title: Admin can add Title for the Razorpay Magic Checkout payment method.
  • Sort Order: Admin can set the sort order for displaying the payment method.
  • Enable Sandbox Mode: The admin can enable or disable Sandbox Mode for testing transactions.
  • Sandbox API Key: The admin can enter the Sandbox API Key provided by Razorpay.
  • Sandbox Secret Key: The admin can enter the Sandbox Secret Key provided by Razorpay.
  • Checkout Mode: The admin can select the preferred checkout mode for processing payments. The available options are as follows:
  • Standard Checkout: Customers manually enter their details during checkout and complete the payment through Razorpay’s standard payment flow. This mode is suitable for general websites and provides basic checkout functionality.
  • Magic Checkout: Customers benefit from a faster checkout experience with auto-filled details, saved addresses, built-in coupon support, intelligent COD controls, and one-click payments. This mode is optimized to improve conversions for eCommerce stores.
  • Auto Select Checkout Mode: The system automatically determines the most suitable checkout experience. When this option is selected, the Razorpay payment logo added by the admin will be displayed on the checkout page, and customers will be redirected to the appropriate Razorpay checkout flow based on the configuration and eligibility.
  • Payment Action: The admin can choose the payment action as Authorize Only or Authorize and Capture.
  • Button Text: The admin can customize the text displayed on the Razorpay payment button.
  • Checkout Theme Color: The admin can set the theme color for the Razorpay checkout popup.
Razorpay Magic Checkout configuration 2

Manage Razorpay Checkout and Order Settings

  • Logo Image: The admin can upload a logo image to be displayed on the Razorpay checkout page.
  • Enable Razorpay Branding: The admin can enable or disable Razorpay branding on the checkout page.
  • Enable Cards: The admin can enable or disable cards payments through Razorpay.
  • Enable UPI: The admin can enable or disable UPI payments through Razorpay.
  • Enable Wallets: The admin can enable or disable wallet payments through Razorpay.
  • Enable Netbanking: The admin can enable or disable net banking payments through Razorpay.
  • Enable EMI: The admin can enable or disable EMI payment options through Razorpay.
  • Enable PayLater: The admin can enable or disable Pay Later payment options through Razorpay.
  • Enable COD through Magic Checkout: The admin can enable or disable Cash on Delivery (COD) through Razorpay Magic Checkout.
  • New Order Status: The admin can set the default order status assigned to newly placed orders.
  • Authorized Order Status: The admin can set the order status for payments that have been authorized but not yet captured.
Razorpay Magic Checkout configuration mid level

Order Status and Webhook Settings

  • Captured Order Status: The admin can set the order status for successfully captured payments.
  • Failed Order Status: The admin can set the order status for failed payment transactions.
  • Refunded Order Status: The admin can set the order status for refunded orders.
  • Cancelled Order Status: The admin can set the order status for cancelled orders.
  • Enable Webhooks: The admin can enable or disable Razorpay webhooks for real-time payment event notifications.
  • Webhook Secret: The admin can enter the webhook secret key used to verify webhook requests from Razorpay.
  • Validate Webhook Signature: The admin can enable or disable webhook signature validation for enhanced security.
  • Timeout Configuration: The admin can specify the timeout duration for Razorpay payment requests.
  • Retry Configuration: The admin can configure the number of retry attempts for failed payment requests.
  • Allowed Countries: The admin can select the countries where the Razorpay payment method will be available.
 Razorpay Magic Checkout COD rules

Payment Limits and Smart COD Settings

  • Minimum Order Amount: The admin can specify the minimum order amount required to use the Razorpay payment method.
  • Maximum Order Amount: The admin can specify the maximum order amount allowed for the Razorpay payment method.
  • Enable Smart COD: The admin can enable or disable Smart Cash on Delivery (COD) through Razorpay Magic Checkout.
  • Enable Risky COD Filtering: The admin can enable or disable filtering of high-risk COD orders to reduce return-to-origin (RTO) rates.
  • COD Verification Settings: The admin can configure the verification rules for Cash on Delivery orders.
  • COD Availability Rules: The admin can define comma-separated postal codes where Cash on Delivery will be available when verification mode is enabled.
  • Enable Razorpay Offers: The admin can enable or disable Razorpay offers during checkout.
  • Enable Coupon Autofill: The admin can enable or disable automatic application of eligible coupons during checkout.
  • Allow Offer Stacking: The admin can enable or disable the use of multiple offers and discounts on a single order.
  • Sync Magento Coupons: The admin can enable or disable synchronization of Magento coupons with Razorpay offers.
Razorpay Magic Checkout Last configuration
  • Debug Mode: The admin can enable or disable debug mode to troubleshoot and monitor Razorpay payment requests and responses.
  • Enable Logging: The admin can enable or disable logging to maintain records of Razorpay transactions and events.
  • Enable Magic Checkout Analytics: The admin can enable or disable Magic Checkout analytics to track customer behavior and checkout performance.

Customer Workflow – Razorpay Magic Checkout

Customer Places an Order:

A customer adds products to the cart and proceeds to checkout, where they can complete the payment using Razorpay Standard Checkout or Magic Checkout based on the configured settings.

 Razorpay Magic Checkout Add to Cart

Click on Proceed to Checkout to continue, Adds shipping method and details during checkout.

Razorpay Magic Checkout shipping page

Payment Processing Of Razorpay Magic Checkout

At the payment step, choose “Razorpay Magic Checkout” as the payment method.

Razorpay Magic Checkout Payment Method

Upon clicking the “Place Order” button, a Razorpay popup is displayed. Then, customers can choose from various payment options.

These options include Credit/Debit Cards, Net Banking, Pay Later, Wallets, and UPI/QR. The customer can provide the necessary details and click the “Proceed” button to complete the transaction.

Razorpay Magic Checkout successful

After successful payment, a payment confirmation is made, and the invoice auto-generates.

checkout Razorpay Magic Checkout

Customers can check order details under the My Order section.

order detail page Razorpay Magic Checkout

Payment Actions: Status

Razorpay supports two types of payment actions:

  • Authorized: This action first authorizes the fund availability and later captures the funds manually. Merchants can use this option to verify the fund availability before they capture the payment.
  • Authorized and Capture: This action first authorizes and verifies the fund availability. Then, the system captures the funds automatically. This is useful for merchants who want to capture the payment immediately after the customer completes the checkout process.

Online Refund – Admin End

Admin can process refunds directly from the Magento Admin Panel. Refund support includes full refunds and partial refunds with refund status synchronization.

Steps:

  1. Navigate to Sales > Orders and open the desired order.
  2. Open the related invoice and click the Credit Memo button.
  3. On the Credit Memo page, specify the Items to Refund and adjust quantities if a partial refund is required.
  4. Click Refund Online to initiate the refund through Razorpay.
  5. The refunded amount is automatically returned to the customer’s original payment source, and the refund status is synchronized with Magento.

Items to Refund

The admin can update the quantity in the Qty to Refund field and then proceed with Refund Online to refund all items or selected items. Partial and full refunds are supported.

Support

That’s all about the Magento 2 Razorpay Magic Checkout module. In that case, if you have any issues or concerns, please email us at [email protected].

Our team will be happy to assist you. In addition, we will provide the required support.

You may also browse Magento 2 extensions.

Current Product Version - 1.0.0

Supported Framework Version - 2.4.x

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home

User Guide for Magento 2 Razorpay Magic Checkout