• Callback Response
  • Getting Started
    • Mobile Integration (Android/IOS)
      Enterprise Solutions
      Retail Solutions
      Accept Payments
      Process Payments
      Disbursals
      API References
      Refunds
      Guides
      Other links
      Mini Program Platform
  • Features for Investments PG
  • getUserInfo API

    Use Case


    This API gives a merchant the Paytm's user details (Profile Name, Email and Phone Number) corresponding to an access token. This should be used to facilitate seamless Login in the merchant's system.


    Request Attributes

    API Content format: JSON

    Head

    AttributeDescriptionMandatory
    verification_typeThis is verification type like "oauth_token"Yes
    dataAuth Token you received via S2S call in getAccessToken APIYes
    AuthorizationThis will be a base64 encoded string of client_id:client_secretYes

    Response Attributes

    Head

    AttributeDescriptionExample
    statusstatus of response200

    Success:

    ParameterDescriptionExample Value
    emailEmail id of the userabc@xyz.com
    profileInfo.displayNameDisplay name of the userShaurya
    phoneInfo.countryCodeUsers country code91
    phoneInfo.phoneNumberPhone number of the user9878654532

    Error Responses:

    ParameterDescriptionExample Value
    statusstatus textFailure
    responseCoderesponse code434
    messageerror messageBad Request

    ERROR CODES

    Response CodeStatusMessage
    401FAILUREUnauthorized Request
    434FailureBad Request
    530FailureInvalid Token
    827FailureThere was issue in processing request
    514FailureUser Not Found
    827FailureThere was issue in processing request
    1301FailureClient does not have permission to fetch
    3005FailureBlocked due to security reasons

    Endpoints

    UAT: https://accounts-uat.paytm.com/v2/user?fetch_strategy=profile_info,phone_number,email

    Production: https://accounts.paytm.com/v2/user?fetch_strategy=profile_info,phone_number,email

    Request CodeResponse JSON
    curl -X GET 'https://accounts.paytm.com/v2/user?fetch_strategy=profile_info,phone_number,email'  
               --header 'verification_type: oauth_token'            --header 'data: asdf-fdsf-werw-gdfg'            --header 'cache-control: no-cache'            --header 'Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l'