Contents

handle(intent:completion:)

Handles scheduling payment of the bill.

Declaration

func handle(intent: INPayBillIntent, completion: @escaping  @Sendable (INPayBillIntentResponse) -> Void)
func handle(intent: INPayBillIntent) async -> INPayBillIntentResponse

Parameters

  • intent:

    The intent object containing details about the user’s request. Your handler object has already resolved and confirmed the information in this 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 Inpaybillintentresponse object containing the status of the request. This parameter must not be nil.

Discussion

Your implementation of this method must schedule payment of the specified bill using the information in the intent object. The response object you provide should include the transaction details and indicate whether or not scheduling of the transaction was successful.

When configuring your response object, you specify the bill details and the user account to transfer the money from. You also specify the scheduled transaction date for the payment. The successful scheduling of a payment means that your service has recorded the transaction details and scheduled the payment for the specified date.