Dynamic QR Based Payments

Dynamic QR API helps you create a QR code on the fly that you can use on bills, invoices and receipts. This lets you collect payments from customers offline when someone scans the QR via any UPI app.

Scan the QR code below from any UPI app (Google Pay, Bhim, MobiKwik, Phonepe, Paytm, etc) to see it in action.

200

This flow is to understand the integration process of Dynamic QR Based Payments of Mobikwik PG

Try it out in the API explorer

Getting Started With Dynamic QR API  

Curl Request for API

curl -X POST \
  https://api.zaakpay.com/api/payments/v1/upi/qr \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 0747d079-ab40-45c1-8a1d-ff452201aa60' \
  -d '{
"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973",
"orderId": "ZPUpiQrDirectTestv321",
"height":200,
"width":200,
"amount": 101,
"checksum" : "d51bd2966f2fa55316dc45105f5c0acffeed83e19f8671dac927e10ab997f4f2",
"productDescription": "bill Pay"
}'
{
    "success": true,
    "message": {
        "code": "208",
        "text": "Transaction in Processing state."
    },
    "data": {
        "orderId": "ZPUpiQrDirectTestv321",
        "zaakpayOrderId": "ZP5a81aa6777658",
        "qrDetails": {
            "url": "upi%3A%2F%2Fpay%3Fpa%3Dfinnovation.zaakpay%40hdfcbank%26pn%3Dnull%26tr%3DZP5a81aa6777658%26am%3D1.01%26cu%3DINR%26mode%3D01%26purpose%3D10%26orgid%3D-%26sign%3D-%26tn%3Dbill+Pay",
            "imgData": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQAAAACFI5MzAAAB70lEQVR42u2YUYrDMAxEDbqWwVcX+FoC78wooWlh/6SPXZo2NNULxJKlkdpxfjvGl/xd4mNYrL1jjLmOT6OhgWy8faxY+ATGPbLVEzdcHBDnUsLS0EI2XI0BG71tJDFJ5kxzE1FE4SOcdbKPWFcRJsR+Hm+5U0euw5WB+3AB77VQROClmwDCyagysA0EcVwMITIkJreNrwaijXILrGKBntAC6okjL8a0rCx8wXk6iHxjLO1cqgS5aCDwT77hDgqgPzSxlPC5WEOopqBHIRFsINg4mPnkCd2LjG4DcUoev6bw4bbRQRBR6h0dhjmF1hoI8kFajuZkzi0MdZByQgnyO6Lcu6OznuACWTGYjonPvYJSooynlgdrd8erA9YSzQ3ycNN+JUg90Z7hsey1ENuU2xay9GhmB1JefvcQY92aNpC9/TXZlRJNkKaJCzW1GOC7gmsJ4klFyjLeksIWwvaKbVPGL81Et4bUkpWXbE5qgdzIBgLnGMSR1UWzr9NBJBRLsqQ6fmR8MXFOWZojcTWGZodyclIs2JRYXJtj0W4gORGH2uzmJESFaiD7aunquJxQjj9nvjrC/rfVYoOrSKHoIYyh5kil4mPmqyY5C3N4ZKrck3ctIaQc8dcxod2KVEvyBxE9lFior58G8v2v5p+RH54tXiyk4qIJAAAAAElFTkSuQmCC",
            "imgUrl": "https://api.zaakpay.com/api/payments/v1/upi/qr/image?mid=b19e8f103bce406cbd3476431b6b7973&width=200&height=200&data=upi%3A%2F%2Fpay%3Fpa%3Dfinnovation.zaakpay%40hdfcbank%26pn%3Dnull%26tr%3DZP5a81aa6777658%26am%3D1.01%26cu%3DINR%26mode%3D01%26purpose%3D10%26orgid%3D-%26sign%3D-%26tn%3Dbill+Pay&checksum=2f8d5ebf96faa8dfb06ba5fe859222adc3ef7efe4069958b7118c3a67713b590"
        }
    }
}
{
    "success": false,
    "message": {
        "code": "128",
        "text": "Order Id already processed."
    },
    "data": {
        "orderId": "ZPUpiQrDirectTestv321",
        "zaakpayOrderId": "ZP5a81aa6777658",
        "qrDetails": {
            "url": "upi%3A%2F%2Fpay%3Fpa%3Dfinnovation.zaakpay%40hdfcbank%26pn%3Dnull%26tr%3DZP5a81aa6777658%26am%3D1.01%26cu%3DINR%26mode%3D01%26purpose%3D10%26orgid%3D-%26sign%3D-%26tn%3Dbill+Pay",
            "imgData": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQAAAACFI5MzAAAB70lEQVR42u2YUYrDMAxEDbqWwVcX+FoC78wooWlh/6SPXZo2NNULxJKlkdpxfjvGl/xd4mNYrL1jjLmOT6OhgWy8faxY+ATGPbLVEzdcHBDnUsLS0EI2XI0BG71tJDFJ5kxzE1FE4SOcdbKPWFcRJsR+Hm+5U0euw5WB+3AB77VQROClmwDCyagysA0EcVwMITIkJreNrwaijXILrGKBntAC6okjL8a0rCx8wXk6iHxjLO1cqgS5aCDwT77hDgqgPzSxlPC5WEOopqBHIRFsINg4mPnkCd2LjG4DcUoev6bw4bbRQRBR6h0dhjmF1hoI8kFajuZkzi0MdZByQgnyO6Lcu6OznuACWTGYjonPvYJSooynlgdrd8erA9YSzQ3ycNN+JUg90Z7hsey1ENuU2xay9GhmB1JefvcQY92aNpC9/TXZlRJNkKaJCzW1GOC7gmsJ4klFyjLeksIWwvaKbVPGL81Et4bUkpWXbE5qgdzIBgLnGMSR1UWzr9NBJBRLsqQ6fmR8MXFOWZojcTWGZodyclIs2JRYXJtj0W4gORGH2uzmJESFaiD7aunquJxQjj9nvjrC/rfVYoOrSKHoIYyh5kil4mPmqyY5C3N4ZKrck3ctIaQc8dcxod2KVEvyBxE9lFior58G8v2v5p+RH54tXiyk4qIJAAAAAElFTkSuQmCC",
            "imgUrl": "https://api.zaakpay.com/api/payments/v1/upi/qr/image?mid=b19e8f103bce406cbd3476431b6b7973&width=200&height=200&data=upi%3A%2F%2Fpay%3Fpa%3Dfinnovation.zaakpay%40hdfcbank%26pn%3Dnull%26tr%3DZP5a81aa6777658%26am%3D1.01%26cu%3DINR%26mode%3D01%26purpose%3D10%26orgid%3D-%26sign%3D-%26tn%3Dbill+Pay&checksum=2f8d5ebf96faa8dfb06ba5fe859222adc3ef7efe4069958b7118c3a67713b590"
        }
    }
}

For duplicate order id, API fails to return the new QR data and the same QR data based on provided order id will be returned.

 

Request Parameters

Member NameTypeDescription
orderIdStringOrder Id for requested payment.
amountIntegerAmount for the transaction in Paisa.
buyerEmailStringBuyer email [Optional].
widthIntegerWidth of QR [Optional default = 200]
heightIntegerHeight of QR [Optional default = 200]
productDescriptionStringProduct Description for the payment
checksumstringChecksum generated on request json field values in the order[merchantIdentifier,orderId,amount, productDescription]

 

Staging Credentials

Merchant Identifier : b19e8f103bce406cbd3476431b6b7973
Secret key : 0678056d96914a8583fb518caf42828a

Checksum Calculation Process

For both integrity & data-authenticity verification before sending data to the API, you need to
calculate a checksum of all the data that you send to MobiKwik Payment Gateway. We use an
HMACSHA-256 algorithm to calculate the checksum of ALL data that is posted to the API.

You need to calculate check on merchantIdentifier, orderId, amount and productDescription in below-provided format.

"b19e8f103bce406cbd3476431b6b7973"+"ZPUpiQrDirectTestv321"+"101"+"bill Pay"
"b19e8f103bce406cbd3476431b6b7973ZPUpiQrDirectTestv321101bill Pay"
d51bd2966f2fa55316dc45105f5c0acffeed83e19f8671dac927e10ab997f4f2

 

Response Parameters

Member NameTypeDescription
urlStringThe API generated intent_url for the requested payment.
imgUrlStringThe API endpoint to show QR Code of the payment request on the browser
imgDataStringA base64 data of the generated QR Image. This can be used if you don’t require the API for showing QR.
orderIdStringOrder Id of payment sent from your end.
zaakpayOrderIdStringThe system generated transaction number for the requested orderId. There will be one to one mapping between orderId and zaakpayOrderId.
responseCodeIntegerResponse code for the API Request
responseDescriptionStringResponse Description of the API Request