resolvePayee(for:with:)
Called when you need to resolve the recipient of the funds.
Declaration
optional func resolvePayee(for intent: INSendPaymentIntent, with completion: @escaping @Sendable (INPersonResolutionResult) -> Void)optional func resolvePayee(for intent: INSendPaymentIntent) async -> INPersonResolutionResultParameters
- intent:
The intent object containing details about the user’s request. Use this object to get the initial information, if any, provided by the user.
- completion:
The block to execute with the resolution. You must execute this block at some point during your implementation of this method. This block has no return value and takes the following parameter:
- resolutionResult
The resolution result object containing your proposed resolution. For successful resolutions, create a resolution object whose value is the Inperson object containing detailed information about the user you identified. This parameter must not be
nil.
Discussion
Use this method to verify the identity of the intended recipient. Use the provided payee information in the intent object to locate the corresponding user in your app. Always strive toward a successful resolution to a specific user, but feel free to ask for confirmation of the selected user if there is some uncertainty.
If multiple users match the provided payee information, you might ask for disambiguation of the most likely candidates. When disambiguating users, provide as few choices as possible. If you find more than five possible users, consider a different resolution.