#eudemon123
1 messages ยท Page 1 of 1 (latest)
I believe you'd only be able to get that if you're working with custom accounts - you'd retrieve the account and check individual (https://stripe.com/docs/api/accounts/object#account_object-individual)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok probably I found needed information but...
local.ERROR: The provided key 'sk_test_*********************************************************************************************xxxxx' does not have the required permissions for this endpoint on account 'acct_xxxxxxxDtxsO'. Having more permissions would allow this request to continue. {"exception":"[object] (Stripe\Exception\PermissionException(code: 0): The provided key 'sk_test
person = $this->stripeClient->accounts->allPersons(
$stripeAccountId,
['limit' => 1]
);
this is what I got when i'm calling this endpoint
I need full access (read write) to attach a file with ID to person
the only data what I need is personID
Can you share the account ID thatyou're trying to retrieve so I can take a closer look?
Can you log $stripeAccountId and make sure it's the value you expect? From what I can see on the reqeusts on our end it doesn't look like you're passing in acct_1NInpMRibOALOj9C for that
take your time
i tested it
acct_1NInpMRibOALOj9C
dd($stripeAccountId);
$report = $this->stripeClient->identity->verificationReports->retrieve($verificationReportId);
$person = $this->stripeClient->accounts->allPersons(
$stripeAccountId,
['limit' => 1]
);
dd($person);
now I'm disabling first dd
got it o_O how it's possible ?
could you share me the last account id before current request ?
need to test is it some caching issue
With the last failing request I was looking at you were either passing in acct_1LPoecDL2LaDtxsO or an empty string (which will default to running the request on the account that owns the keys used for the request)
ok thx
another question
almost it works but is it possible to change a file purpose parameter ?
or create new one based on existing file ?
just I want to avoid downloading and uploading agian
That file was not uploaded with the correct purpose parameter. Try uploading a new file with a valid purpose: identity_document, document_provider_identity_document. {"exception":"[object] (Stripe\Exception\InvalidRequestException(code: 0): That file was not uploaded with the correct purpose parameter. Try uploading a new file with a valid purpose: identity_document, document_provider_identity_document. at /var/www/html/vendor/stripe/stripe-php/lib/Exception/ApiErrorException.php:38)
we already have this file on verification report
Hi there ๐ jumping in as my teammate needed to step away. I don't believe so, I'm not seeing an endpoint for updating a File, nor am I seeing a field for creating a File that allows you to reference another File object.
ok so I see I need to download this file first :/
identity_document_downloadable
sorry not here
but please confirm that I can download files with this purpose - sorry just I'm so tired but I need to finish that integration ๐
and want to avoid stupid problems ;P
Sorry, download files from where?
If the question is what file purpose should be used when uploading these files, then I would recommend using one of the purpose values provided in the error message you encountered.
ok once again
let's assume that we have verified and closed verification session.
From there we can get an verification_report what's contain a document file with purpose parameter = 'identity_document_downloadable'
now there is a case - can I easily access to this file content, to download it to our backend and upload it again with other purpose parameter and assign to person object? we need to make a verification process automatically.
Thank you for that clarity. So looking at how to download file contents:
https://stripe.com/docs/file-upload#download-file-contents
File objects that are downloadable will have a non-null url field:
https://stripe.com/docs/api/files/object#file_object-url
Are you able to retrieve the File object that you're referring to and check whether the url field is null?
let me check
links": {
"object": "list",
"data": [],
"has_more": false,
"url": "/v1/file_links?file=file_1NIonsDL2LaDtxsO1YkuWYN4"
},
Did you check the url field instead of the links hash? What did you see in url (not links.url)?
"title": null,
"type": "png",
"url": "https://files.stripe.com/v1/files/file_1NIonsDL2LaDtxsO1YkuWYN4/contents"
} sorry
All good, so that value shown there for url is where the contents of the file should be accessible if you make a get request to that url (the field would be null if the file wasn't accessible). You will need to include your secret API key in the authentication header in order to access that URL though.
jesus another new problem
[2023-06-14 20:48:55] local.ERROR: To access sensitive verification results, configure a restricted API key with appropriate permissions. Learn more here: https://stripe.com/docs/identity/access-verification-results. {"exception":"[object] (Stripe\Exception\PermissionException(code: 0)
I already created this key
$this->stripeClient = new StripeClient(env('STRIPE_RESTRICTED'));
Hello! I'm taking over and catching up...
Can you give me the request ID showing that error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
one sec
I refreshed my local environment
ok didn't work
checking request
ok works...
let you know when I'll get another error
looks like im almost on finish line ;P
another problem
local.ERROR: Invalid file: must be uploaded in a multipart/form-data request. {"exception":"[object] (Stripe\Exception\InvalidRequestException(code: 0): Invalid file: must be uploaded in a multipart/form-data request. at /var/www/html/vendor/stripe/stripe-php/lib/Exception/ApiErrorException.php:38)
the problem is that it should work... file is accessible
$fileData = [
'purpose' => 'identity_document',
'file' => [
Storage::disk('local')->get('app.jpg')
]
];
$newFileObject = $this->stripeClient->files->create(
[
'purpose' => 'identity_document',
'file' =>$fileData
]
);
ahh damn
my fault..sorry
You got it?
yea and thinking about changing job for uber driver <facepalm> ๐