#uriah-sanders_api
1 messages Β· Page 1 of 1 (latest)
π 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/1391995283042209852
π Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there π taking a look
Thank you
Could you try expanding verified_output [0] in your request body to /v1/identity/verification_sessions? it looks like the dob and id numbers are return under this parameter.
I do expand it like so: const verificationSession = await stripe.identity.verificationSessions.retrieve(
verificationSessionId,
{ expand: ['verified_outputs'] }
);
You can actually expand it in your POST call when you create the verificationSession.
if you expand it when retrieving a Verification Session, do you not get date of birth and id too?
By expand it when i create it do you mean in this code:
const verificationSession = await stripe.identity.verificationSessions.create
({
type: 'document',
provided_details: {
email: req.session.user.email,
},
metadata: {
user_id: req.session.user._id.toString(),
},
options: {
document: {
allowed_types: ['driving_license', 'passport', 'id_card'],
require_id_number: true,
require_live_capture: true,
require_matching_selfie: true
}
}
});
No i'm not getting date of birth or id. This is what i get:
Verified outputs: {
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main St.",
"line2": "Apt 567",
"postal_code": "94111",
"state": "CA"
},
"email": null,
"first_name": "Jenny",
"id_number_type": "us_ssn",
"last_name": "Rosen",
"phone": null
}
Yes, i meant adding expand: [] in .create()
For the Verified Outputs body you shared, can you share with me the verification session ID that was retrieved? We're not able to see response body of GET API calls, so I will need the specifics
Sure. and okay ill try that. The session ID is:
vs_1RiSfVI1HNERQZgvnJmAluz6
I get this error: Error: Stripe: Unknown arguments ([object Object]). Did you mean to pass an options object?
With the code:
const verificationSession = await stripe.identity.verificationSessions.create
({
type: 'document',
provided_details: {
email: req.session.user.email,
},
metadata: {
user_id: req.session.user._id.toString(),
},
options: {
document: {
allowed_types: ['driving_license', 'passport', 'id_card'],
require_id_number: true,
require_live_capture: true,
require_matching_selfie: true
}
}
}, {
expand: ['verified_outputs'] // Add expansion as second parameter
});
How do I grant my restricted test API key permission to read id_number and dob fields from verified_outputs?
Do I need to enable 'sensitive data access' or 'PII access' for my restricted key?
Hmm let me see.. I do not think this is an issue with restricted keys because you would run into a permission error if it has to do with key's permission
Oh I changed the code to this and I no longer get the error. But I still don't get the date of birth and id fields.
const verificationSession = await stripe.identity.verificationSessions.create
({
type: 'document',
provided_details: {
email: req.session.user.email,
},
metadata: {
user_id: req.session.user._id.toString(),
},
options: {
document: {
allowed_types: ['driving_license', 'passport', 'id_card'],
require_id_number: true,
require_live_capture: true,
require_matching_selfie: true
}
},
expand: ['verified_outputs']
});
Maybe it's a feature that doesn't work in test mode?
is this the latest verification session you created: vs_1RiTJcI1HNERQZgvo7XSOD8t?
Yes
Hmm yeah I can see that it is null in req_Qz5JT44A0cZ0rI
I will need some time to look into this with my team. Would you mind if we work on this over email? I will drop you a dm to create a support case directly with us.
Hello @inner fiber, we have sent you a direct message, please check it at https://discord.com/channels/@me/1392003342263255052
- πThe message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
Okay sounds good
The link just takes me to help articles. I don't see an option to open a ticket.
Can you send me an email at uriahsanders99@gmail.com?
are you logged into your Stripe account? You should see an option to create a support case on the right side
Also @inner fiber, you might want to be sure you are using restricted key instead of a secret key. I look into the Stripe account logs and noticed that req_uUhL8DzXcMCi68 and req_Qz5JT44A0cZ0rI are made using a secret key
I am logged in. I definitely dont see that option. I see a "contact support" option but it just opens a stripe chat assistant
I see, that's strange. What if you try this link: https://support.stripe.com/?contact=true
I double checked the api key im using and it starts with rk_test
That takes me to the same page
I see that the requests were being made using: sk_test_******************3KbPsS
tbh i was trying to open a ticket but the discord server is all I could find
I did make one request using a restricted live key before I realized I could make a restricted test key
But the ones I sent you were made using rk_test
Do i have to use rk_test when I create the session?
Im only using it when i retrieve it
It's true that i"m using sk_test when i create it
Do i use rktest for both creation and retrieval or just one?
right, after you specify that I do see you're using restricted key with .retrieve(). But if you are expanding in the creation call, you will need to create with a restricted key as well for the values to return I believe.
Okay I will try that, one sec
Also this page might be helpful: https://docs.stripe.com/identity/access-verification-results
I get: StripePermissionError: The provided key 'rk_test_*********************************************************************************************W5zoxy' does not have the required permissions for this endpoint on account 'acct_1OVNjaI1HNERQZgv'. Having the 'rak_identity_product_write' permission would allow this request to continue.
Yup that's a permission issue. does your RK have write permission to create verification sessions?
No i think it only has read for that. I'll change that and try again
Okay the request went through but the fields are still missing
ID: vs_1RiTdbI1HNERQZgvelRGueh3
Yes I looked at that page when first getting started
Okay thank for trying, I saw the creation request on my end: req_raoAdhYcONP1tt. I will check with my team if this has something to do with being in test mode.
As for creating a case with us, could you indicate your preference to talk to an agent in Stripe AI assistance? It should give you the option to select your Stripe account and the topic you need support for
I'll let my team know about the friction in contacting our support team as well. Sorry about that
Oh I see now, I was supposed to select platform account. I saw the same page and didn't read the chat text I just assumed it was the same. I apologize
I created a support case
gotcha
Thank you for your help
No worries, I got your case, I will follow up over email
should be in the next few hours
is there anything else I can help in the meantime?
Okay I'll be looking forward to it
No there's nothing else
I might not be able to review it until tomorrow though
No worries, you can always follow up with our team over the email thread when you're available