Skip to content

How to Connect Razorpay to Odoo: Payment Gateway Integration for India

DeployMonkey Team · March 23, 2026 10 min read

Why Razorpay for Odoo in India?

If you run a business in India, Razorpay is the payment gateway. It supports UPI (which handles over 70% of digital payments in India), credit/debit cards, net banking, and digital wallets — all through a single integration. Odoo's native payment providers (Stripe, PayPal) have limited support for Indian payment methods. Razorpay fills this gap by providing the payment methods Indian customers actually use.

What Razorpay Integration Enables

  • Online payments on Odoo website/eCommerce: Customers pay via UPI, cards, or net banking at checkout
  • Invoice payments: Send invoices with a "Pay Now" button that opens Razorpay
  • Subscription billing: Recurring payments for subscription-based businesses
  • Automatic reconciliation: Payments map to invoices in Odoo Accounting
  • Refunds: Process refunds from Odoo that execute through Razorpay

Prerequisites

  • Odoo 17 or 18 with Payment Provider module (and optionally eCommerce)
  • Razorpay account with KYC verification completed
  • Razorpay API Key ID and Key Secret
  • Indian business entity (PAN, GST registration)

Step 1: Get Razorpay API Credentials

  1. Log into dashboard.razorpay.com
  2. Go to Settings → API Keys
  3. Generate a new key pair
  4. Copy the Key ID (starts with rzp_live_ for production)
  5. Copy the Key Secret — shown only once
  6. For testing, generate test keys (starts with rzp_test_)

Step 2: Install the Razorpay Module

Odoo 17+ includes a native Razorpay payment provider:

  1. Go to Apps in Odoo
  2. Search for Razorpay (technical name: payment_razorpay)
  3. Install the module

If your Odoo version does not include the native module, install a third-party Razorpay connector from the Odoo Apps Store.

Step 3: Configure the Payment Provider

  1. Go to Invoicing/Accounting → Configuration → Payment Providers
  2. Click on Razorpay
  3. Enter your Key ID and Key Secret
  4. Set the state to Test Mode initially
  5. Configure supported payment methods:
Payment MethodAvailabilityNotes
UPIAll Indian bank accountsMost popular — 70%+ of payments
Credit/Debit CardsVisa, Mastercard, RuPaySupports 3DS authentication
Net BankingAll major Indian banksRedirects to bank portal
WalletsPhonePe, Paytm, Amazon PayPopular for smaller amounts
EMISelect banksInstallment payments on cards

Step 4: Test the Integration

  1. With test mode enabled, create a test sale order or invoice
  2. Send the payment link or go through the eCommerce checkout
  3. Use Razorpay's test card numbers: 4111 1111 1111 1111
  4. For UPI testing, use the test VPA: success@razorpay
  5. Verify the payment appears in both Razorpay dashboard and Odoo

Step 5: Go Live

  1. Switch the payment provider state to Enabled (production)
  2. Replace test keys with live keys
  3. Process a small real transaction to verify
  4. Check that the payment reconciles correctly in Odoo Accounting

Step 6: Configure Webhooks

Webhooks ensure Odoo knows about payment status changes even if the customer closes the browser:

  1. In Razorpay Dashboard, go to Settings → Webhooks
  2. Add webhook URL: https://your-odoo.com/payment/razorpay/webhook
  3. Select events: payment.captured, payment.failed, refund.processed
  4. Set the webhook secret and enter it in Odoo's Razorpay configuration

GST and Tax Handling

Razorpay charges GST on its transaction fees. In Odoo:

  • Record Razorpay fees as expenses in a dedicated journal
  • Claim GST input credit on Razorpay fees (the GST invoice is available in Razorpay Dashboard)
  • Reconcile Razorpay settlements (which are net of fees) against your bank statements

Troubleshooting

Payment Stuck in Pending

This usually means the webhook did not reach Odoo. Check Razorpay Dashboard → Webhooks → Recent Events for delivery failures. Verify your Odoo URL is publicly accessible and the webhook secret matches. Common cause: Odoo behind Cloudflare with security rules blocking Razorpay's IPs.

UPI Payment Timeout

UPI payments have a 5-minute window. If the customer does not approve in their UPI app within 5 minutes, the payment expires. The customer needs to retry. This is a UPI protocol limitation, not an Odoo issue.

Refund Not Processing

Razorpay requires sufficient balance in your account for refunds. If your settlement balance is zero, the refund queues until the next settlement. Refunds can take 5-7 business days to reach the customer's bank account.

Currency Mismatch

Razorpay primarily supports INR. If your Odoo is configured with a different currency, ensure the payment provider is set to INR and Odoo handles the conversion. International payments require Razorpay's international payment feature to be enabled on your account.

DeployMonkey Razorpay Setup

DeployMonkey instances support Razorpay integration out of the box. Our AI agent can walk you through the configuration, test payment flows, and troubleshoot webhook issues — making payment gateway setup straightforward for Indian businesses.