search

POSTCreate QR Code API

Use Case

Purpose of this API is to generate the dynamic QR Code for the particular Order.

Request Attributes

Content Type : JSON

Head

AttributeDescription
clientId
string(3)
mandatory

Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key.

Example: C11

version
string(4)
mandatory

Version of the API.

Example: v1

requestTimestamp
string(15)
optional

EPOCH timestamp of the time at which request is being sent.
Example: 1588402269

channelId
string(3)
optional

The parameter value identifies the Channel for which API call is initiated.

Possible values:
WEB
For websites, the value to be passed should be "WEB"
,
WAP
For Mobile websites/App, the value to be passed should be "WAP"
signature
string(108)
mandatory

Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum Logic.
Note: Create the signature using the body parameter of the request.

Body

AttributeDescription
mid
string
mandatory

Paytm provides MID as a unique identifier to each merchant.

Example: INTEGR7769XXXXXX93833

orderId
string
mandatory

Order Id for payment

Example: OREDRID98765

amount
string
mandatory

This parameter contains the amount to be charged to the customer and can have two places of decimal.

 

 

Example: 1303.00

businessType
string
mandatory

Type of QR code to be created

Example: UPI_QR_CODE

posId
string(50)
mandatory

Pos Id

Example: S12_123

orderDetails
string
optional

Details of an Order

Example: Grocery Items

invoiceDetails
string
optional

Details of the Invoice/Bill Data associated with the transaction

Example: #INV_ORDERID_98765

contactPhoneNo
string
optional

Comma separated contact mobile number

Example: 7777777777

expiryDate
string
optional

Expiry date of the QR (Date Format : (yyyy-MM-dd HH:mm:ss))

Example: 2020-06-10 12:30:30

imageRequired
boolean
optional

If the image required in response, default true

displayName
string(50)
optional

Display name for the QR code

Example: Merchant Brand Name

additionalInfo
object
optional

Additional information

AdditionalInfo
+
AttributeDescription
udf2
string
optional

User define parameter 2

udf3
string
optional

User define parameter 3

comment
string
optional

Transaction description provided by the merchant

subwalletAmount
object
optional

Cap amount for different user subwallets

Example: {"FOOD": "2"}

gstInformation
object
optional

GST information

GSTInformation
+
AttributeDescription
gstIn
string
mandatory

merchant's GSTIN number

Example: 08TESTF0078P1ZP

gstBrkUp
string
mandatory

It will contain the Common GST Amount values break-up of GST Split(pipe “|” separated) 
amount. name & value Payer PSP to read this amount and restrict the display to customer Break up of GST amount.

Example: CGST:10|SGST:10| IGST:10| CESS:10| GSTIncentive:10| GSTPCT:10

invoiceNo
string(20)
mandatory

Merchant’s invoice number

Example: Invoice34234321

invoiceDate
GMT Format
mandatory

Bill invoice date

Example:  2019-06-11T13:21:50+05:30

splitSettlementInfo
object
optional

Split payment details

Note: Send only in case split settlement required
splitSettlementInfo(1)
+
AttributeDescription
splitMethod
string
optional

Split method

Possible Values: AMOUNT, PERCENTAGE

splitInfo
object
optional

List for child vendor merchant mid's and their split info

splitInfo
+
AttributeDescription
mid
string
mandatory

Child mid

amount
object
conditional

Share of child vendor in the split by amount base
Use: Only splitMethod is AMOUNT

Money
+
AttributeDescription
value
string
mandatory

This parameter contains the amount to be charged to the customer and can have two places of decimal.
Example: 1.00

currency
string
mandatory

This parameter indicates the currency in which transaction amount is to be deducted.
Possible Values: INR

percentage
string
conditional

Share of child vendor in the split by percentage base
Use: Only splitMethod is PERCENTAGE

Note: The possible values for the User SubWalletType Enum are:

  • FOOD
  • GIFT
  • MULTI_PURPOSE_GIFT
  • TOLL
  • CLOSED_LOOP_WALLET
  • CLOSED_LOOP_SUB_WALLET
  • FUEL
  • INTERNATIONAL_FUNDS_TRANSFER
  • CASHBACK
  • GIFT_VOUCHER
  • COMMUNICATION

If you are billing food and non-food items separately, it is imperative for you to pass the cap amount to be debited from the user's food wallet separately. Some of the examples of these merchant types are:

  • Hypermarkets and Supermarkets
  • Grocery stores
  • Dining establishments and restaurants
  • Retail stores

Response Attributes

Content Type : JSON

Head

AttributeDescription
clientId
string(3)

Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key.

Example: C11

version
string(2)

Version of the API.

Example: v1

responseTimestamp
string(15)

EPOCH timestamp of the time at which response is being sent.
Example: 1588402269

channelId
string(3)

The parameter value identifies the Channel for which API call is initiated.

Possible values:
WEB
For websites, the value to be passed should be "WEB"
,
WAP
For Mobile websites/App, the value to be passed should be "WAP"
signature
string(108)

Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum Logic.
Note: Create the signature using the body parameter of the request.

Body

AttributeDescription
resultInfo
object

This parameter gives the information about the result of the API response

ResultInfo
+
AttributeDescription
resultCode
string

This is the resultCode corresponding to a particular message and is returned to the merchant. It's maximum length is 64. The different result codes corresponding to this API are mentioned below.

resultStatus
string

This parameter indicates the status of API call.

Possible Values: SUCCESS, FAILURE

resultMsg
string(256)

This parameter is the result message which contains information about the result.The different result messages corresponding to this API are mentioned below.
 

qrCodeId
string

Paytm generated QrCode Id Of QrCode

Example: 200005050XXXXXUHF4HA7J5X

qrData
string

Paytm generated UPI QR data/Paytm QR data Of QR Code which is to be converted into QR image for user to scan from any UPI app or Paytm to complete the payment

image
string

QR Code image as a Base64 Encode

Note: By default expiry time for the order created is 10 minutes from QR creation time stamp. If this needs to be extended for more than 10 minutes please contact Paytm.

Response Codes & Messages

resultCoderesultStatusresultMsg
QR_0001SUCCESSSUCCESS
QR_1001FAILUREError while encrypting JSON string
QR_1002FAILUREEmpty MID and MerchantGuid
QR_1003FAILUREEmpty Industry Type
QR_1004FAILUREEmpty Order Id
QR_1005FAILUREInvalid Amount
QR_1006FAILUREEmpty Product Id
QR_1007FAILUREInvalid Expiry Date
QR_1008FAILUREEmpty Product Details
QR_1009FAILUREEmpty Product Type
QR_1010FAILUREEmpty Inventory Count
QR_1011FAILUREInvalid Request Type
QR_1012FAILUREInvalid Request Type, Id is specified only for Product and Order QR codes
QR_1013FAILUREError while parsing date
QR_1014FAILUREStart Date cannot be after Till Date
QR_1015FAILUREBoth id and date range cannot be null
QR_1016FAILUREQR Code not found
QR_1017FAILUREEmpty id for searching QR Code
QR_1018FAILUREExpiry date should be in the future
QR_1019FAILUREData already exist with this posid and mid
QR_1020FAILUREData already exist for this Merchant with same Id
QR_1021FAILUREData already exist with this orderId and mid
QR_1022FAILUREData already exist with this productId and mid
QR_1023FAILUREUnable to find Merchant
QR_1024FAILURENot authorized to view QR Code
QR_1025FAILUREInvalid update request
QR_1026FAILUREMerchant key not found
QR_1027FAILUREEmpty Order Details
QR_1028FAILUREError Occurred while generating QRCode
QR_1029FAILUREUnable to perform database operation, txn rollbacked
QR_1030FAILUREMerchant guid and mid given in the request do not belong to same merchant
QR_1031FAILUREDeeplink should be present in request
QR_1032FAILUREEmpty merchant handle
QR_1033FAILUREA QR Code with same order id already exists
QR_1034FAILUREA QR Code with same order id already exists
GE_0001FAILUREOops, something went wrong!
GE_0003FAILUREWe could not get the requested details. Please try again.
GE_1010FAILUREWe could not get the requested details. Please try again.
GE_1043FAILUREMerchant does not exists
DQR_0001FAILUREBlank request received
DQR_0002FAILUREField mid can not be blank
DQR_0003FAILUREField displayName can not be blank
DQR_0004FAILUREMerchant's VPA-address not found
DQR_0005FAILURECould not generate UPI-handle
DQR_0006FAILURERequest param changed with repeated order id
DQR_0007FAILUREUPI Paymode is not enabled on Merchant
DQR_0021FAILUREInvalid/Blank type of QrCode
DQRO_0001FAILUREError occured while generating order
⇾
Staging
Production
https://securegw-stage.paytm.in/paymentservices/qr/createcopy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl - X POST 'https://securegw-stage.paytm.in/paymentservices/qr/create'\
    --header 'Content-Type: application/json'\
    --data '{"body":{"mid": "{mid}", "orderId": "OREDRID98765", "amount": "1303.00","businessType": "UPI_QR_CODE","posId": "S12_123"},
             "head": {"clientId": "C11", "version": "v1","signature": "{signature}"}}"
copy icon