API to Generate Token using username/password

Generate a token by using the payout merchant username and password

Request Params

Key

Description

Data type

Mandatory

Possible Values

client_id

This is a public client id to be used by all payouts merchants.

Please note: you can use the same client id mentioned under ‘possible values’ column depending on the environment

String

yes

Production client_id : ccbb70745faad9c06092bb5c79bfd919b6f45fd454f34619d83920893e90ae6b Test client_id : 6f8bb4951e030d4d7349e64a144a534778673585f86039617c167166e9154f7e

grant_type

Constant value

String

yes

password

username

Registered mobile or email

String

yes

password

Registered Account password

String

yes

scope

Constant value

String

yes

create_payout_transactions

Example

Sample Request (in test env):

curl -X POST \
 https://uat-accounts.payu.in/oauth/token \
 -H 'cache-control: no-cache' \
 -H 'content-type: application/x-www-form-urlencoded' \
 -d 'grant_type=password&scope=create_payout_transactions&client_id=6f8bb4951e030d4d7349e64a144a534778673585f86039617c167166e9154f7e&username=payouttest4%40mailinator.com&password=Tester%40123&='

Sample Response :

Response Params

Key

Description

access_token

This is the security token. This will be used in further api calls

token_type

Type of token

expire_in

This is the TTL, Access token will get expired in return seconds.

refresh_token

This will be used to refresh the access_token. Api detail is given below

scope

Allowed scopes in generated security token eg the generated token can be used only for payout api requests

created_at

Time of creation in milliseconds

user_uuid

Unique identifier for the user. Read more about uuid here

Last updated

Was this helpful?