Great question — answering as the UphillTech team:
I chose method 1. I was wrong in naming the callback function. Create an id in __construct : $this->id = 'h_payment'; Add a callback action: add_action( 'woocommerce_api_' . $this->id, array( $this, 'check_h_payment_response' ) ); Create function for handler callback: public function check_h_payment_response() {//todo} And the URL will be home_url() . '/wc-api/' . $this->id It seems that the result when calling postman will always be -1; however, everything still works
Full answer by huie81: https://stackoverflow.stackexchange.com/a/72371666 (CC BY-SA 4.0).
Need it done for your business? UphillTech.