#brandon-3ds

1 messages · Page 1 of 1 (latest)

dense pantherBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

#

brandon-3ds

crystal turret
#

Is there perhaps a mismatch between your keys?

worthy sonnet
#

This is the payment intent call on the server when using the 3D secure test card (4000002760003184).

        {
          ...paymentSettings,
          confirm: true,
          amount,
          currency,
          payment_method: updatedPaymentMethod.id,
          customer: updatedPaymentMethod.customer,
          mandate_data: {
            customer_acceptance: {
              type: 'online',
              online: {
                ip_address: req.ip,
                user_agent: req.get('user-agent'),
              },
            },
          },
        },
        {
          stripeAccount,
        },
      );

then I am calling

          confirmPaymentResponse.payment_intent_client_secret,
        );
crystal turret
#

Does the clientSecret you pass with handleCardAction() correspond to the PI that's in requires_action state?

worthy sonnet
#

let me double check

#

yep, it matches

#

is there any additional code I can give you? or perhaps a request id?

crystal turret
#

I see your server code is creating the PI on a connected account (stripeAccount). When you initialize Stripe on the frontend, are you passing stripeAccount as well?

worthy sonnet
#

this is what I'm doing on the FE:

this is in the parent component:

import { Elements } from '@stripe/react-stripe-js';
import { loadStripe } from '@stripe/stripe-js';

//config.stripe.key is our platform's test key
const stripePromise = loadStripe(config.stripe.key, {
  betas: ['elements_enable_deferred_intent_beta_1'],
});

<Elements stripe={stripePromise} options={stripeOptions}>
              <StripeCCHandler />
</Elements>

and this is in the child component:

  const stripeUaPaymentElement = useElements();
  const stripeUa = useStripe();
#

all the calls we're making on the server side are utilizing the stripeAccount id

crystal turret
#

Gotcha. I can take a look at the PaymentIntent ID if you have it but what appears to be happening here is the PI is being created on stripeAccount but your call to handle 3DS is being made on the platform

worthy sonnet
#

ohh I see..let me try passing in the stripeAccount id when initializing stripe on the FE

#

and for the paymentIntent ID, it's "pi_3OXX0IQDEinO45zO1kgTILw5"

#

but when I search for it in my stripe account, nothing comes up

#

oohhh...I found it...but I'm not sure which account it's in

crystal turret
#

Yep, this makes sense! While the PI is being created by your platform account, using/passing stripeAccount means that PI object lives on the connected account

worthy sonnet
#

so the PI should be on the connected account right? Not the platform account?

crystal turret
#

Correct, on the connected account. That explains why you can't search for it if you're logged into the Stripe Dashboard as the platform.

worthy sonnet
#

ok, I've added the stripeAccount to the loadStripe call now

  const stripePromise = loadStripe(config.stripe.key!, {
    betas: ['elements_enable_deferred_intent_beta_1'],
    stripeAccount: brand.stripeAccount,
  });
#

going to see if this works

#

looks like that worked! thank you for the help!