Currently, it is not possible to create an embedded checkout without a redirect. Cashier sets a default value for return_url when ui_mode = 'embedded'. Stripe throws an error when return_url is set although redirect_on_compltition is set to never. It expects to not have a return_url parameter.
It should be possible to set ui_mode = 'embedded' and 'redirect_on_completion' => 'never'.
Cashier Stripe Version
14.14
Laravel Version
10.10
PHP Version
8.2
Database Driver & Version
No response
Description
Currently, it is not possible to create an embedded checkout without a redirect. Cashier sets a default value for
return_url
whenui_mode = 'embedded'
. Stripe throws an error whenreturn_url
is set althoughredirect_on_compltition
is set tonever
. It expects to not have a return_url parameter.It should be possible to set
ui_mode = 'embedded'
and'redirect_on_completion' => 'never'
.A quick fix in
Checkout.php
would be:Steps To Reproduce
$builder->checkout([ 'ui_mode' => 'embedded', 'redirect_on_completion' => 'never', ]);