Get Token API

The Get Token API returns the authentication token generated using the client ID and client secret for the following products:

Environment

Additional information for request parameters used in Payment Links
ParametersDescription
client_idFor getting your client ID, refer to Get Client ID and Secret from Dashboard
client_secretFor getting your client secret, refer to Get Client ID and Secret from Dashboard
scopeThe scope that must be used for payment links are:

- Create Link: create_payment_links
- Change status and expiry: update_payment_links
- Get a single payment link:read_payment_links
- Get all payment links: read_payment_links
- Share payment links: read_payment_linksNote: Merchant can pass up to three scopes simultaneously for an access token value. This is done by passing scopes separated by a space between them. For example:
create_payment_links update_payment_links read_payment_links
grant_typeThis parameter contains a constant value used to get the access token. The grant_type used across the partner integration is client_credentials.
Additional information for request parameters used in Partner Integration
ParametersDescription
client_idFor getting your client ID, refer to Download Client Credentials.
client_secretFor getting your client secret, refer to Download Client Credentials.
scopeThe scopes to be used for various use cases in Parter Integration are:

- Refer Merchant, Verify Link Merchant, Get Merchant, and Update Merchant: refer_merchant
- Send Sign In OTP: send_sign_in_otp
- Verify Sign In OTP: verify_sign_in_otp
- Client Manage Agreement (Used in E-Sign flow): client_manage_agreement
- Client Manage KYC Details (Used in managing KYC documents): client_manage_kyc_details
- Create Bank Details: create_bank_details
- Penny Verify - user_token
- Manage Payment Links: create_payment_links
grant_typeThis parameter contains a constant value used to get the access token. The grant_type used across the partner integration is client_credentials.
Additional information for request parameters used in BBPS
ParametersDescription
client_idFor getting your client ID, refer to Download Client Credentials.
client_secretFor getting your client secret, refer to Download Client Credentials.
scopeThe scopes used in BBPS are:

- read_bills
- create_transactions
- read_billers
- read_biller_categories
- read_transactions
- read_plans
The scope varies for each BBPS API and refer the first "Note" of the API reference for the scope.
grant_typeThis parameter contains a constant value used to get the access token. The grant_type used across the BBPS will be share by PayU.
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
}

Request parameters

Additional info for request parameters
ParameterReference
keyFor more information on how to generate the Key and Salt, refer to any of the following:

- Production: Generate Merchant Key and Salt

- Test: Generate Test Merchant Key and Salt
hashHash logic for this API is:
sha512(key|command|var1|salt)
sha512
Language
URL
Click Try It! to start a request and see the response here!