How to implement an offisite payment (Mollie) in the ShopAPI?

What is a best-practice to add the payment redirection when reaching complete_checkout endpoint? I’m trying to work this out with the Mollie plugin for Sylius.

I’m trying to somehow obtain a token, redirect to Mollie payment page and get back with a response but I have no idea how to achieve this in the API.

Can anyone help me?


you will have to run similar logic to this and return the URL to redirect in response API

and you’ll need to change the redirect URL here