Single Sign-On (Service)

This service gives a merchant the PhonePe's user details corresponding to a grant 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 NameHeader Value
X-VERIFYSHA256(only base64 encoded str+ "/v3/service/access" + salt key) + ### + salt index
  "merchantId": "merchantId",  
  "grantToken": "GRTXXXXX" 
  "request": "ewoJIm1lcmNoYW50SWQiOiAibWVyY2hhbnRJZCIsICAKICAgICAgICAiZ3JhbnRUb2tlbiI6ICJHUlRYWFhYWCIgCn0K"

Request Parameters

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique MerchantID assigned to the merchant by PhonePeYes
grantTokenSTRINGUnique grantToken generated by the call to fetchGrantToken as mentioned in the last section Get Grant Token (User Details)Yes

Response Parameters

Parameter NameTypeDescription
successBOOLEANSuccess status of the request
codeENUMSee list of response codes below
dataObjectThe data object that has to be passed to the sdk.

Response Codes

UNAUTHORIZEDThe grantToken provided is either invalid or not mapped to the merchant.
BAD_REQUESTInvalid request payload
INTERNAL_SERVER_ERRORSomething went wrong
Click Try It! to start a request and see the response here!