Accessing side click button for Test Automation

To authenticate Apple Pay payment through Mobile Test Automation via Face ID and a side button click if there is a way to automate a process involving Apple Pay where authentication could be performed using a software-based solution accessible through automation.

Is there any way to access the side click button programmatically, using XCTest?