Fetch Account Details

You might want to implement this if you to determine if a user (with a merchantUserId) is on PhonePe or not.

  1. Construct the URL as follows:
Java
String apiUrl = "/v3/account/" + <merchantId> + "/" + <merchantUserId> + "/summary";
  1. Select one of the salts shared with you and note it’s index. Construct the Checksum as follows:
Java
String checksum = sha256(apiEndPoint + salt) + ### + saltIndex;
  1. Construct the request as follows:
Java
let request = PPSFetchUserDetailsRequest( apiEndPoint: <#API-End point received by your server#>, checksum: <#Checksum received by your server#>) PhonePeSDK.shared().fetchUserDetails(for: request) { (originalRequest, result) in //Determine whether or not the merchant specific user is on PhonePe if result.isUserOnPhonePe { } } PPSFetchUserDetailsRequest *request = [[PPSFetchUserDetailsRequest alloc] initWithApiEndPoint:<#API-End point received by your server#> checksum:<#Checksum received by your server#>]; [[PhonePeSDK shared] fetchUserDetailsForRequest:request completion:^(PPSFetchUserDetailsRequest * originalRequest, PPSFetchUserDetailsResult * result) { //Determine whether or not the merchant specific user is on PhonePe if (result.isUserOnPhonePe) { } }];