Using $payload as array seems to be to much in this case. Depending on $method, this should be as simple as possible (in this case a scalar string).