## Cancel event `element.on(event: string, handler: function)` The `cancel` event is triggered when the payment interface is dismissed (e.g. the customer closes it). Note that in some browsers, the payment interface might be dismissed by the customer even after they authorize the payment. This means that you might receive a `cancel` event after receiving a `confirm` event. If you're using the `cancel` event as a hook for canceling the customer's order, make sure you also refund the payment that you just created. The following Checkout Elements support the `cancel` event: `expressCheckoutElement` and `checkoutForm`.