Cashfree Payments for Magento 2 - User Guide
Extension Installation
Prerequisites
- Magento 2.3.x – 2.4.x installed and functioning.
- Active Cashfree Payments Merchant Account (App ID & Secret Key).
Magento Marketplace Customers Method
- Access your server CLI via SSH and navigate to your Magento root directory.
- Run the Composer command to fetch the extension:
composer require meetanshi/magento2-cashfree-payment-gateway - Enable the extension module:
php bin/magento module:enable Meetanshi_Cashfree - Run the upgrade command:
php bin/magento setup:upgrade - Deploy static content based on your Magento version:
- For Magento 2.0.x – 2.1.x:
php bin/magento setup:static-content:deploy - For Magento 2.2.x & above:
php bin/magento setup:static-content:deploy -f
- For Magento 2.0.x – 2.1.x:
- Flush the Magento cache:
php bin/magento cache:flush
Direct ZIP / Meetanshi Customers Method
- Download the extension ZIP file from your Meetanshi account area.
- Extract the archive contents and upload them to your server under
<Magento_Root>/app/code/Meetanshi/Cashfree/. - Connect to your Magento server via SSH and execute the following commands:
php bin/magento setup:upgrade- For Magento 2.0.x – 2.1.x:
php bin/magento setup:static-content:deploy - For Magento 2.2.x & above:
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush - For Magento 2.0.x – 2.1.x:
Cashfree Payments for Magento 2 enables seamless online payment processing via Credit/Debit Cards, Net Banking, UPI, Wallets, and Pay Later options powered by Cashfree Payment Gateway.

How to Obtain Cashfree API Credentials
To process payments using Cashfree, you must retrieve your App ID and Secret Key from the Cashfree Merchant Dashboard:
- Log in to your Cashfree Merchant Dashboard.
- For testing, select Test Environment (Sandbox), or select Production Environment for live transactions.
- In the left navigation menu, navigate to Developers > API Keys.
- Click Generate API Keys (or view existing credentials).
- Copy your App ID and Secret Key.
- Paste these credentials into the corresponding Live App ID / Test App ID and Live Secret Key / Test Secret Key fields in the extension configuration in Magento Admin.

Payment Gateway Configuration
Navigate to Stores > Configuration > Sales > Payment Methods > Cashfree Payment Gateway - Meetanshi to configure gateway settings.
- Enabled: Select Yes to enable Cashfree Payment Gateway on store checkout.
- Title: Enter the payment method title displayed to customers on the checkout page (Default:
Cashfree Payment Gateway). - Show Cashfree Logo: Select Yes to display Cashfree brand logo next to payment method title.
- Sandbox Mode: Select Yes for testing with Cashfree sandbox credentials, or No for live production payments.
- Live App ID: Enter your live production App ID obtained from Cashfree Merchant Dashboard.
- Test App ID: Enter your test/sandbox App ID.
- Live Secret Key: Enter your live production Secret Key.
- Test Secret Key: Enter your test/sandbox Secret Key.
- Auto Generate Invoice: Select Yes to generate invoices automatically upon successful payment.
- Payment from Applicable Countries: Select All Allowed Countries or Specific Countries.
- Payment from Specific Countries: Select target countries when specific countries restriction is enabled.
- Enable Debug Logging: Select Yes to write detailed API requests and responses to
var/log/cashfree.log. - Additional Information: Enter custom payment instructions shown on checkout.
- Sort Order: Enter a number to set payment method display order on checkout.

Checkout Flow & Customer Experience
- Customers select Cashfree Payment Gateway during checkout and click Place Order.
- The customer is redirected to Cashfree hosted checkout page to complete payment via UPI, Card, Net Banking, or Wallet.
- Upon successful payment verification, the customer is redirected to Magento order success page with auto-generated order invoice.
