<?php

$apiurl="https://www.upiqr.com/upiqrapi?apikey=apikey&vpa=vpa@bankcode&payee=payeename&billno=12345&amount=100.00";

$upiurl=str_replace(" ","%20",$apiurl);
$img = 'upi-qr-code.png';  // define name for   UPI QR Image to be saved
file_put_contents($img, file_get_contents($upiurl)); // will create your UPI QR Image 


$pdf->Image("$img", 150, 10, 50, 50, 'png');
?>