Why does Stripe post data when changing pages?

Viewed 813

This is our first time using Stripe and we have noticed that Stripe makes a lot of requests to the m.stripe.com/4 url. This only happens when the URL changes, which it does a lot for our single page application.

This site is build with React using Stripe-Elements from here: https://stripe.com/docs/recipes/elements-react

Is this normal? Is there a way to op out of this kind of analytics gathering? I feel like a framework shouldn't be that aggressive on watching the user move around the site.

2 Answers

Stripe collects this data for fraud protection, but I agree with you that it should give site owners more control over what data they share.

As of @stripe/stripe-js v1.5.0, you can disable this behavior by setting {advancedFraudSignals: false}:

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

loadStripe.setLoadParameters({advancedFraudSignals: false})
const stripe = await loadStripe('pk_test_TYooMQauvdEDq54NiTphI7jx');

Note that disabling this feature increases your risk of receiving fraudulent transactions.

I wrote a more detailed blog post about this if you're interested in a more detailed discussion: https://mtlynch.io/stripe-recording-its-customers/

Those are requests containing behavioral events that Stripe tracks. Main reason is to provide data for Stripe Radar and prevent fraudulent requests before they can happen. You can't really turn them off as they are primarily for fraud detection (and in your best interest).

Related