Instance Method

handle(intent:completion:)

Handles sending the payment request to the designated user.

Required.

Declaration

func handle(intent: INRequestPaymentIntent, completion: @escaping (INRequestPaymentIntentResponse) -> Void)

Parameters

intent

The intent object containing details about the user’s request. The information in this object has already been resolved and confirmed by your handler object.

completion

The handler block to execute with your response. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

response

The INRequestPaymentIntentResponse object containing the status of the request. This parameter must not be nil.

Discussion

Your implementation of this method must send the request to the designated user. The response object you provide should indicate the success or failure of delivering the request.

You specify the request details using an INPaymentRecord object, which you then include in your response object. For more information about configuring the response object, see INRequestPaymentIntentResponse.