#diane_best-practices

1 messages · Page 1 of 1 (latest)

zenith iglooBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1433835750021009562

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

carmine kernel
#

• What’s the recommended cooldown or delay between allowing users to create new sessions — e.g., to avoid 5–6 rapid session creations?
• When a session ends with requires_input or error, what’s the expected pattern — should I let the user restart the flow, or show the error to them and they stay unverified? also all error states are user_input_required yeah? theres no verification failed state?
• Is there a way to manually review or update a session’s status (approve/reject) from the Stripe Dashboard for testing or edge cases?

gritty crescent
carmine kernel
#

Understood, but only my backend can listen correct? From the client side, Apart from presenting sheet, rest of the things ill talk to my backend about?

#

also What’s the recommended cooldown or delay between allowing users to create new sessions — e.g., to avoid 5–6 rapid session creations?

#

also all error states are user_input_required yeah? theres no verification failed state

#

And i cant listen to these events from the react native SDK correct?

gritty crescent
#

Yes, that is correct.

Can you say more about 'also What’s the recommended cooldown or delay between allowing users to create new sessions — e.g., to avoid 5–6 rapid session creations?' If you created the session and collected the data, why would you want this again?

also all error states are user_input_required yeah? theres no verification failed state

You can look at the error codes here: https://docs.stripe.com/identity/handle-verification-outcomes#event-error-codes

And i cant listen to these events from the react native SDK correct?

No, that comes from your server side: https://docs.stripe.com/identity/handle-verification-outcomes#create-webhook

carmine kernel
#

In case user cancels it and restarts it multiple times/we let them restart due to say document expired and how to essentially make sure user has only valid sesion at a time? is that provided by Stripe out of the box or something we have to handle?

#

and My backend does NOT need to store the session details yeah? It can say create a session for me and later use webhooks to update appropriate tables and not keep the session details?

gritty crescent
#

Yes, you can listen to events and can choose to store that data on your end.

#

What does 'and how to essentially make sure user has only valid sesion at a time' mean exactly? Sorry, I read this a few times but I do not fully follow

carmine kernel
#

Let’s say user creates a session and cancels it by closing the sheet, and restarts it, we should make sure the previous one is cancelled, and I think stripe handles it with web hooks. But if the user does it multiple times how to handle that? Does the API have a too many requests handler or should that be on my backend?

zenith iglooBOT
carmine kernel
#

Also I wasn’t able to run the example project

gritty crescent
#

what do you need handle about it? Each session will send events on the outcome right?

carmine kernel
#

So essentially what you’re saying is user can create any number of sessions and we store the details of the latest web hooks updates?

gritty crescent
#

Yes. I highly reccomend that you test this on your end using your Sandbox/ test API key

#

We'll be here if you have any follow-up questions/ run into issues after it

carmine kernel
#

I wasn’t able to run the app

#

Example one

upbeat dew
#

👋 shift change, I'll be taking over the thread 🙂 just reading through.

#

Do you have a link to the example you were testing?

carmine kernel
upbeat dew
#

are you testing ios or android?

carmine kernel
#

ios

upbeat dew
#

what is the error you are encountering when you try to run the app?

carmine kernel
#

will share the errors, one second. I think some of them i solved were it required the ios-deploy package and

Could not find a declaration file for module 'react/jsx-runtime'. '/Users/l-/Downloads/stripe-identity-react-native-main/example/node_modules/react/jsx-runtime.js' implicitly has an 'any' type.
Try npm i --save-dev @types/react if it exists or add a new declaration (.d.ts) file containing `declare module 'react/jsx-runtime';

currently facing this

heres the package.json

{
"name": "stripe-identity-react-native-example",
"description": "Example app for stripe-identity-react-native",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"postinstall": "bash scripts/postinstall.sh"
},
"dependencies": {
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.1",
"@stripe/stripe-identity-react-native": "^0.4.0",
"react": "18.2.0",
"react-native": "0.73.9",
"react-native-dropdown-select-list": "^2.0.4",
"react-native-radio-buttons-group": "^3.0.2",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "3.29.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.73.21",
"@react-native/metro-config": "0.73.5",
"@types/jest": "^27.4.1",
"babel-plugin-module-resolver": "^4.0.0",
"detox": "^19.5.7",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.8"
}
}

IdentityVerificationSheetOptions,
Cannot find module '@stripe/stripe-identity-react-native' or its corresponding type declarations.ts(2307)

Theres multiple of these error unfortunately.

#

and also this one.

#

Looks like the example handles installs with the Podfile where as it doesnt install the actual react native SDK and when i try to add it, theres a conflict

upbeat dew
#

spinning up a copy of the example now to test.

carmine kernel
#

Ok, let me know

bold hawk
#

really sorry for the delay here, we have someone more familiar with RN looking into it

frank flame
#

Hello 👋
Can you share the exact commands you've run after cloning the example?

carmine kernel
#

cd example
Yarn
cd iOS && pod install && pod update Stripe Identity
cd ..
yarn iOS

frank flame
#

Are pod install and pod update commands completing successfully?

carmine kernel
#

yes

#

the app runs but this is what i see.

in the Identity.tsx file

frank flame
#

I see.. I'm trying to check if I can reproduce.. It's possible the example app is incorrectly importing/linking the SDK

#

and you get that error as soon as the app runs right?

carmine kernel
#

yes

frank flame
#

Can you try adding an explicit @stripe/stripe-identity-react-native dependency in your package.json ?

"dependencies": {
  "@stripe/stripe-identity-react-native": "0.4.0",
  ...
}

and run yarn & cd ios && pod update ?

carmine kernel
#

Already done, theres a conflict if i do that in Podfile and package.json

frank flame
#

gotcha.. hmm

carmine kernel
#

heres the error:

[!] There are multiple dependencies with different sources for stripe-identity-react-native in Podfile:

  • stripe-identity-react-native (from ../node_modules/@stripe/stripe-identity-react-native)
  • stripe-identity-react-native (from ../..)
frank flame
#

You can comment out line 33 in the Podflie

zenith iglooBOT
frank flame
#

lmk if that fixes it

carmine kernel
#

nope 🙁

frank flame
#

what error do you see?

carmine kernel
#

error: Error: Unable to resolve module @babel/runtime/helpers/interopRequireDefault from /Users/_/Downloads/stripe-identity-react-native-main/src/functions.ts: @babel/runtime/helpers/interopRequireDefault could not be found within the project.

1 | import StripeIdentityReactNative from './StripeIdentitySdk';
| ^
2 | import type {
3 | IdentityVerificationSheetOptions,
4 | IdentityVerificationSheetResult,
at ModuleResolver.resolveDependency (/Users/lokeswari/Downloads/stripe-identity-react-native-main/example/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:139:15)
at DependencyGraph.resolveDependency (/Users/lokeswari/Downloads/stripe-identity-react-native-main/example/node_modules/metro/src/node-haste/DependencyGraph.js:232:43)
at /Users/lokeswari/Downloads/stripe-identity-react-native-main/example/node_modules/metro/src/lib/transformHelpers.js:156:21
at resolveDependencies (/Users/lokeswari/Downloads/stripe-identity-react-native-main/example/node_modules/metro/src/DeltaBundler/buildSubgraph.js:42:25)
at visit (/Users/lokeswari/Downloads/stripe-identity-react-native-main/example/node_modules/metro/src/DeltaBundler/buildSubgraph.js:83:30)
at async Promise.all (index 0)
at async visit (/Users/lokeswari/Downloads/stripe-identity-react-native-main/example/node_modules/metro/src/DeltaBundler/buildSubgraph.js:92:5)

frank flame
#

Hmm sorry I'm trying but I am having trouble with my dev environment.. I can't even get the app to run..
I'm going to have to convert this into a support case

zenith iglooBOT
#

Hello @carmine kernel, we tried to send you a direct message, but couldn't

  • 🔗 We would like to send you a message that has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
  • Please enable direct messages from members of this Discord server (please see the instructions here) and let us know so we can try again!
frank flame
#

Can you check if you've received a DM with a link to open a support case?

carmine kernel
#

enabled direct DMs, can you resend now?

zenith iglooBOT
#

Hello @carmine kernel, we have sent you a direct message, please check it at https://discord.com/channels/@me/1433874053839454346

  • 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
frank flame
#

Check now?

#

I was able to launch the app without that error