• 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
  • post Send OTP API

    Use Case


    This API is used to send an OTP to the user's mobile number. Paytm will send OTP to the mobile number passed in the request.

    Header

    ATTRIBUTRE DESCRIPTION
    Authorization string
    mandatory
    This is a base64 encoded string of “clientId:clientSecret”
    x-device-identifier string
    mandatory
    Device Id
    Please refer to below for its sample values

    Query Parameter

    ATTRIBUTRE DESCRIPTION
    locale string
    mandatory
    This query parameter contains the combination of "language to be used" and "zone".
    Possible Values: en-IN

    Request Attributes


    API Content Type: JSON

    Body1

    Body

    ATTRIBUTEDESCRIPTION
    phone string
    mandatory
    Phone number of end user
    Example: 777777777
    scopes string
    mandatory
    Name of the resource for which the token is required (will be shared by Paytm)
    Example: [“paytm”, “wallet”]

    Response Attributes


    API Content Type: JSON

    Body2

    Body

    ATTRIBUTEDESCRIPTION
    status string
    Response Status
    Example: SUCCESS/FAILURE
    message string
    Message of the Response
    Example: Otp sent to phone
    responseCode string
    Response code
    Example: BExxxxxx
    state_token string
    Reference state_token to be used while submitting otp
    Example: 65cb6680-29f6-11e4-aad2-3c970ea8b87f

    Response Codes and Messages


    Response CodeStatusMessage
    BE1400001SUCCESSSuccess
    434FAILUREBad request
    BE1423005FAILUREInvalid Authorization
    BE1423006FAILUREClient permission not found
    BE1423012FAILUREDevice identifier is missing
    BE1424001FAILUREWe have found suspicious activity from this number. Therefore, we have blocked this account. Please raise a request at paytm.com/care to unblock your account.
    BE1425004FAILUREMobile number is already pending for verification. Please try after 48 hours.
    BE1425005FAILUREScope not allowed
    BE1425006FAILUREOops! You have reached an OTP limit, please raise a query at paytm.com/care.
    BE1426003FAILUREThere was some issue in processing this request
    BE1426011FAILUREWe have found a suspicious activity from this number. Therefore, we have blocked your account. Please raise a request at paytm.com/care. The response code may change.

    Device Id Nomenclature

    DeviceSuggested NomenclatureSample Code
    App - AndroidAndroid idSettings.Secure.ANDROID_ID
    Ref: https://android-developers.googleblog.com/2017/04/changes-to-device-identifiers-in.html
    Example: 8c4afbfab1ae0bd4
    App - iOS Vendor IdUIDevice.current.identifierForVendor?.uuidString
    Example: CCB300A0-DE1B-4D48-BC7E-599E453B8DD4
    Web User AgentId associated with cookie
    Example: 123e4567-e89b-12d3-a456-426614174000
    StagingProduction
    REQUESTRESPONSE
    curl -X POST 'https://accounts-uat.paytm.com/v4/signin/otp/sv1/?locale=en-IN' \
    --header 'Authorization: Basic {BASE64_ENCODED_CLIENT_ID_AND_CLIENT_SECRET}' \
    --header 'x-device-identifier: Device123' \
    --header 'Content-Type: application/json' \
    --data '{"phone": "7777777777", "scopes": ["paytm"]}'