This API gives a merchant the PhonePe’s user details corresponding to an access token. This can be used to facilitate Single Sign-On in the merchant’s system as the user details have already been verified by PhonePe.
Request Headers
Header Name
Header Value
Content-Type
application/json
Authorization
O-Bearer <merchant-auth-token>
X-CLIENT-ID
Unique MID(shared by Phonepe) needs to be sent as a parameter unless a different value is shared by PhonePe team. In case of aggregator, please send AppuniqueID in the header
Response Parameters
Parameter Name
Type
Description
success
BOOLEAN
Success status of the request
code
ENUM
See list of response codes below
data
Object
The data object that has to be passed to the sdk.
Response Codes
Code
Description
UNAUTHORIZED
The grantToken provided is either invalid or not mapped to the merchant.
BAD_REQUEST
Invalid request payload
AUTHORIZATION_FAILED
Incorrect Authorization header
INTERNAL_SERVER_ERROR
Something went wrong
API_RATE_LIMIT_REACHED
If the API call limit is breached then HTTP status code 429 would be sent