#syoxiss.
1 messages · Page 1 of 1 (latest)
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.
- syoxiss., 14 minutes ago, 17 messages
Hi there 👋 I'm not seeing anything in the code you shared that calls one of our functions which handles presenting the 3DS flow to the customer.
I see you mentioned you can't confirm on the frontend in your previous thread (good context to carry forward into other conversations). I'd recommend looking into using handleNextAction:
https://docs.stripe.com/js/payment_intents/handle_next_action
Yes, I originally used the code below:
if (paymentIntent.status === 'requires_action') {
return {
clientSecret: paymentIntent.client_secret,
requiresAction: true,
nextActionUrl: paymentIntent.next_action?.use_stripe_sdk?.stripe_js,
};
}
Because the 3d secure is handled by the front-end and it's just our back-end doing the confirmation. Because of that, I need a way to give the redirect url to the front-end so they can open an iframe and do the things they need to do for stripe 3d secure
Below is my payment_intent creation:
const paymentIntent = await this.stripe.paymentIntents.create({
amount: totalAmountInCents,
currency: 'aud',
payment_method: paymentMethodId,
confirmation_method: 'automatic',
confirm: true, // Automatically confirm the PaymentIntent
use_stripe_sdk: true, // Enable handling for 3D Secure
return_url: successUrl,
metadata: {
email: decryptedCustomerEmail,
order_id: order_id,
vendor_id: connectedVendorAccountId, // Assuming this is the ID you're using in metadata
referral_code: referralToken,
},
}, {
stripeAccount: connectedVendorAccountId, // Specify the connected account for direct charge
});
I don't think you want to use this parameter:
use_stripe_sdk: true, // Enable handling for 3D Secure
since it sounds like you want to handle the 3DS redirect yourself instead of letting our sdk handle it.