• Getting Started
    • Mobile Integration (Android/IOS)
      Enterprise Solutions
      Retail Solutions
      Accept Payments
      Process Payments
      Disbursals
      API References
      Testing
      Refunds
      Guides
      Other Processes
      Mini Program Platform

      post Create QR Code API

      Use Case


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

      Request Attributes


      API Content Type: JSON

      Head1

      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: WEBFor websites, the value to be passed should be "WEB", WAPFor Mobile websites/App, the value to be passed should be "WAP"
      signature string(108)
      mandatory
      Paytm validates the parameter values by verifying the signature comes in the request. It ensures that parameter values are not tempered. Signature string can be created by using Paytm checksum library
      Body1

      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 the 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 image required in response, default true
      displayName string(50)
      optional
      Display name for qr code
      Example: Merchant Brand Name
      additionalInfo object
      optional
      Additional information
      AdditionalInfo +
      AttributeDescription
      udf2 string(64)
      optional
      User define parameter 2
      udf3 string(64)
      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"}

      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


      API Content Type: JSON

      Head2

      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 passed in the request.
      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: WEBFor websites, the value to be passed should be "WEB", WAPFor Mobile websites/App, the value to be passed should be "WAP"
      signature string(108)
      Paytm validates the parameter values by verifying the signature comes in the request. It ensures that parameter values are not tempered. Signature string can be created by using Paytm checksum library
      Body2

      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 and 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
      StagingProduction
      REQUESTRESPONSE
      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}"}}"