Setup steps

  1. In PayU, open Developers → Key and Salt and copy both.
  2. In ProductLense, open Settings → Billing connections → PayU, paste them and set the mode.
  3. In PayU Dashboard → Developers → Webhooks, add a webhook endpoint with the URL ProductLense shows after you save the connection (pattern https://api.productlense.app/api/webhooks/{provider}/{connection_id}).
  4. Create one webhook for Successful and Failed payments and one for Refund, both pointing at the same URL.
  5. ProductLense backfills 12 months of transactions and their refunds.

Credentials and permissions

Credentials ProductLense asks for
FieldSecretWhere to find it
Merchant keyNoPayU Dashboard → Developers → Key and Salt.
Merchant saltYes, encrypted at restThe salt shown with the key. PayU signs payment webhooks with it.
ModeNoproduction or test.

Webhook

URL pattern, shown with your connection id after you save:

text
https://api.productlense.app/api/webhooks/payu/{connection_id}

Events: Successful, Failed, Refund

Verification: Payment webhooks: PayU’s SHA-512 reverse hash with your salt and merchant key. Refund webhooks are unsigned, so ProductLense fetches each refund from PayU before recording it.

What ProductLense reads

Customers
The payer’s email, else phone: PayU has no customer object.
Subscriptions
Not read: recurring (SI) charges arrive as payments.
Payments
Captured transactions as revenue; failed, dropped and cancelled ones are kept as failed.
Refunds
Refunds of each captured transaction, and every refund webhook, confirmed with PayU’s API.
Fees
mer_service_fee plus mer_service_tax when PayU reports them; otherwise an editable estimate of 2.36% (2% plus 18% GST).

What ProductLense never touches

  • Never creates, changes, refunds or cancels anything: read-only API calls and incoming webhooks only.
  • Never moves money, issues payouts, or reads bank account details.
  • Never sees full card numbers; providers do not expose them.
  • Never sends your customer data to the AI model: Ask and the daily insight see aggregates only.

Match payments to your users

Send your user id in udf5 and the ProductLense visitor id in udf4 of the payment request so revenue matches by id rather than email.

server: PayU payment request fields
// Add to the fields you post to PayU, and include them in the request hash:
const fields = {
  key, txnid, amount, productinfo, firstname, email, phone,
  udf4: visitorId, // ProductLense visitor id
  udf5: user.id,   // your user id
  surl, furl,
};

PayU and ProductLense: questions

Does ProductLense work with PayU?
Yes. ProductLense connects to PayU with merchant key, merchant salt, mode, backfills 12 months of history, and stays current through signed webhooks plus a nightly reconcile. One connection is included on Starter; Growth and Scale allow every provider at once on the same site.
What data does ProductLense read from PayU?
Customers, subscriptions, payments, refunds and fees, read-only. Payments: captured transactions as revenue; failed, dropped and cancelled ones are kept as failed. Refunds: refunds of each captured transaction, and every refund webhook, confirmed with PayU’s API. Fees: mer_service_fee plus mer_service_tax when PayU reports them; otherwise an editable estimate of 2.36% (2% plus 18% GST).
Can ProductLense change anything in my PayU account?
No. ProductLense only makes read calls and receives webhooks. It never creates, changes, refunds or cancels anything, never moves money, and never sees card numbers. Credentials are encrypted at rest, and the AI features only ever see aggregated numbers, never your customers’ data.
How does ProductLense match PayU payments to visitors?
Send your user id in udf5 and the ProductLense visitor id in udf4 of the payment request so revenue matches by id rather than email. Your site calls identify with the same user id after signup, and ProductLense follows the payment to that visitor’s first touch: source, medium, campaign and landing page.
Are PayU fees subtracted from revenue?
mer_service_fee plus mer_service_tax when PayU reports them; otherwise an editable estimate of 2.36% (2% plus 18% GST). Net revenue is the charge minus the fee; refunds subtract the refunded amount and its fee. Profit per channel then subtracts ad spend.

Connect PayU and see revenue by channel today.

Add the script, connect Stripe or any of 14 other billing providers, and see revenue by channel the same day.