#volco

1 messages · Page 1 of 1 (latest)

slate pierBOT
deft reef
#

Hi there!

#

Are you trying to load Stripe on the Frontend? Are you using plain JavaScript or React or something else?

viral peak
#

Yes loading Stripe on the frontend, using typescript

#

I tried on vanilla js as well but had the same issue. Just confused if Im missing something

deft reef
#

In the documentation we recommend doing const stripe = require('stripe')('pk_xxx');. Have you tried this?

viral peak
#

Are the stripe definitions on definitelyTyped maintained by Stripe in any official capacity or unaffiliated?

deft reef
#

What us definitelyTyped? Can you share a link?

viral peak
#

Stripe type definitions for typescript

deft reef
#

This is not maintained by Stripe, so I have no idea.

viral peak
#

Got it, thanks. I think thats where some of my confusion comes from

#

Can you link the documentation which has setup using const stripe = require('stripe')('pk_xxx')?

deft reef
#

Sorry I was wrong earlier (I mixed Stripe.js and stripe-node). The way to lead Stripe.js is actually: var stripe = Stripe('pk_test_xxxx');, as mentioned here https://stripe.com/docs/js/initializing

viral peak
#

Do you know what the difference is between loading it that way compared to loading it as described in the npm package? Theoretically, the loaded instances should be using the same library?

viscid pasture
#

Hi! I'm taking over my colleague. Please, give me a moment to catch up.

viral peak
#

Hi vanya, thanks! Sorry if anything wasn't clear, I don't think I described my issue the best

viscid pasture
#

What's the 2 ways of loading in question?

viral peak
viscid pasture
viral peak
#

When I load the stripe instance the two different ways, different libraries are being pulled up. The first one is missing createRadarSessions functionality

#

I just wanted to check that theoretically, they should be getting the exact same functions

viscid pasture
#

I believe the npm package (loadStripe()) contains all the functionality, while, if you include a script (Stripe()), some modules are loaded separately, to save bandwidth. Let me double check

viral peak
#

Ah I see, that would explain it

viscid pasture
#

Hm, but I don't see any extra scripts you need to load to use Radar. What's the exact error you're getting?

viral peak
#

There's no error, I just don't have access to those functions - they're not defined

viscid pasture
viral peak
#

Yeah haha that's what I was trying to do but it wasn't working. I think this issue may be related to that DefinitelyTyped library I mentioned in the beginning being loaded in. I'll do more debugging on my end, thanks for looking into it!

#

I have one last question

#

What is the difference between the signals collected by advanced fraud signals and the information collection by radar sessions?

viscid pasture
viral peak
#

In other words, is there any data that radar sessions collects that isn't collected automatically by the stripe.js script?

viscid pasture
viral peak
#

Got it, thanks!

#

You've been really excellent, I truly appreciate it

viscid pasture
#

Thanks! Happy to help. Please, let me know if you have any other questions.