#d_rahul
1 messages · Page 1 of 1 (latest)
hi! is that causing a specific problem? There are some resources we have to load yes, and we send some requests for tracking metrics or reporting signals(https://stripe.com/docs/disputes/prevention/advanced-fraud-detection) so it's normal for there to be various requests in the Network tab.
hi @dusky jacinth thanks for getting back, yes the fraud detection requests are fine , but isnt 500 request too much, it seems like as soon as we add any new configuration like autocomplete, it keeps on increasing
I can't really comment on if it's "too much". Let me know if there's a specific problem or customer-facing issue!
Our checkout page load is between 330 and 400 network requests (and 30MB of resources), about 30 of those are our resources, the rest are from Stripe and Stripe dependencies, we think this is unexpected. When looking at the requests, we can see that Stripe elements are being loaded twice, with all their dependencies being loaded again (like Google Maps for auto complete, Recaptcha, etc).
In production we're facing a few problems that appear related:
- For customers outside of desktops with high speed US/EU (close to our data centre), that's creating significant performance impact which will ultimately affect conversion rates.
- Our event listeners (Google Tag Manager) which bind to elements seem to only fire about half of expected events on Checkout. This could be Ad blockers or some other bug, but given the elements are duplicated, it seems related.
- Things like recaptcha are loaded multiple times (in one instance there were 30 recaptcha API calls for a checkout). There seems to be a race condition from the elements loading multiple times. We're concerned that users / transactions will be flagged as bot or automated and either can't complete checkout or payments get blocked, when in fact it's due to this bug with elements loading multiple times.
We made a minimal reproduction with just the Address element, and that displayed an issue with the element loading multiple things despite only being initialised and called once
`<body>
<div id="address-element"></div>
<script src="https://js.stripe.com/v3/"></script>
<script>
const clientSecret = 'pi_3O7y0UJ6tCgvww7d0HHk95tJ_secret';
const Stripe = window.Stripe("pk_test_51KEE");
const stripeElements = Stripe.elements({ appearance: {}, clientSecret });
function addressElement() {
const addressElements = stripeElements.create("address", {
mode: 'shipping',
autocomplete: {
mode: "google_maps_api",
apiKey: ''
}
});
addressElements.mount('#address-element');
}
addressElement();
</script>
</body>`
I'd suggest writing an email into https://support.stripe.com/?contact=true with links to your reproduction and other context to get a support ticket opened
Sure will do that, any initial thoughts from yourself?
also we are facing an other issue with the google pay and apple pay in payment element when we are updating price in payment intent the prices are not correctly appear with Google pay and Apple Pay Ui but it's deducting correctly.
you have to call https://stripe.com/docs/js/elements_object/fetch_updates to tell the PaymentElement that you have changed the PaymentIntent in the backend, and that way it will know the new amount it should show in the wallet popups.