search

Paytm Dynamic QR Code Payments

What is a Dynamic QR Code?

Paytm Dynamic QR code helps enterprises accept contactless and error-free in store payments from customers using Paytm app or any UPI app. The Static Paytm QR code, that can be seen across different merchants, is something that identifies the merchant. Unlike Dynamic QR Code, customers are needed to enter the amount while paying through Paytm/UPI app. Paytm Dynamic QR offers a solution where the merchant is in control of the amount paid through QR code.

A merchant can generate the dynamic QR code from their Billing POS/System for a specific order/bill and must pass the order specific information such as Order ID, Order Amount, etc. while generating the code. The customer can scan this QR to make a payment and the merchant can check the transaction status with Paytm using the Order ID and accordingly close the order/bill.

Note: A Customer-Facing Display (CFD) is required for Billing POS integration. In case, you don’t have a CFD, please Get in Touch for the same.

Benefits of Dynamic QR Code

  • Each QR code generated by a merchant for an order is unique.
  • The merchant has the control on the order amount and the user cannot change it while scanning the QR code from any app.
  • It can be easily displayed to a customer on a mobile device.
  • It facilitates payment through Paytm or any UPI app.

Demo of Dynamic QR Code Payment

Flow diagram of Dynamic QR Code Payment

Use Cases

1. Paytm e-COD/Contactless Payment


Delivery Apps/Delivery Receipts/Invoices

Below are the typical use cases where Paytm Dynamic QR code can be used for payment collection at door-step deliveries:

  • Delivery receipts/invoices for goods
  • Delivery Apps for food/goods delivery by e-commerce websites
  • Utility bills (e.g. electricity bills, gas bills etc.)

When a customer orders the home delivery of a product/service either online or over a call, the merchant can generate the QR code for the order and print it on the invoice with a text “Scan this QR to pay”. At the time of delivery, the customer scans the QR code using the Paytm or any UPI app and completes the payment. The customer receives the payment confirmation on his UPI app and the delivery agent receives the transaction status on his delivery app and/or through an SMS.

2. In Store Payments

Pay at Counter (for retail shops) and Pay at Table (for fine dining restaurants)

The cashier generates the QR code for the order through the POS system and prints it on the invoice with a text "Scan this QR to pay". Customer scans the QR code using the Paytm or any UPI app and completes the payment. The customer receives the payment successful confirmation on his app and the cashier will get the confirmation on his billing POS. Once the payment confirmation is received on billing POS, the order can be closed by the operator.

3. Self Ordering Kiosks/Vending Machines

Below are the typical use cases where Dynamic QR code can be used on kiosks/vending machines:

  • Self ordering kiosks in quick service restaurants
  • Vending machines in office spaces, airports, parking, etc.

When a customer selects a product/service through a self ordering kiosk or vending machine and chooses pay using Paytm/UPI option, a QR code can be generated and displayed with text "Scan this QR to pay" to the customer on the screen of the vending machine/kiosk. The customer completes payment by scanning the QR code through Paytm or any UPI app. The vending machine/kiosk can process the order after getting the payment confirmation.

4. Websites/Smart TV apps

When a customer selects a product/service from the merchant's website/smart TV app and proceeds for payment, a QR code can be generated and displayed with text “Scan this QR to pay” to the customer on the shopping website/smart TV app. The customer completes the payment by scanning the QR code through Paytm or any UPI app. The payment confirmation can be sent to the merchant's server which can subsequently be displayed on websites/smart TV app.

Steps in processing payment

The section describes the integration steps required to integrate Paytm's Dynamic QR code with billing POS to accept contactless payment from your customer using the Paytm app or any UPI app.

 

STEP 1: Get your authentication keys

Paytm Dynamic QR is only available to the select enterprise customers with high transaction volumes and established businesses.
Get in touch to request access to Paytm Dynamic QR code payment flow.

  • MID: A unique merchant identifier issued by Paytm for your account.
  • Merchant Key: This is a unique secret key used to secure encryption of every request. This needs to be kept on server side and should not be shared with anyone.

Note: Never share your secret Merchant Key with anyone.

STEP 2: Create Dynamic QR Code

To create the dynamic QR code for an order, refer to the Create QR Code API.

 

Rendering QR Code Image

After you send a create QR code request, you need to render a QR code image. Paytm returns the QR Code Data/UPI QR Data in Create QR Code API that needs to be converted into the QR image. This QR image can be displayed on a customer facing screen or printed on a bill for a user to scan and complete payment. There are open libraries available online which can be used to convert the QR Code Id/ UPI QR Data string into the QR image.

Following points need to be taken care while generating and displaying/printing QR image:

  • qrData param’s value should be used for generating QR
  • The QR image must be displayed on white background
  • The size of the UPI QR image must be at least 1.5"x1.5" for faster scan
  • Leave a white space of 0.5" width around the QR image

STEP 3: Customer scans Dynamic QR code

When a QR code is generated for a specific order, the customer scans that QR code and pays using the Paytm/UPI app from their prefered payment method. The customer is notified about the payment status on their Paytm/UPI app after the successful completion of payment.

Note: Customers cannot change the order amount in their app on scanning the particular order QR code.

STEP 4: Confirm the transaction status

Once the payment is completed by customer, the merchant can confirm the transaction status by using S2S Webhook or the Transaction Status API.

The Merchant can get the transaction status using the following ways:

  • Webhook - Paytm sends a server to server (S2S) response in a key value pair on the configured URL. S2S response is sent only when the transaction has reached a terminal state (success/fail). To configure the URL, please connect with Paytm.
  • Polling - Setup a polling process after regular intervals using the Transaction Status API. To get the best results out of a status query, you should check the status 8 times/minute by following the schedule given below:
Status Query Status Query Interval
(Since the transaction was sent to Paytm)
1st 15 seconds
2nd

25 seconds

3rd 30 seconds
4th 35 seconds
5th 40 seconds
6th 45 seconds
7th 50 seconds
8th 55 seconds

Henceforth, there should be a check status tender on the POS to help the cashier check the transaction status if the payment has been completed post 1 minute of QR generation.

 

STEP 5: Manage Refunds

If you need to cancel or refund a successful transaction, send a Refund API request and ensure success using the Refund Status API.

 

REFID - It is necessary to send the REFID parameter as a unique ID in every refund request sent to Paytm. The refund request may fail due to the insufficient funds in MPA (Merchant Payable Account) and for Failure refund status, the merchant can retry refunds. However, for Pending refund status, the merchant should not retry refunds.

Integration Checklist

Post completion of integration in your staging environment, it is mandatory to test the integration before moving into the live environment with production account details (received from Paytm team). Paytm will provide the test account credentials for testing the flow on our staging environment. You can view the staging transaction details in “Test Data” mode on your dashboard. Below points should be taken care of during the integration of the flow:

  1. The transaction status should be verified through Transaction Status API in the payment flow and should be used to code the bill/order.
  2. The order ID passed to Paytm should be unique for your MID across all POS IDs.
  3. The amount must not contain more than 2 decimal points, comma or any special characters.
  4. POS ID parameter is mandatory for creating QR.
  5. Paytm Transaction ID must be recorded against your Order Id for reconciliation.
  6. Please ensure that Create QR, Refund & Transaction/Refund Status are implemented & tested for positive & negative scenarios.
  7. API timeouts should be configured as per your business needs & architecture (e.g. if you have multiple hops before transaction reaches Paytm Servers, API timeouts should be higher).
  8. Integration should handle scenarios where status of the transaction can not be captured due to intermittent issues. E.g. If debit has happened but the bill has been marked with Unknown status, then you can refund the transaction through Paytm Dashboard or Refund API.
  9. For any local errors implemented in POS, user friendly messages should be displayed to the cashier.
  10. The error codes and logs should be maintained to help in debugging issues during integration and post go-live.

For any issues regarding Dynamic QR Code integration, please Get in touch.

Key attributes for Dynamic QR Code Integration

S.No. Attributes Description
1 Order_ID It is a unique reference ID for a transaction passed in the transaction request. Order ID should be passed to check the actual status of the transaction.
Example: OREDRID98765.
2 Transaction Amount This parameter is an object and should contain the value of transaction i.e. amount and currency type.
Example: { "value" : "1303.00", "currency" : "INR" }
3 POS_ID POS_ID needs to be unique, alphanumeric values for each POS. The format of POS ID should be as: “Store ID_POS ID”.
Example: “S12_123”
4 Paytm Transaction ID Its string length should capable of storing 64 digits.
5 Transport Layer Security (TLS) 1.2 Paytm receives all the API requests with TLS 1.2 version.

Demo for Billing POS

You can see below a sample UI for billing POS.