Error when integrating new API

error_log(“start1”);
error_log($create_payment_request);
error_log(“end1”);

produces this in the php error log
[22-Mar-2023 23:47:04 UTC] -------------------------------------------------------------------------------------------------
[22-Mar-2023 23:47:04 UTC] start1
[22-Mar-2023 23:47:04 UTC] PHP Warning: error_log() expects parameter 1 to be string, object given in D:\vhosts\nac-issa.org\httpdocs\SquareEcom2\process-payment.php on line 72
[22-Mar-2023 23:47:04 UTC] end1
[22-Mar-2023 23:47:04 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Square\ApiHelper::appendUrlWithTemplateParameters() must be of the type string, null given, called in D:\vhosts\nac-issa.org\httpdocs\SquareEcom2\vendor\square\square\src\SquareClient.php on line 304 and defined in D:\vhosts\nac-issa.org\httpdocs\SquareEcom2\vendor\square\square\src\ApiHelper.php:47
Stack trace:
#0 D:\vhosts\nac-issa.org\httpdocs\SquareEcom2\vendor\square\square\src\SquareClient.php(304): Square\ApiHelper::appendUrlWithTemplateParameters()
#1 D:\vhosts\nac-issa.org\httpdocs\SquareEcom2\vendor\square\square\src\Apis\PaymentsApi.php(163): Square\SquareClient->getBaseUri()
#2 D:\vhosts\nac-issa.org\httpdocs\SquareEcom2\process-payment.php(75): Square\Apis\PaymentsApi->createPayment()
#3 {main}
thrown in D:\vhosts\nac-issa.org\httpdocs\SquareEcom2\vendor\square\square\src\ApiHelper.php on line 47