How to add upi qrcode widget on nextjs site?

Date: 8 May 2022

By Pratik Sharma

1. Get the script tag from PayViaUPI.com add your details UPI ID, name.

2. Instead of using the script tag, we will use the Script tag provide by Nextjs like this

code snippet

3. Add strategy attribute to Script tad with value 'beforeInteractive'

4. You are done. You would see the pay via UPI button on the Page that you added the Script tag.

here is a CodeSandBox Example that you can fork...