#cint_09444_07742

1 messages · Page 1 of 1 (latest)

stable joltBOT
drifting marsh
#

Hello! Can you provide more details? Are you using Payment Element? If so, can you share your stripe.confirmPayment code?

grave viper
#

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

drifting marsh
#

Are you testing in live mode?

grave viper
#

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,
      },
    },
  },
}
drifting marsh
grave viper
#

yes, here it is: req_9f7DSjdeXPWeVn

drifting marsh
grave viper
#

What do you mean by confirmed?

drifting marsh
#

In your request you have confirm set to true. That's not typically recommended.

#

You should be confirming client-side if possible.

grave viper
#

Ahaa.. okay, let me check and try it.
Question: what does actually the confirm boolean parameter do here?

drifting marsh
#

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.

grave viper
#

ahaa okay. is it also the same case for paypal/ other payment methods?

drifting marsh
#

Generally yes, we recommend client-side confirmation across the board. It makes the flow a lot easier, smoother, and simpler.

stable joltBOT
grave viper
#

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.

drifting marsh
grave viper
#

ah alright. i will try it out.
i wonder why this did not happen in the test environment

drifting marsh
#

You probably didn't use a test card that triggered 3DS?

grave viper
#

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