• 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 Fetch Template Fields API

      Use Case


      This API fetches all the created fields in a template

      Request Attributes


      API Content Type: JSON

      Head1

      Head

      ATTRIBUTEDESCRIPTION
      timestamp string(15)
      optional
      EPOCH timestamp of the time at which request is being sent.
      clientId string(3)
      optional
      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)
      optional
      Version of the API.
      Example: v2
      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"
      tokenType AES
      mandatory
      This parameter identifies whether the API works on checksum authentication. The value to be sent in tokenType is 'AES' for this API.
      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(20)
      mandatory
      Paytm provides MID as a unique identifier to each merchant. For your staging MID, click here. You get the production MID post the account activation.
      Example: INTEGR7769XXXXXX9383
      templateId string
      mandatory
      This is a unique identity for pre build form template

      Response Attributes


      API Content Type: JSON

      Head2

      Head

      ATTRIBUTEDESCRIPTION
      timestamp string(15)
      EPOCH timestamp of the time at which response is being sent.
      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
      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"
      tokenType AES
      This parameter identifies whether the API works on checksum authentication. The value to be sent in tokenType is 'AES' for this API.
      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, FAILED
      resultMessage 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
      templateName string
      Template name
      templateInfo string
      Information about the template
      fields Fields
      List of multiple fields
      Fields +
      AttributeDescription
      name string
      Field name
      type string
      Type of field
      (Text, Date, Numeric, Dropdown)
      displayText string
      Field display text
      helpText string
      Help text for field
      constraints Constraint
      Constraints for a field which will be apply in input
      Constraints +
      AttributeDescription
      maxLength string
      Character maximum length in this field - Text & Numeric Only
      minLength string
      Character minimum length in this field - Text & Numeric Only
      maxValue string
      maximum value of this field - Date & Numeric Only
      minValue string
      minimum value of this field - Date & Numeric Only
      allowedValues string
      Multiple values of this field - Dropdown Only
      Ex: ["Male","Female"]
      beforeTransaction boolean
      Conditional field (it will use before transaction or not) - Date Only
      orientation string(H, V)
      To be displayed vertical or horizontal with respect to previous field
      H: Horizontal
      V: Vertical
      size string
      Size percentage in which field box will be displayed
      isEditable boolean
      Field which can be edited by merchant
      display boolean
      Field which will be displayed in suggested Fields
      mandatory boolean
      Field which will be mandatory while payment

      Response Codes and Messages


      resultCoderesultStatusresultMessage
      LF_001SUCCESSSuccess
      LF_002FAILEDInvalid Request
      302FAILEDRequest Validation Failure
      401FAILEDInvalid Request
      502FAILEDUnknown Error Occurred
      StagingProduction
      REQUESTRESPONSE
      curl -X POST 'https://securegw-stage.paytm.in/link/form/fetchTemplateFields' \
      --header 'Content-Type: application/json' \
      --data '{"body":{"mid":"{mid}", "templateId":"79"},"head":{"tokenType":"AES","signature":"{signature}"}}'