You might want to implement this if you to determine if a user (with a merchantUserId) is on PhonePe or not.
- Construct the URL as follows:
String apiUrl = "/v3/account/" + <merchantId> + "/" + <merchantUserId> + "/summary";
- Select one of the salts shared with you and note it's index. Construct the Checksum as follows:
String checksum = sha256(apiEndPoint + salt) + ### + saltIndex;
- Construct the request as follows:
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) {
}
}];