If you're using InertiaJS, the away()
approach won't work as seen on the inertiaJS github, they are discussing the best way to create a "external redirect" on inertiaJS, the solution for now is return a 409 status with X-Inertia-Location
header informing the url, like this:
return response('', 409)
->header('X-Inertia-Location', $paymentLink);
Where paymentLink is the link you want to send the user to.
SOURCE: https://github.com/inertiajs/inertia-laravel/issues/57#issuecomment-570581851