Recreate Connect API GetPayment to get transaction details

I’m trying to replicate the following deprecated connect api code with the new Payments API & square-php-sdk.
How would I replicate this?

function getSquarePayment ($locationIds, $paymentId){
$apiClient = getApiClient();
$apiInstance = new SquareConnect\Api\PaymentsApi($apiClient);
try {
$result = $apiInstance->getPayment($paymentId);
} catch (Exception $e) {
echo 'Exception when calling PaymentsApi->getPayment: ', $e->getMessage(), PHP_EOL;
exit (1);
}
return $result->GetPayment();
}

I see that the migration documentation states The Transactions API ListTransactions response includes cash and other payments that the Payments API ( ListPayments endpoint) does not return. You can retrieve those using the SearchOrders endpoint.. However, we don’t use orders. Our orders area is empty in Squareup dashboard. We use Square for Retail. So all of our stuff is in transactions and invoices. So when I try the SearchOrders enpoint, I get zero results, as expected. How then am I supposed to list transactions (for the transactions that are listed in squareup.com) from the SearchOrders API?

Can you provide me with a detailed example?
Thanks!