#uriah-sanders_api

1 messages Β· Page 1 of 1 (latest)

neon auroraBOT
#

πŸ‘‹ 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.

hybrid steeple
#

hi there πŸ‘‹ taking a look

inner fiber
#

Thank you

hybrid steeple
inner fiber
#

I do expand it like so: const verificationSession = await stripe.identity.verificationSessions.retrieve(
verificationSessionId,
{ expand: ['verified_outputs'] }
);

hybrid steeple
#

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?

inner fiber
#

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
}

hybrid steeple
inner fiber
#

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?

hybrid steeple
#

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

inner fiber
#

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?

hybrid steeple
#

is this the latest verification session you created: vs_1RiTJcI1HNERQZgvo7XSOD8t?

inner fiber
#

Yes

hybrid steeple
#

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.

neon auroraBOT
#

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.
inner fiber
#

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?

hybrid steeple
#

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

inner fiber
#

I am logged in. I definitely dont see that option. I see a "contact support" option but it just opens a stripe chat assistant

hybrid steeple
inner fiber
#

I double checked the api key im using and it starts with rk_test

#

That takes me to the same page

hybrid steeple
#

I see that the requests were being made using: sk_test_******************3KbPsS

inner fiber
#

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?

hybrid steeple
#

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.

inner fiber
#

Okay I will try that, one sec

hybrid steeple
inner fiber
#

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.

hybrid steeple
#

Yup that's a permission issue. does your RK have write permission to create verification sessions?

inner fiber
#

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

hybrid steeple
#

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

inner fiber
#

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

hybrid steeple
#

gotcha

inner fiber
#

Thank you for your help

hybrid steeple
#

No worries, I got your case, I will follow up over email

inner fiber
#

Excellent, thank you

#

About how long will it take for you all to get back to me?

hybrid steeple
#

should be in the next few hours

#

is there anything else I can help in the meantime?

inner fiber
#

Okay I'll be looking forward to it
No there's nothing else

#

I might not be able to review it until tomorrow though

hybrid steeple
#

No worries, you can always follow up with our team over the email thread when you're available