PayU Payments for ERPNext: Setup and User Guide

How to install and configure PayU Payments for ERPNext 16, collect payments through Payment Requests and the Webshop, and issue full or partial refunds without leaving ERPNext.

KalvyAI Engineering · · 7 min read

PayU Payments for ERPNext (technical name ki_erp_payu) connects PayU India to ERPNext 16. Your customers pay Payment Requests, orders, invoices and Webshop orders on the PayU hosted checkout. ERPNext verifies each payment with PayU, posts it automatically and lets you refund it in full or in part.

This guide covers what the app does, who it is for, installation and setup, and how to use each feature. It also lists tips, limitations and common questions.

You can buy and install the app from the store page: PayU Payments for ERPNext.

What the app is for

Without an integration, you collect a PayU payment in one system and record it by hand in another. This app removes that step. You send a Payment Request from a Sales Order or Sales Invoice. The customer pays on the PayU hosted checkout using UPI, credit or debit cards, net banking, wallets, EMI or Pay Later. ERPNext then records the payment against the right document.

The app does not trust the browser. Every result is read again from the PayU verify API. The amount is checked and the SHA-512 response hash is verified before anything is marked paid.

Who it helps

  • Business owners who sell in India and want PayU payments recorded in ERPNext without manual entry.
  • Accounts teams who need Payment Entries and refunds that match what PayU actually processed.
  • ERP admins who want a clear log of every PayU message, with personal and card data removed.
  • Webshop operators who want customers to pay their own orders from the Webshop order page.

Requirements

Before you install, check that you have:

  • ERPNext 16 (Frappe 16)
  • The Frappe Payments app
  • A PayU India merchant account: test keys for Sandbox, live keys for Production
  • An HTTPS address for your site, so PayU can send webhooks
  • The scheduler enabled, for the 15-minute status checks
  • The Webshop app, only if you want the Webshop Pay button

Installation and setup

1. Install the app

After purchase you get access to the private repository. From your bench directory:

  1. Fetch the app on the version-16 branch:
bench get-app <repository> --branch version-16
  1. Install it on your site:
bench --site <site> install-app ki_erp_payu
  1. Make sure the scheduler is on, so unfinished payments and queued refunds are checked every 15 minutes:
bench enable-scheduler

[CHECK: any further steps after install, such as migrate or restart, for production benches]

2. Enter your PayU keys

  1. Open PayU Settings [CHECK: menu path or search term for PayU Settings].
  2. Choose Sandbox for testing or Production for live payments.
  3. Enter your Merchant Key and Salt from the PayU dashboard.
  4. Set a fallback mobile number. PayU needs a mobile number and an email for every payment, and this is used when the customer has no mobile on record [CHECK: exact field label for the fallback mobile].
  5. Save.
  6. Click Test Connection to confirm the keys work.

Use Sandbox with test keys first. Switch to Production with live keys when you are ready.

3. Add the webhooks in PayU

Webhooks let PayU tell ERPNext about a payment or refund as soon as it happens.

  1. Find the Payment Webhook URL and the Refund Webhook URL for your site [CHECK: where these URLs are shown, e.g. in PayU Settings].
  2. Log in to the PayU dashboard and go to Developers > Webhooks.
  3. Add the Payment Webhook URL for successful and failed payments.
  4. Add the Refund Webhook URL for refunds.
  5. Save in the PayU dashboard.

Your site must be reachable over HTTPS for this to work.

4. Send a test Payment Request

  1. Open a Sales Order or Sales Invoice.
  2. Create a Payment Request from it [CHECK: button path on Sales Order and Sales Invoice].
  3. Select the PayU - INR gateway account.
  4. Send the request to the customer (in Sandbox, send it to yourself).
  5. Open the link and pay with a PayU test method.
  6. Return to ERPNext. The Payment Request should show Paid and a Payment Entry should exist against the order or invoice.

Using the main features

Collecting a payment

The customer receives a link from the Payment Request and pays on the PayU India hosted checkout. They can use any method PayU offers on your account: UPI, cards, net banking, wallets, EMI or Pay Later.

When the payment succeeds, the app:

  1. Reads the status from the PayU verify API.
  2. Checks the amount and verifies the SHA-512 response hash.
  3. Marks the Payment Request as Paid.
  4. Creates the Payment Entry against the Sales Order or Sales Invoice.

The status is never taken from the browser or from the webhook body. The webhook only prompts the app to ask PayU directly.

Checking a payment status

Most payments update on their own. There are three ways a result reaches ERPNext:

  • Webhooks: PayU notifies your site right after the payment.
  • 15-minute check: the scheduler looks at unfinished payments and queued refunds every 15 minutes.
  • Check Status with PayU button: use this when you want an answer now.

To check a payment manually:

  1. Open the Payment Request or PayU Transaction [CHECK: which documents show the Check Status with PayU button].
  2. Click Check Status with PayU.
  3. The app reads the latest status from PayU and updates the record.

Refunding a payment from ERPNext

You can refund in full or in part.

  1. Open the Payment Request or the PayU Transaction for the payment.
  2. Start a refund [CHECK: button label for starting a refund].
  3. Enter the amount. Use the full amount for a full refund or a smaller amount for a partial refund.
  4. Optionally link a credit note. If you give one, the refund Payment Entry is allocated to it.
  5. Submit the refund.

The refund Payment Entry back to the customer is created only after PayU confirms the refund. If the refund is queued at PayU, the 15-minute check or the refund webhook picks up the result.

Refunds made in the PayU dashboard

If someone issues a refund directly in the PayU dashboard, you do not need to record it by hand. The app imports it as a PayU Refund and accounts for it the same way as a refund started from ERPNext.

Paid twice protection

Sometimes a customer pays the same link twice, for example when a UPI confirmation arrives late and they try again. The app creates only one Payment Entry. The second payment is flagged for refund so you can return it.

To handle a flagged payment:

  1. Find the flagged payment [CHECK: where flagged duplicate payments are listed or how they are marked].
  2. Refund it using the steps in the refund section above.

Webshop Pay button

If you use the Webshop app, customers can pay their own orders from the Webshop order page using a Pay button that opens the PayU checkout.

The setting Use PayU for the Webshop Pay Button controls this. Turn it off if you want another gateway app to handle the Webshop Pay button instead.

PayU Notification log

Every message from PayU is stored in the PayU Notification log. Personal and card data is removed before saving. Use it to see what PayU sent and when, for example when a customer says they paid but the order still looks unpaid.

Tips

  • Start in Sandbox. Run a full cycle with test keys: payment, partial refund, full refund and a dashboard refund.
  • Set the fallback mobile early. PayU requires a mobile number for every payment, and many customer records only have an email.
  • Keep the scheduler on. Webhooks can fail if your site is briefly down. The 15-minute check is your safety net.
  • Use Check Status with PayU before chasing a customer. It reads the live status from PayU.
  • Link a credit note on refunds where you have one, so the refund is allocated cleanly in your books.
  • Look at the PayU Notification log first when something does not match. It shows exactly what PayU sent.

Limitations

  • ERPNext 16 only. Versions 15 and older are not supported.
  • One PayU account per site, INR only. The app works with PayU India.
  • Mobile and email are required. PayU needs both for every payment. Set a fallback mobile in PayU Settings.
  • No pre-authorisation. Authorised-only payments must be captured or released in the PayU dashboard.
  • One gateway per Payment Request. Customers do not choose between gateways on a single request.

FAQ

Is there a recurring fee?

No. It is a one-time purchase with a perpetual licence. PayU charges its own transaction fees.

Can I refund from ERPNext?

Yes, in full or in part, from the Payment Request or the PayU Transaction. The refund Payment Entry is created once PayU confirms the refund.

What if the customer closes the browser after paying?

The webhook records the payment. Without webhooks, the 15-minute check or the Check Status with PayU button picks it up.

Can I test without real money?

Yes. Use the Sandbox environment with test keys from the PayU dashboard.

Does it work with another gateway app, such as Cashfree?

Yes. Both can be installed. Turn off Use PayU for the Webshop Pay Button to hand the Pay button to the other app.

Which payment methods are supported?

UPI, credit and debit cards, net banking, wallets, EMI and Pay Later on the PayU India hosted checkout.

Do I need the Webshop app?

Only if you want the Webshop Pay button. Payment Requests from Sales Orders and Sales Invoices work without it.

How KalvyAI can help

We build and connect ERPNext, Odoo and Shopify systems. We can install and configure PayU Payments for ERPNext, set up webhooks on your production site, and test the full payment and refund cycle with your team. We can also add AI agents that work inside ERPNext with human approvals, budgets and an audit trail, for example to review flagged duplicate payments before refunds go out.

Buy the app on the store page, or contact us for help with setup.

  • User guide
  • ERPNext
  • PayU
  • ERPNext 16
  • Payments
  • Refunds
  • Webshop
  • Frappe

KalvyAI Engineering · Engineering team

The engineers who build, connect and fix business systems at KalvyAI: Odoo, ERPNext, Shopify and AI agents that work inside them with approvals, budgets and an audit trail.

Comments

No comments yet. Questions and corrections are welcome.

Rate this post or leave a comment

Your rating (optional)
Not rated

Comments appear after an editor approves them. See our privacy notice.