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

Overview of Dynamic QR Code

  1. Customer chooses the goods/service in a store and shows the intent to the cashier for Paytm/UPI payment.
  2. Cashier creates an order with the bill amount and a unique Order ID in the POS system.
  3. Merchant’s backend server calls Create QR Code API and displays the QR Code to the Customer on the consumer-facing screen.
  4. Customer scans QR code via Paytm or any UPI app.
  5. Customer enters the UPI pin in the respective UPI app to complete the payment or can use any payment sources i.e. UPI, Wallet, Debit/Credit Cards, or Netbanking account in the Paytm app.
  6. Merchant's server receives the transaction confirmation from Paytm via an S2S Callback or calls the Transaction Status API to get the transaction confirmation against the order.
  7. Merchant's POS system closes the bill/order and shares the payment response with the customer.

Demo of Dynamic QR Code

 

Flow diagram of Dynamic QR Code

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 product/service's home delivery either online or over a call, then 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 an 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

You can see below 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: 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 a 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 the 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.

You need to take care of the following points 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 the QR code is generated for an 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 a 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. The 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 here.

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 the 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 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  the “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 the 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. Make sure 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 the transaction reaches Paytm Servers, API timeouts should be higher).
  8. Integration should handle scenarios where the status of a 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 making it 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 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 Its an object and should contain the value of transaction i.e. amount and currency type.
Example: { "value" : "1303.00", "currency" : "INR" }
3 POS_ID There should be a 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.