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

**URL:** <https://forum.shopware.com/t/how-to-identify-customer-redirects-to-checkout-page-from-an-external-page/98066>\
**Category:** Shopware 6 (English)\
**Tags:** general, programming\
**Created:** [18. Januar 2023 um 08:17 UTC](https://forum.shopware.com/t/how-to-identify-customer-redirects-to-checkout-page-from-an-external-page/98066 "2023-01-18T08:17:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wishva9](https://avatars.discourse-cdn.com/v4/letter/w/71c47a/32.png) [@wishva9](https://forum.shopware.com/u/wishva9)\
**Post date:** [18. Januar 2023 um 08:17 UTC](https://forum.shopware.com/t/how-to-identify-customer-redirects-to-checkout-page-from-an-external-page/98066/1 "2023-01-18T08:17:32Z")

</div>

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](http://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](http://www.example.com?redirectUrl=www.shop.com/checkout/confirm)

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

```auto
$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.
