Connecting a payment gateway to ERPNext lets customers pay invoices online and posts each successful payment back into your accounts. It runs through the open-source Frappe Payments app, which ships connectors for Razorpay, Stripe, PayPal, Braintree, Paytm and a few others. Set it up once and you stop keying in Payment Entries by hand.
Short answer
Install the Frappe Payments app, open the gateway's settings (for example Razorpay Settings), enter your API key and secret, and save. ERPNext creates a Payment Gateway Account that you pick on a Payment Request. When the customer pays and returns from checkout, ERPNext checks the payment with the gateway, marks the Payment Request paid and creates the Payment Entry against the invoice.
I am Manoj, and I lead ERPNext implementations at MithTech, a team of Frappe specialists in Bengaluru. Wiring a payment gateway into ERPNext is a common job for clients moving off UPI screenshots and bank-statement matching. This is the path I follow: which app to install, how to configure Razorpay, how the Payment Request flow works, and where Stripe and PayU fit. The setup is simple; the payoff people underestimate is not "accept cards", it is "stop keying in Payment Entries".
What is ERPNext payment gateway integration?
It connects an online payment provider (Razorpay, Stripe, Paytm and others) to ERPNext through the Frappe Payments app, so customers pay invoices online and each confirmed payment is recorded against the right invoice.
ERPNext itself is not tied to any provider. Payment support lives in the companion Frappe Payments app, which holds the gateway plumbing, while ERPNext supplies invoicing and accounting. Both are open source (ERPNext under GPL-3.0, Payments under MIT), so there is no software fee per transaction on top of the gateway's own charges. For the ERP side, see ERPNext.
Skimmable summary: the Frappe Payments app connects a payment provider to ERPNext so customers pay online and the payment records itself.
Which payment gateways does ERPNext support?
Those in the Frappe Payments app: Razorpay, Stripe, PayPal, Braintree, Paytm, GoCardless, M-Pesa and Paymob, each with its own settings DocType. PayU has no connector in the app and needs a community app or a custom gateway controller built the same way.
How the common options fit an Indian business. Fees and terms differ by provider, so check each vendor's own page; this table is about fit, not cost.
| Razorpay | Yes | INR only (in the app) | Domestic UPI, cards, netbanking, wallets |
| Paytm | Yes | INR | Domestic wallet and UPI collections |
| Stripe | Yes | Multi-currency | International or multi-currency invoicing |
| PayPal | Yes | Multi-currency | Overseas customers who prefer PayPal |
| Braintree | Yes | Multi-currency | Card collections in supported markets |
| PayU | No (community or custom) | INR and others | Teams standardised on PayU, through a custom build |
The framework is built to be extended. If your provider is not in the app, the same gateway-controller design behind Razorpay and Stripe is what a developer uses to add PayU or any other provider.
Skimmable summary: Razorpay, Stripe, PayPal, Braintree and Paytm (plus GoCardless, M-Pesa, Paymob) ship in the app; PayU needs a community or custom connector.
How do I set up Razorpay in ERPNext?
Install the Frappe Payments app, open Razorpay Settings, enter your API key and secret, and save. ERPNext then creates a Payment Gateway record, a ledger account and a Payment Gateway Account that ties the gateway to that account.
Install the Frappe Payments app
On your bench, run bench get-app payments and then bench --site yoursite install-app payments, using the branch that matches your ERPNext version. On Frappe Cloud, add the Payments app from the marketplace. This adds the gateway settings DocTypes.
Get Razorpay API credentials
In the Razorpay dashboard, generate API keys (Key ID and Key Secret). The secret is shown once, so store it safely. Start with test-mode keys; switch to live keys only after an end-to-end test.
Open Razorpay Settings in ERPNext
Search "Razorpay Settings" in the awesomebar, paste the API Key and API Secret, and save; ERPNext checks the credentials with Razorpay. Payment Requests through Razorpay must be in INR.
Check the records it created
Open the new Payment Gateway Account and confirm its account points at the ledger where cleared payments should land, usually a Razorpay clearing account that you later match against settlements to your bank.
Test end to end
In test mode, raise a Payment Request, pay it with a Razorpay test method, and confirm the Payment Request shows Paid and a Payment Entry exists against the invoice.
Skimmable summary: install the Payments app, enter Razorpay keys in Razorpay Settings, check the Payment Gateway Account's ledger, and test a payment end to end.
How do I collect payment against an invoice with a Payment Request?
A Payment Request created from a Sales Order or Sales Invoice holds the amount, the source document and the gateway, and emails the customer a payment link. The customer pays on the gateway's checkout page.
Open the invoice or order
From a submitted Sales Invoice or Sales Order, create a Payment Request. ERPNext fills in the outstanding amount and links the request to the source document.
Pick the Payment Gateway Account
Select the Payment Gateway Account (for example your Razorpay account). Its ledger account decides where the money posts.
Set the customer email
ERPNext fetches the contact's email if there is one; otherwise enter it. The request goes out with a print format and a link to the gateway.
Send it and let the customer pay
The customer opens the link, lands on the gateway's checkout (UPI, cards, netbanking or wallets for Razorpay) and pays. They do not need an ERPNext login.
The same mechanism works for a Sales Invoice or for an advance against a Sales Order, which is handy for deposits. If you also issue e-invoices, pair this with GST e-invoicing in ERPNext so the invoice the customer pays already carries its IRN.
Skimmable summary: a Payment Request from an invoice or order emails the customer a gateway link; they pay on the gateway's checkout with no ERPNext login.
How does a gateway payment post back into ERPNext?
When the customer completes checkout and returns to your site, ERPNext checks the payment with the gateway's API. If it is authorised or captured, the Payment Request is marked paid, a Payment Entry is created against the referenced invoice, and the invoice's outstanding amount clears. Nobody keys in the transaction.
Compare the two ways of working. Without the integration, a customer pays, someone screenshots the confirmation, an accountant searches the bank statement, matches it to an invoice and creates a Payment Entry by hand. With it, the Payment Entry posts to the Payment Gateway Account's ledger and references the original invoice.
Two limits to plan for. For one-time Razorpay payments, the app confirms on the customer's return from checkout; the only Razorpay webhook it handles is for subscriptions. So a payment where the customer closes the browser before returning can be missed: check the Razorpay dashboard for paid orders whose Payment Request is still open. And the Payment Entry records what the customer paid, not what Razorpay settles to your bank after its fees, so match settlements against the clearing account.
If you close the missed-return gap with a webhook handler of your own, the gateway can send the same event twice. Idempotent webhooks shows a repeat reaching a sample handler and how to book the payment once.
Before go-live, run one small live transaction end to end and confirm the Payment Entry lands in the right account. When reconciliation looks wrong, the first thing to check is the ledger on the Payment Gateway Account.
Skimmable summary: on a confirmed payment ERPNext creates the Payment Entry and clears the invoice; check missed returns and gateway fees against the settlement report.
Can I use Stripe or PayU with ERPNext in India?
Both work, with different effort. Stripe is in the Frappe Payments app and suits multi-currency or international collections; it is configured much like Razorpay, through Stripe Settings. PayU has no connector in the app and needs a community app or a custom integration on the gateway-controller pattern.
For an Indian business the split is usually simple. INR collections go to Razorpay or Paytm, which cover UPI, cards, netbanking and wallets. International or multi-currency invoices go to Stripe or PayPal. If you are committed to PayU, perhaps for its settlement terms, plan for a developer to build the connector. Terms differ across all of these, so check each vendor's page before you decide.
Skimmable summary: Stripe ships in the app and suits international or multi-currency collections; PayU needs a community or custom connector.
How do I automate payment reminders and confirmations?
Add a workflow tool on top. ERPNext can email a Payment Request itself; n8n or a WhatsApp Business integration can send reminders before the due date and a thank-you once a payment clears, triggered by a Payment Request or Payment Entry event.
The pattern I build most often watches the Payment Entry submit event, sends the customer a confirmation on their preferred channel, and updates a collections sheet. A scheduled check on overdue invoices sends reminders with the payment link. See ERPNext n8n integration for the automation layer and ERPNext WhatsApp integration for messaging; WhatsApp template messages are charged per message by Meta.
Skimmable summary: send reminders and confirmations from Payment Request and Payment Entry events with n8n or WhatsApp, with the payment link attached.
Frequently asked questions
+Does ERPNext have a built-in payment gateway?
Not in its core; online payments come from the separate Frappe Payments app. Once installed, it adds Razorpay, Stripe, PayPal, Braintree, Paytm and a few other gateways as settings inside ERPNext. Enter your provider's API credentials in its settings and save to start taking payments.
+Is the Frappe Payments app free?
Yes. It is open source under the MIT licence, and ERPNext is open source under GPL-3.0, so there is no software licence fee for the integration. You still pay the gateway's own transaction charges, which vary by provider and plan; check its pricing page.
+Which ERPNext version supports payment gateways?
The Frappe Payments app has branches for v14, v15 and v16. Install the branch that matches your ERPNext version, and keep the two in step when you upgrade.
+Can I integrate Razorpay for USD or international payments?
Not through this app: its Razorpay connector accepts INR only, so it is for domestic collections. For USD, EUR or other currencies, use Stripe or PayPal, both in the Frappe Payments app. Many businesses run Razorpay and Stripe side by side and pick the gateway per Payment Request.
+How does ERPNext reconcile a gateway payment automatically?
When the customer returns from checkout, ERPNext checks the payment with the gateway; if it is confirmed, the Payment Request is marked paid and creates a Payment Entry against the invoice, which clears the outstanding amount. The money posts to the ledger on the Payment Gateway Account. Match that ledger against the gateway's settlement report for fees and for any payment where the customer did not return to your site.
+Can I use PayU with ERPNext?
Yes, with extra work. PayU is not in the Frappe Payments app, so there is no ready connector. A developer can build one on the same gateway-controller pattern, or you can look for a community app. For INR collections out of the box, Razorpay and Paytm are quicker.
Comments & ratings
No comments yet. Start a new discussion.
Manoj · Published on 20 July 2026
Worked with us? Leave a Google review