#cint_09444_07742
1 messages · Page 1 of 1 (latest)
Hello! Can you provide more details? Are you using Payment Element? If so, can you share your stripe.confirmPayment code?
Hi @drifting marsh yes, i'm using StripeElements js library. And i only created the payload to create setup intent
@drifting marsh i edited my first message for more details
Are you testing in live mode?
in test mode everything was okay. now that i'm turning on and migrate to live mode. this problem appears
here is my payload for create setupintent
{
confirm: true,
customer: stripe_customerid,
payment_method: paymentMethodId,
return_url:
returnUrl.replace(/\?.*$/, "") +
"?customer_id=" +
encodeURIComponent(customer.id) +
"&storedCart=" +
encodeURIComponent(JSON.stringify(storedCart))
use_stripe_sdk: true,
mandate_data: {
customer_acceptance: {
type: "online",
online: {
ip_address: ip,
user_agent: userAgent,
},
},
},
}
Can you give me the request ID showing the Setup Intent creation? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
yes, here it is: req_9f7DSjdeXPWeVn
You confirmed this server-side. After this request did you take the client secret, pass it to your frontend, and call stirpe.handleNextAction? https://stripe.com/docs/js/setup_intents/handle_next_action
What do you mean by confirmed?
In your request you have confirm set to true. That's not typically recommended.
You should be confirming client-side if possible.
Ahaa.. okay, let me check and try it.
Question: what does actually the confirm boolean parameter do here?
It confirms the Setup Intent, meaning it tried to perform the setup.
It triggers the setup process, which in turn can trigger things like 3D Secure.
That's the kind of thing that we recommend you handle client-side, so the customer can handle 3DS and whatnot, but you're confirming server-side which is possible, but atypical.
ahaa okay. is it also the same case for paypal/ other payment methods?
Generally yes, we recommend client-side confirmation across the board. It makes the flow a lot easier, smoother, and simpler.
but then we can't give return URL if we sent confirm param as false?
i just tried it and got this error:
setup_intent_invalid_parameter
The parameter return_url cannot be passed when creating a SetupIntent unless confirm is set to true.
You set the return_url client-side, in stripe.confirmSetup: https://stripe.com/docs/js/setup_intents/confirm_setup#confirm_setup_intent-options-confirmParams-return_url
ah alright. i will try it out.
i wonder why this did not happen in the test environment
You probably didn't use a test card that triggered 3DS?
Hmm i'm pretty sure i did. and it simulated the 3ds popup, and from the setupintent i got directly a succeeded status from the create setupintent