You don’t.

While I don’t have any personal experience in this matter, there’s enough anecdata to this effect.

It’s not only Electricity bill or UPI.

You don’t get a receipt from any Merchant for payments made via Account-to-Account Real Time Payment methods like UPI / NEFT / IMPS (India), FPS (UK), and so on.

My go-to method of bill payment is Credit Card. I always get a receipt from all Merchants for all payments made with Credit Card. This includes Electricity Bill among others.

As I highlighted in PSA: Insist On Receipt When You Pay By NEFT, UPI, FPS Etc.:

When you pay with a credit card, you get such a proof of receipt. It’s in the form of a receipt and chargeslip you get from the cashier if your payment was made at the Merchant’s brick-and-mortar store; or e-receipt you see on the Merchant’s website if your payment was made online. (Please note that the realtime SMS Alert, if any, that you get on your mobile phone soon after you make the credit card payment does not count as receipt. The alert is sent by your card issuing bank and the Payee i.e. Merchant is under no obligation to accept it as receipt of money).

I’ve heard of people who have paid their electricity bill on time via an A2A RTP but have had their power disconnected because the electricity company apparently could not credit their account for lack of clarity on which of its tens of millions of customer made the said payment.

My $0.02: As far as possible, pay all bills with Credit Card. Apart from getting a receipt automatically, it has many other benefits like Rewards, Deferred Payment, Fraud Protection, and so on. More at https://qr.ae/TWyICN.