The reason you aren't able to json_decode($response)
is because $response
is an object, not a JSON string.
The Pin-PHP library will automatically decode all requests for you, as per https://github.com/noetix/pin-php/blob/master/src/Pin/Handler.php#L87
To see if the response has been successful, use the response object as an object:
if ($response->response->success) {
echo "Success!";
} else {
echo "Failed :(";
}