• 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
        Website Integration

      post Access Token API

      Use Case


      This API is used to obtain the security token named as Access token which can be further used in subsequent API calls to retrieve the read only data.

      Query Params

      ATTRIBUTE DESCRIPTION
      midstring (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
      referenceIdstring
      mandatory
      This is the unique reference id corresponding to a request and it's value should be different for new requests.

      Request Attributes


      API Content Type: JSON

      Head1

      Head

      ATTRIBUTEDESCRIPTION
      version string(4)
      optional
      Version of the API.
      Example: v1
      requestTimestamp string(15)
      optional
      EPOCH timestamp of the time at which request is being sent.
      Example: 1588402269
      tokenType string
      mandatory
      Authorization method for this request.
      Possible Values: CHECKSUMTo be used in case authentication is done using CHECKSUM.
      token string
      mandatory
      Authorization string corresponding to the tokenType used.
      Example: 16Xm7DXbvNqhaLw+HMj4XB6XTQKCoM=
      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
      referenceId string (20)
      mandatory
      This is the unique reference id corresponding to a request and it's value should be different for new requests.
      paytmSsoToken string
      conditional
      This is a unique token linked with Paytm user's account.
      Note: It becomes mandatory if Fetch Payment Options API
      is to be hit for getting paytm user's saved instruments.
      Example: 9357bb98-4d99-XXXX-8abb-900076e83000

      Response Attributes


      API Content Type: JSON

      Head2

      Head

      ATTRIBUTEDESCRIPTION
      responseTimestamp string(15)
      EPOCH timestamp of the time at which response is being sent.
      Example: 1588402269
      version string(2)
      Version of the API passed in the request.
      Example: v1
      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: SFor Success, FFor Failure, UFor Unknown
      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
      extraParamsMap object
      Map for any additional data that is required to be provided in the response.
      accessToken string
      Unique Access Token generated in reponse of the this API and is used for subsequent API calls. It is valid for 30 minutes.
      Example: 739816707d7444XXXXXXXX6cb4264d0a1590145379323

      Response Codes and Messages


      resultCoderesultStatusresultMsg
      0000SSuccess
      1001FRequest parameters are not valid
      2005FChecksum provided is invalid
      2006FInvalid MID
      9999FSomething went wrong
      00000900USystem error
      StagingProduction
      REQUESTRESPONSE
      curl -X POST 'https://securegw-stage.paytm.in/theia/api/v1/token/create?mid={mid}&referenceId=ref_987654321' \
      --header 'Content-Type: application/json' \
      --data '{"head":{"tokenType":"CHECKSUM","token":"{checksum}"},"body":{"mid":"{mid}","referenceId":"ref_987654321"}}'