Get Token API - Bank Verification

This Get Token API returns the authentication token generated using the client ID and client secret where, grant_type is client_credentials and scope is verify_bank_account.

Environment

Request parameters

ParameterDetails
client_id
mandatory
String: This field is the Client ID that was provided by PayU while onboarding.
client_secret
mandatory
String: This field is the Client secret that was provided by PayU while onboarding.
grant_type
mandatory
String: This parameter contains a constant value used to get the access token. For Bank Verification API, it is client_credentials.
scope
mandatory
String: This parameter will vary based on the use case. For Bank Verification API, it is verify_bank_account.

Sample request

curl --request POST \
     --url https://uat-accounts.payu.in/oauth/token \
     --header 'accept: application/json' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data grant_type=client_credentials \
     --data scope=verify_bank_account \
     --data 'client_id=<client_id>' \
     --data 'client_secret=<client_secret>'

Response parameters

ParameterDescription
access_tokenThe access token to be used in Partner Integration APIs.
token_typeThe token type of the access token.
expires_inThe expiry time in seconds of the access token.
scopeThe scope of the access token.
created_atThe UNIX time stamp when the access token was created.

📘

Note:

The expiry period of the token generated using this API is configurable by you (partner). The expiry period (in seconds) of the token is displayed in the expires_in parameter of the response. For example, in the following response, the value of the expires_in is 7200 seconds:

{
  "access_token": "82c38b64e072f3d64da6e4e6efee9789ffe1250f0cd04c20753d6e6f25df9cc7",
  "token_type": "Bearer",
  "expires_in": 7200,
  "scope": "send_sign_in_otp",
  "created_at": 1595411399
}

Sample response

{
  "access_token": "82c38b64e072f3d64da6e4e6efee9789ffe1250f0cd04c20753d6e6f25df9cc7",
  "token_type": "Bearer",
  "expires_in": 7200,
  "scope": "send_sign_in_otp",
  "created_at": 1595411399
}