#subhan_22659
1 messages · Page 1 of 1 (latest)
What's the specific issue
A return_url must be specified because this Setup Intent is configured to automatically accept the payment methods enabled in the Dashboard, some of which may require a full page redirect to succeed. If you do not want to accept redirect-based payment methods, set automatic_payment_methods[allow_redirects] to never when creating Setup Intents and Payment Intents.
Ok, then you need to pass return_url: https://stripe.com/docs/api/setup_intents/confirm#confirm_setup_intent-return_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Google bard give me this solution
is it fine
$setupIntent = $this->stripe->setupIntents->create([
'customer' => $customer,
'usage' => 'off_session',
'automatic_payment_methods' => [
'enabled' => true,
],
'return_url' => route('stripe.setup.intent.success')
]);
Did you try it? return_url needs to be an absolute URL, not a relative path
I've no idea what route('stripe.setup.intent.success') is
I am trying will update you in a while
however what should be my return_url according to you
A URL where you want to return your customer to after they complete any additional payment steps
Should it be mobile route or API webhook
'return_url'
It should be an absolute URL (https://your.website.com/return)
But I don't want to redirect it anywhere as Mobile developers opens sheet on basis of setupIntent creates
If you're using AutoPM, which you are, then it's required as the customer may checkout/pay using a PM which requires a redirect
can it be static website url
will it effect any flow
The URL to redirect your customer back to after they authenticate on the payment method’s app or site. If you’d prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter is only used for cards and other redirect-based payment methods.
So imagine a checkout flow, your customer is redirected to their bank to confirm/authenticate the payment. This is the URL that we will send them back to after they complete the confirmation/authentication
After setting return_url
$setupIntent = $this->stripe->setupIntents->create([
'customer' => $customer,
'usage' => 'off_session',
'automatic_payment_methods' => [
'enabled' => true,
],
'return_url' => 'https://cedrics.se'
]);
I got this msg
"message":"The parameter return_url cannot be passed when creating a SetupIntent unless confirm is set to true."
You pass it on confirmation
Should I pass it on $this->stripe->setupIntents->confirm($obj['id']);
Or any where else?
Yes
How please provide code modified
I already sent you the URL ☝️