---
title: "PayU"
description: "Connect your PayU India account to Two Minute Billing: find your key and salt, check what PayU must enable, and add the three payment webhooks. Card and UPI Autopay mandates in INR."
canonical_url: "https://twominutebilling.com/help/guides/connect-a-payment-gateway/payu"
---
# PayU

> Connect your PayU India account to Two Minute Billing: find your key and salt, check what PayU must enable, and add the three payment webhooks. Card and UPI Autopay mandates in INR.

Two Minute Billing charges subscriptions in **INR** through **your** PayU account. You keep your
PayU rates, and PayU pays out to your bank as usual.

- The customer saves a card or approves **UPI Autopay** on the PayU checkout page. This makes a
**mandate** (for a card, a standing instruction). On a hosted checkout, that same step takes
the **first payment**, so the customer pays once at signup.
- Before each renewal, Two Minute Billing sends an **advance notice** through PayU, and charges
the mandate at least **24 hours** later (25 hours for UPI Autopay). See
[UPI Autopay](#upi-autopay) for the UPI rules.
- A subscription that you create through the API or the dashboard, for a customer who already
has a PayU mandate, does not charge at once. Its first invoice waits for the advance notice, like
a renewal.
- A one-time payment uses every method that is enabled on your PayU account.
- Refunds go back to the customer through PayU.

## Before you start

- A PayU India account. PayU gives you a **test** account and, after it checks your website, a
**live** account. Connect the test key to a test business and the live key to a live business.
- PayU takes **INR** only.
- **Cards and UPI Autopay for subscriptions.** Net banking (eNACH) mandates are coming soon.
- PayU must turn on **recurring payments** for cards and for UPI (UPI SI) on your account. Ask your
PayU account manager or PayU support before you go live. See [Permissions](#permissions).
- You need permission to manage payment gateways in Two Minute Billing. The owner and admin
roles have it.

## Find your API keys

In PayU, open **Developer → API Keys**. Make sure the mode toggle at the top shows the mode of
the business that you connect (**Test Mode** or live).

<screenshot :height="720" :single="true" :width="1640" alt="The PayU dashboard's API Keys page in test mode, with the key and the salts masked" caption="PayU → Developer → API Keys. Click View Details to see the key and the salt." src="gateways/payu-api-keys">



</screenshot>

You need two values:

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Where to find it
    </th>
    
    <th>
      Looks like
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Merchant Key
      </strong>
    </td>
    
    <td>
      PayU Dashboard → Developer → API Keys. The business test or live mode selects the PayU environment.
    </td>
    
    <td>
      —
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Merchant Salt (v1)
      </strong>
    </td>
    
    <td>
      On the same page. We use it to sign requests and to check the webhooks from PayU.
    </td>
    
    <td>
      —
    </td>
  </tr>
</tbody>
</table>

<warning>

**Keep the salt secret.** Anyone with your key and salt can sign requests to PayU in your name. Paste them only into Two
Minute Billing, which stores them encrypted, and never into an email or a chat.

</warning>

## Permissions

<warning>

**PayU keys have no permission settings.** A PayU key and salt can use every product that PayU has turned on for your account, so there is
nothing to select on the key. Check the items below instead: a missing one does not show when you
connect, only later when a card setup, a renewal or a webhook fails.

</warning>

<table>
<thead>
  <tr>
    <th>
      What PayU must enable or you must set
    </th>
    
    <th>
      Who turns it on
    </th>
    
    <th>
      Two Minute Billing uses it to
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Recurring payments on cards (standing instructions)
    </td>
    
    <td>
      PayU's integration team, on request
    </td>
    
    <td>
      Save a card mandate and charge each renewal against it. Without it, a card setup is paid but no mandate is made
    </td>
  </tr>
  
  <tr>
    <td>
      Recurring payments on UPI (UPI SI, UPI Autopay)
    </td>
    
    <td>
      PayU's integration team, on request
    </td>
    
    <td>
      Make a UPI Autopay mandate and charge each renewal against it. Without it, PayU refuses the UPI setup
    </td>
  </tr>
  
  <tr>
    <td>
      UPI Autopay mandate updates
    </td>
    
    <td>
      PayU's integration team
    </td>
    
    <td>
      Know at once when the customer pauses, resumes or revokes the mandate in their UPI app. Without it, we find out at the next advance notice
    </td>
  </tr>
  
  <tr>
    <td>
      Merchant Salt (32-bit, v1)
    </td>
    
    <td>
      You copy it from <strong>
        API Keys
      </strong>
    </td>
    
    <td>
      Sign every request to PayU and check the payment webhooks
    </td>
  </tr>
  
  <tr>
    <td>
      Payments webhook: <strong>
        Successful
      </strong>
    </td>
    
    <td>
      You, under <strong>
        Developer → Webhooks
      </strong>
    </td>
    
    <td>
      Book a card setup or a payment that succeeded
    </td>
  </tr>
  
  <tr>
    <td>
      Payments webhook: <strong>
        Failed
      </strong>
    </td>
    
    <td>
      You, under <strong>
        Developer → Webhooks
      </strong>
    </td>
    
    <td>
      Book a payment that failed, or that PayU took back
    </td>
  </tr>
  
  <tr>
    <td>
      Payments webhook: <strong>
        Refund
      </strong>
    </td>
    
    <td>
      You, under <strong>
        Developer → Webhooks
      </strong>
    </td>
    
    <td>
      Book refunds, including refunds made in the PayU dashboard
    </td>
  </tr>
  
  <tr>
    <td>
      Card mandate updates from the bank
    </td>
    
    <td>
      PayU support
    </td>
    
    <td>
      Know when a bank cancels or changes a card mandate
    </td>
  </tr>
  
  <tr>
    <td>
      Refund status callback
    </td>
    
    <td>
      Your PayU account manager
    </td>
    
    <td>
      Optional. The Refund webhook above is enough
    </td>
  </tr>
  
  <tr>
    <td>
      Signed dispute webhooks
    </td>
    
    <td>
      Your PayU account manager
    </td>
    
    <td>
      Not used. You record chargebacks by hand (see <a href="#troubleshoot">
        Troubleshoot
      </a>
      
      )
    </td>
  </tr>
</tbody>
</table>

**Check credentials** confirms that PayU accepts your key and salt. It cannot see whether PayU
has turned on recurring payments. Test a card setup and a UPI setup in your test business to be
sure.

## Connect it in Two Minute Billing

1. Open **Settings → Payment gateways** and click **Add gateway**.
2. Select **PayU** and paste the **Merchant Key** and the **Merchant Salt (v1)**.
3. Select the **payment methods** this account handles.
4. Click **Create gateway account**.

Then open the account and click **Check credentials**. **Healthy** means PayU accepted the key and
the salt.

The payment methods you can turn on for PayU:

- **Cards** — INR only. We send the advance notice through PayU at least 24 hours before each renewal debit.
- **UPI Autopay** — INR only. At most ₹15,000 for each payment. We send the advance notice through PayU at least 25 hours before each renewal debit. The debit can take some minutes to complete.
- **Net banking (eNACH)** (coming soon) — INR only. PayU must enable it on your account. Banks do not accept refunds of these debits.

## UPI Autopay

- **₹15,000 at most for each payment.** PayU does not let a UPI Autopay mandate take more. The
checkout does not offer UPI Autopay for a plan above that, and the mandate limit that the
customer approves is never higher.
- **An advance notice before each debit.** Two Minute Billing sends it through PayU at least
25 hours before the debit, for the exact amount. If the amount changes after the notice, we
withdraw that notice at PayU and send a new one, so the debit moves 25 hours later.
- **Retries.** PayU lets one notice cover the first debit and three retries. A retry on the
debit day uses the same notice. A retry on a later day gets a new notice and waits 25 hours.
- **One open notice for each mandate.** PayU takes a new notice only when the last one is
debited or withdrawn. When two subscriptions use the same UPI mandate, the second debit waits
for the first.
- **A debit can take some minutes to complete.** The payment stays pending until PayU's
Successful or Failed webhook arrives.
- **Banks do not debit UPI Autopay from 10:00 to 13:00 and from 17:00 to 21:30 IST.** We
schedule the debits outside these hours.
- **The customer can pause or revoke the mandate in their UPI app.** We stop the debits when
PayU tells us (see [Permissions](#permissions)), or at the next advance notice.

## Currencies

Two Minute Billing offers INR only on PayU.

PayU takes other currencies when it enables cross-border payments on an account. Two Minute Billing does not offer them on PayU yet.

## Webhooks

PayU tells Two Minute Billing about things that happen outside the checkout page: a payment that
completes after the customer leaves, a refund made in the PayU dashboard, a payment that PayU
takes back. Copy the notification URL from the gateway account page in Two Minute Billing.

PayU does not let Two Minute Billing register the webhook, so you add it in PayU yourself.

1. In the PayU Dashboard, go to Developer → Webhooks → Create Webhook.
2. For Type, select Payments. For Event, select Successful.
3. Paste the notification URL from the gateway account page.
4. Click Create. Then do these steps again for the Failed event and for the Refund event.
5. Your Merchant Salt signs the payment events. You do not need a webhook secret.
6. Ask PayU support to send mandate cancellation and modification updates to the same URL.

<screenshot :height="530" :single="true" :width="1640" alt="The PayU dashboard's Webhooks page in test mode, with three Payments webhooks: Successful, Failed and Refund" caption="PayU → Developer → Webhooks, with the three Payments webhooks." src="gateways/payu-webhooks">



</screenshot>

Do not add a **Dispute** webhook. Two Minute Billing does not book chargebacks from PayU. Record
them by hand.

## Test it

1. In your test business, open a hosted checkout link for a plan and enter the customer's name,
email and a 10-digit mobile number. PayU refuses a card setup without a phone number.
2. On the PayU page, use the card `5506 9004 8000 0008`, expiry `12/30`, CVV `123`, and the OTP
`123456`. The customer pays the first invoice in this step, and the subscription starts.
3. Refund part of the payment from the invoice. In the PayU test environment, a refund settles
about **one hour** later, and a refund under **₹100** always fails.
4. To test UPI Autopay, use a plan whose first payment is **₹100**, with no tax. PayU's test
environment takes ₹100 only, and tax would make it ₹118. On the PayU page, select **Enter Any
UPI ID**, enter `9999999999@upi`, click **APPLY**, and then **PROCEED**. The test environment
approves the mandate at once, and the customer pays the first invoice.

**Logs** shows each call to PayU and PayU's answer.

## Go live

1. In PayU, switch to live mode and open **Developer → API Keys**. Copy the live **Merchant Key**
and **Merchant Salt (v1)**.
2. Make sure PayU has turned on recurring payments for your live account.
3. In your **live** business, add PayU with those keys.
4. Add the three Payments webhooks in live mode, with the same steps as under
[Webhooks](#webhooks).

## Troubleshoot

- **Check credentials says that PayU refused the Merchant Key or the Merchant Salt.** The key or
the salt is wrong, or they belong to the other mode. Copy both again from **Developer → API
Keys**, with the mode set to match the business.
- **The customer pays at setup, but no card is saved.** PayU took the payment but made no
mandate. The card does not support recurring payments, or PayU has not turned them on for your
account. Two Minute Billing refunds that payment. Ask the customer to use a different card, or
ask PayU to turn on recurring payments.
- **A renewal is not paid on the day it is due.** This is expected. Two Minute Billing sends the
advance notice through PayU, and the debit follows at least 24 hours later (25 hours for UPI
Autopay).
- **A renewal fails and the card shows as not usable.** The customer's bank cancelled the card
mandate. Ask the customer to set up the card again.
- **A UPI Autopay renewal fails with "The payment mandate is no longer active".** The customer
revoked the mandate in their UPI app. Ask the customer to set up UPI Autopay again, or to add a
card.
- **A customer's bank raised a chargeback.** Open the payment under **Transactions** and click
**Record dispute**.

## Related

- [Payment gateways overview](https://twominutebilling.com/help/guides/connect-a-payment-gateway)
- [Recover failed payments](https://twominutebilling.com/help/guides/recover-failed-payments)
- [Handle disputes](https://twominutebilling.com/help/guides/handle-disputes)


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
