How to identify customer redirects to checkout page from an external page?

Hello Everyone,
I am working on a custom payment plugin and using a class by exteding
„SynchronousPaymentHandlerInterface“ for the payment methods.

In there I am sending auth API request and sometimes I need to redirect the customer to the external page for further authorize.

Let’s say this external page is www.example.com and I need to send an URL to redirect the customer back to the checkout as well

then I can redirect the customer Example Domain

I have no issues when directing the customer to this external page.
I use below function for that

$response = new \Symfony\Component\HttpFoundation\RedirectResponse($link);
$response->setStatusCode(302);
$response->send();

but the problem is to detect that whether customer is redirected to again to the checkout page.
because I need to stop the execution of the functions untill customer comes back. But I have a time frame like 5 mins. if the customer does not redirect within 5 mins, this order will be failed or enter to a in progress state.

Can anyone guide me in this case? what are the possible methods that I can use to achieve this task.

Thank you in advance.